HDU:2052 Picture(水)

杭电OJ100题——2050-2054(C++版) 折线分割平面 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 41525    Accepted Submission(s): 27496   Problem Description 我们看到过很多直线分割平面的题目,今天的这个题目... 阅读详情

Picture

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 24557    Accepted Submission(s): 12493


Problem Description
Give you the width and height of the rectangle,darw it.
 

Input
Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicate the width and height of the rectangle.Iuput ends of EOF.
 

Output
For each case,you should draw a rectangle with the width and height giving in the input.
after each case, you should a blank line.
 

Sample Input
  
3 2
 

Sample Output
  
+---+ | | | | +---+
 

Author
xhd
 

Source
 

Recommend
linle
 


解题思路:太水了,直接看代码。

代码如下:

#include <stdio.h>
int main()
{
	int n,m;
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		printf("+");
		for(int i=0;i<n;i++)
		printf("-");
		printf("+\n");
		for(int i=0;i<m;i++)
		{
			printf("|");
			for(int i=0;i<n;i++)
			printf(" ");
			printf("|\n");
		}
		printf("+");
		for(int i=0;i<n;i++)
		printf("-");
		printf("+\n\n");
	}
	return 0;
}


循迹小车控制实验:代码集成与硬件验证 在main.c文件中还需定义上层代码调用的GPIO输入和PWM输出相关函数,其中调用STM32CubeMX生成的HAL库函数。}else{}else{}else{}else{在main.h文件中的USER CODE BEGIN EFP注释代码段中外部声明Get函数和Set函数,使该函数可以被上层代码调用。循迹小车控制实验到本章全部完成。相比于前几章节的实验,本实验复杂程度是最高的。 阅读详情

相关推荐

零基础微信理财通基金实操指南(2026版)

先活下来:保证不亏大钱,再想赚钱慢慢变富:年化10%,7年翻倍,这已经很好了开始比完美重要:今天先存100元到零钱通,就是最好的开始现在打开微信,进入理财通,完成第一步风险测评吧!有任何问题可以随时问,我会用最通俗的方式解释。

老韩的Linux云计算架构师进阶之路 1728

【Picture】Give you the width and height of the rectangle, draw it.(可提交)

Input Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicate the width and height of the rectangle.Iuput ends of EOF. Output For each case,you should draw a rectangle with the width and height giving

and_what_not的博客 488

抖音风控参数‘bd-ticket-guard-client-data’深度解析:从X.509证书到请求签名的完整链路

本文深度解析抖音风控参数‘bd-ticket-guard-client-data’的技术实现,从X.509证书体系到请求签名的完整安全链路。通过Python代码示例,揭示证书生成、签名算法及票据封装等核心机制,帮助开发者理解现代平台风控系统的多层防御架构设计。

weixin_42525738的博客 444

ZZULIOJ.1222: Picture

1222: Picture 题目描述 Give you the width and height of the rectangle,darw it. 输入 Input contains a number of test cases.For each case ,there are two numbers n and m (0 &lt; n,m &lt; 75)indicate the width ...

八百标兵奔北坡的博客 529

[信号与系统]一阶与二阶连续时间系统和离散时间系统

定义:一阶连续时间系统由一阶线性常系数微分方程描述: dy(t)dt+ay(t)=bx(t) \frac{dy(t)}{dt} + a y(t) = b x(t) dtdy(t)​+ay(t)=bx(t)时间常数:时间常数 τ=1a\tau = \frac{1}{a}τ=a1​ 是系统响应速度的衡量指标。时间常数越小,系统响应越快。冲激响应:一阶系统的冲激响应是指数衰减或增长的形式。例如,对于一个单位冲激输入,响应为: h(t)=bae−at h(t) = \frac{b}{a} e^{-at} h(t)=

Andius的博客 2129

深入解析音频信号处理的核心算法——傅里叶变换、语音增强、回声消除与主动降噪

本文系统介绍了现代音频信号处理的核心技术。首先阐述傅里叶变换作为理论基础的重要性,它能将声音分解为频域成分。随后重点分析三大关键技术:语音增强利用谱减法、维纳滤波和深度学习从噪声中提取人声;回声消除采用自适应滤波器消除通话中的回声;主动降噪通过声波干涉原理抵消环境噪声。文章最后指出,这些技术在实际应用中协同工作,形成完整的音频处理链路,共同提升语音质量和听觉体验。随着算法进步和算力提升,音频处理技术正向着更智能、更高效的方向发展。

程序猿老樊的博客 1337

Picture

1.题目: Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicat

持续学习,刻意练习 1165

USB-C快充协议分析仪:QC/PD双协议识别与功率监测设计

USB-C快充协议是现代移动设备能量传输的核心技术标准,其本质是通过物理层电压特征(如DP/DM组合、CC线BMC编码)实现动态电压协商。理解协议握手原理对充电器研发、兼容性测试及故障诊断至关重要。本方案聚焦受电端(Sink)视角,基于FUSB302B与高阻抗DP/DM采样电路,实现QC2.0/QC3.0/QC4+与PD2.0/PD3.0的实时识别与状态机解析;结合INA219高精度电流检测与μs级同步采样,达成±0.06%功率测量精度。典型应用于快充芯片验证、产线协议一致性测试及第三方评测,为USB供电系

weixin_42153793的博客 254

杭电ACM2052

这道题目,很重要的地方其实是格式问题,题很简单,但我写的时候在格式这里错了几次 1、减号易错用成下划线 2、高的地方一定不要多加换行,就直接输出 3、结果出来还要空一行 好啦,贴代码,嘻嘻嘻 #include&lt;stdio.h&gt; int main() { int m=0,n=0; while(scanf("%d%d",&amp;m,&amp;n)!=EOF) {...

weixin_44347111的博客 632

【ArcGIS Add-in编程】如何创建ArcMap的下拉菜单插件

step1. VS2010中创建一个空的解决方案step2.创建一个项目 直接点击finish。step3 为该项目创建项目,选择Menu,作为根菜单,而后修改xml中的items项,添加需要放在下拉菜单中的项目,例如一个按钮; step4 现在可以创建项目,作为菜单中的项目。为该项目添加新的项目,选择button 此时 xml文件中,多了该button的项目,将该项目添加到items

吃货小跟班的博客 4433

骑砍Ⅱ霸主MOD开发(8)-骨骼动画

基于四向攻击设计的动作参数,包括动作仰角,环视方向,物理碰撞检测等参数通过XML进行配置.配置文件:ModuleData\combat_parameters.xml。为Agent定制化设计的骨骼动画切片为动作ActionSet,通过action_types.xml和action_sets.xml进行配置.action_types.xml和action_sets.xml全局初始化后会进行缓存,在内存中保留每个ActionType的唯一索引。自定义骨骼动画会进行动画数据缓存,根据持续时长,帧数量进行统计计算.

骑砍战团&霸主MOD开发 1109

HDU2052(水题)Picture

本体为水题,练手

MaLker的博客 275

【软件测试】人工智能(AI)在软件测试领域的应用

AI在软件测试领域的应用使测试过程更加自动化、高效和智能。它可以帮助测试团队减轻负担,更快地识别和修复问题,最终提高软件的质量和可靠性。随着AI技术的不断进步,未来AI在软件测试领域的应用将更加广泛和深入。

weixin_46453070的博客 4405

HDU 2052 - Picture(水题)

Picture Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 36704    Accepted Submission(s): 18014   Problem Description Give you the width and ...

仙女的博客 196

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

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

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

HDU 2052 Picture

HDU 2052 Picture 题目 题目大意 :就是输入两个数字 宽度和高度,在每个矩形下面输出一个空行。 0.0 博主是个连打印图形都不会的菜鸡, 这种在大佬眼里的水题干了一下午。 不是大家的那种普遍通用算法, 是一个一个试出来的0.0 思路 ac答案 #include<stdio.h> int main() { int n,m; int i,j; while(scanf("%d %d",&n,&m)!=EOF) { for(i=1;i<=m+

maduit的博客 176

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

hdu 2052 picture

Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indica...

weixin_30780221的博客 74

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

2052——picture

http://acm.hdu.edu.cn/showproblem.php?pid=2052 内容比较简单就是打印图案。。。 但是方法是对于四个角,第一行第四行,中间行要进行分类。 #include<stdio.h> int main(){ int j,n,m,i; while(scanf("%d%d",&m,&n)!=EOF)...

aozhe0658的博客 129

HDU - 2052 Picture

Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicate the widt...

一定要站在自己热爱的生活里闪闪发光 3万+

HDU 2052 - Picture

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2052 #include int main(void) { int w, h, i, j; while (scanf("%d%d", &w, &h) != EOF) { putchar('+'); for (i = 0

棺材深處 895

杭电ACM—HDU-2052Picture

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2052 题目大意:输入两个数n和m,n为列,m为行,在特定位置分别赋值'=','-','|' 和‘ ’ 这个题目只要建立一个二维数组,找对位置和规律赋值,其实挺简单的。 代码如下: #include #include using namespace std; in

hj1214ing的博客 337

HDU——2052——Picture

#include using namespace std; int main() { int m,n; char a[80][80]; while(cin>>m>>n) { for(int i=0;i<n+2;i++) { for(int j=0;j<m+2;j++) {

清溪浅水 599

杭电2052——Picture

题目:Picture Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there are two numbers n and m (0 &amp;amp;lt; n,m &amp;amp;lt; 75)indi...

weixin_43846755的博客 300

HDU 2052 Picture

Picture Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13114    Accepted Submission(s): 6821 Problem Description Give you the width an

住在半山腰的螃蟹专栏 602

HDU 2052 Picture

Picture Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12879 Accepted Submission(s): 6698 Problem Description Give you the width and he

公众号:ByteCode 1313

Hdu 2052 - Picture

直接输出,不用存放,注意格式   #include #include int main() { int w,h,i,j; while(scanf("%d%d", &w, &h)!=EOF) { printf("+"); for(i=1; i<=w; i++) { printf("-");

Chuck的博客 2290
上一篇: HDU:2099 整除的尾数(水)
下一篇: HDU:2050 折线分割平面(规律,数学,推导)
zugofn
博客等级 码龄11年 43粉丝 278原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值