Logo 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466H

Codeforces Gym 101466 - 2017 ACM-ICPC, Universidad Nacional de Colombia Programming Contest A. Gaby And Addition time limit per test 6.0 s memory limit per test 1024 MB input standard input output standard output Gaby is a little baby who loves playing with num 阅读详情

题意:按照尺寸打印logo

思路:。。。

代码:

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<stack>
#include<queue>
#include<utility>
#include<vector>
#include<cmath>
#include<set>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long LL;

int m;

int main()
{
    //freopen("out.txt", "w", stdout);
    while(scanf("%d", &m) == 1){
        printf("*");
        for(int i=0; i<m-2; i++){
            printf(" ");
        }
        printf("* ");
        for(int i=0; i<m; i++){
            printf("*");
        }
        printf("\n");

        for(int i=0; i<m-2; i++){
            printf("*");
            for(int j=0; j<m-2; j++){
                printf(" ");
            }
            printf("* ");
            printf("*");
            for(int j=0; j<m-2; j++){
                printf(" ");
            }
            printf("*\n");
        }

        for(int i=0; i<m; i++){
            printf("*");
        }
        printf(" *");
        for(int i=0; i<m-2; i++){
            printf(" ");
        }
        printf("*\n");
    }
    return 0;
}
3dMax新手避坑指南:别再乱用UVW贴图了,从餐桌模型开始搞懂UV展开 本文为3DMax新手提供UVW贴图的避坑指南,通过餐桌模型实战解析UV展开的核心逻辑。详细介绍了避免纹理拉伸、接缝错位和比例失调的专业技巧,包括模型预处理、基础UV布局、手动优化和纹理适配等步骤,帮助用户从零开始掌握正确的贴图处理方法。 阅读详情

相关推荐

ACM组队经验谈

这一篇主要是介绍队友之间互相配合的经验。 他山之石,可以攻玉。对于各支不同的队伍或尚未组队的选手,可能大家的见解都不一样。 序章——团队!ACM不是一个人的战斗; 上篇——合理分工,演好自己的角色; 下篇——队友齐心,其利断金; 番外——深呼吸; 尾声——信任与成功;

2025 ICPC Universidad Nacional de Colombia Programming Contest

2025 ICPC Universidad Nacional de Colombia Programming Contest

2401_84097724的博客 998

ACM竞赛模板

各种ACM竞赛模板,包含很多常用算法的实现

2019 ICPC Universidad Nacional de Colombia Programming Contest

2019 ICPC Universidad Nacional de Colombia Programming Contest(2020.4.12) B、Boring Non-Palindrome 找最长回文后缀。 #include <bits/stdc++.h> using namespace std; typedef long long ll; bool check(const ch...

牛马一枚 1353

光模块基础知识【快速入门】02

光模块是用于交换机与设备之间传输的载体,是光纤通信系统中的核心器件。主要作用是发射端将设备的电信号转换成光信号。 光纤通道光模块和以太网光模块 光纤通道光模块 光纤通道(FC, Fiber Channel)是一种高速网络数据传输协议。光纤通道协议可以有序无损地传输原始数据,它主要用于在数据中心、电脑服务器、交换机与存储网络中进行数据传输。 FC光模块遵循FC协议,充当着光纤通道系统之间的接口,也是光纤存储网络设备间的接口。它们主要用于数据中心的光纤通道存储网络链接中。 FC光模块具有小型化和低.

Jin Hanquan的博客 3万+

Aitoearn内容营销的最佳开源 AI 代理,创建 · 发布 · 互动 · 副业一站式平台,支持渠道:抖音、小红书(红点)、微信通道、快手、哔哩哔哩、微信公众号、抖音等等

Aitoearn内容营销的最佳开源 AI 代理,创建 · 发布 · 互动 · 副业一站式平台,支持渠道:抖音、小红书(红点)、微信通道、快手、哔哩哔哩、微信公众号、抖音等等

struggle2025的博客 1751

2019 ICPC Universidad Nacional de Colombia Programming Contest(D Do Not Try This Problem)

题目链接 题意: 给出一个长度为1e5字符串,有1e5个操作,每次操作将首先为i,公差为a,项数为k+1(0~k)的等差数列的位置上的字符变成字符c,问最后的字符串是什么样子。 题解:首先靠后的修改比靠前的修改的优先级高,所以我们离线将修改操作倒过来跑。每次修改过一个位置后,我们就将这个位置删除,这样保证我们之后的操作不会对这个位置重复修改。如何删除一个位置?可以用并查集来做,记录fa[i]f...

weixin_41665270的博客 777

短信验证码逻辑漏洞学习——各种绕过姿势技巧

短信验证码逻辑漏洞学习——各种绕过姿势技巧

记录并分享学习安全的知识点.. 2557

ACM国际大学生程序设计竞赛及练习题库

ACM国际大学生程序设计竞赛   ACM国际大学生程序设计竞赛(英文全称:ACM International Collegiate Programming Contest(ACM-ICPC或ICPC)是由美国计算机协会(ACM)主办的,一项旨在展示大学生创新能力、团队精神和在压力下编写程序、分析和解决问题能力的年度竞赛。经过近30多年的发展,ACM国际大学生程序设计竞赛已经发展成为最具影响力的大...

爱.NET 1万+

Vue3 - H5实现省市区三四级联动组件,选择地址自定义省市区三级联动插件,弹框式多级联动选择器区域选择,vue3实现省市区三级联动地址选择组件(支持接口数据懒加载,样式精美漂亮,附带详细示例源码)

vue3实现省市区三级联动地址选择组件(附address文件),vue3实现省市区三级联动, 实现省、市、县地区三级联动功能,vue3省市区选择器,VUE3 h5如何实现省市区街道的四级联动选择,vue实现省市区选择联动,vue3城市三级联动(自定义组件)_VUE三级联动,插件省市区联动,vue如何实现省市区选择器,vue3怎样实现省市区地址三级联动,vue四级联动,vue3级联选择器,vue3实现选择省市区镇(街道)四级级联选择,包含三级级联选择,省市区街道三级四级联动选择器,VUE3自定义多列选择器省市

🏆 前端领域优质创作者 3070

基于 ESP32 的宿舍洗浴热水余量预测与智能排队提醒系统设计与实现

本系统以 ESP32 为主控核心,通过超声波液位传感器实时监测储热水箱剩余水量,配合 DS18B20 温度传感器采集水温数据,建立热水余量预测模型估算可用洗浴时长;同时通过红外人体传感器统计浴室排队人数,结合人均洗浴时长计算预计等待时间,并通过 OLED 屏本地显示 + WiFi Web 服务器远程推送的方式实现排队提醒功能。

weixin_42300449的博客 45

Double it 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466D

Double it 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466D

l_mark的博客 451

【项目实战】使用Python - Mediapipe、OpenCV进行手部面部检测(Python源码)

本文介绍了使用MediaPipe和OpenCV库进行实时面部和手部关键点检测的方法。通过MediaPipe的Holistic模型,可以获取468个面部特征点及每只手21个特征点。文章详细说明了环境配置、模型初始化参数设置,并提供了完整的代码实现,包括视频流处理、关键点绘制和FPS计算等功能。这套方案可应用于手语识别、疲劳检测等计算机视觉场景,为开发者提供了一套高效的开箱即用解决方案。

梦想起飞的地方 483

Gym 101845(2018 ACM-ICPC, Universidad Nacional de Colombia Programming Contest)

Problem A Problem B Problem C 题意: 给你两个串str1str1str1和str2str2str2以及mmm种操作,对于第iii操作你可以花费costicost_icosti​元,将字符cic_ici​编程字符viv_ivi​。现在问你将str1str1str1转化为str2str2str2的最小花费。 分析: 考虑将这mmm种操作的关系连边,并形成一个关系图。要...

Chen.Jr的博客 1555

【JDK】win 10 / win 11:jdk 8 下载、安装、配置、验证

win10 / win 11:JDK 最新版本下载 / 历史版本下载(jdk 8)、安装、配置系统环境变量、验证安装全详细操作教程

顾三殇 —— 博客空间(软件测试) 13万+

Unreal5从入门到精通之Landscape地形系统

虚幻引擎 5 (UE5) 能够利用其强大的地形编辑工具套件创建大规模的地形世界。使用地形工具可以创建身临其境的户外地形,这些地形经过优化,可在多种不同设备上保持可播放的帧速率。

TxNet 4145

Jeronimo's List 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym-101466J

Jeronimo's List 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest

l_mark的博客 418

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

2017 ACM-ICPC, Universidad Nacional de Colombia Programming Contest(Gym - 101466)解题报告集合

Gym 101466A Gaby And Addition #include<bits/stdc++.h> using namespace std ; const int maxn = 100052; struct node{ int val, deep, num; node* next[10] ; node(){ for(int i=0;i...

薛崇祥的博客 695

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

2017 ACM-ICPC, Universidad Nacional de Colombia Programming Contest K - Random Numbers (dfs序 线段树+数论)...

Tamref love random numbers, but he hates recurrent relations, Tamref thinks that mainstream random generators like the linear congruent generator suck. That's why he decided to invent his own random g...

weixin_33716154的博客 255

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

2017 ACM-ICPC, Universidad Nacional de Colombia Programming Contest D

Alex has two magic machines A and B. Machine A will give you 2x + 1 coins if you insert x coins in it, machine B will give you 2x + 2. Alex has no coins and wants to get exactly n coins in order to bu...

loooooog的博客 561

ICPC铜牌题目总结

ICPC铜牌题目总结

m0_53846741的博客 2848

2019 ICPC Universidad Nacional de Colombia Programming Contest 题解

2019 ICPC Universidad Nacional de Colombia Programming Contest 题解 A:貌似是计算几何 #include<bits/stdc++.h> using namespace std; struct vec{ int x,y; vec(int _x,int _y):x(_x),y(_y){ int d=__gcd(x,y)...

WISH2LUCK的博客 984

Logo Gym-101466H

Logo Gym-101466H

李典金 333

2019 ICPC Universidad Nacional de Colombia Programming Contest C+J

题目https://codeforces.com/gym/102307 C. Common Subsequence dp 题意: 给你两个串,求公共子序列长度len,若len>=0.99*n,则输出“Long lost brothers D:”,否则输出“Not brothers :(“ 题解: 正常求公共子序列长度LCS的复杂度就是n*m,显然会超时,只有从len>=0.9...

qq_39898877的博客 828

Planet Communcation 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466C

Planet Communcation 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466C

l_mark的博客 623
上一篇: Double it 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466D
下一篇: Planet Communcation 2017ACM-ICPCUniversidadNacionaldeColombiaProgrammingContest/Gym101466C
Alba_126
博客等级 码龄9年 6粉丝 80原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值