HDUJ 2052 Picture 模拟
Picture
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 15932 Accepted Submission(s): 8240
after each case, you should a blank line.
3 2
+---+
| |
| |
+---+
#include<iostream>
#include<cstring>
using namespace std; int main()
{
int n,m;
while(cin>>n>>m)
{
char str[85][85];
memset(str,0,sizeof(str));
int i,j;
for(i=0;i<=m+1;i++)
{
for(j=0;j<=n+1;j++)
{
if(i==0 || i==m+1)
str[i][j]='-';
else
str[i][j]=' ';
if(j==0 || j==n+1)
str[i][j]='|';
}
} str[0][0]=str[0][n+1]=str[m+1][0]=str[m+1][n+1]='+';
for(i=0;i<=m+1;i++)
{
for(j=0;j<=n+1;j++)
cout<<str[i][j];
cout<<endl;
}
cout<<endl;
} return 0;
}
HDUJ 2052 Picture 模拟的更多相关文章
- hdu 2052 Picture(java)
问题: 開始直接用输入的数作为宽和高,但实际上要多出两行边框,所以要加一个2. 还有题目要求最后要输出一个空行没有注意到. Picture Time Limit: 1000/1000 MS (Java ...
- 杭电ACM 2052 Picture
Picture Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Su ...
- HDU 2052 Picture
http://acm.hdu.edu.cn/showproblem.php?pid=2052 Problem Description Give you the width and height of ...
- HDOJ 2052 Picture
Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a n ...
- 杭电oj2047-2049、2051-2053、2056、2058
2047 阿牛的EOF牛肉串 #include<stdio.h> int main(){ int n,i; _int64 s[]; while(~scanf("%d" ...
- mock造数据
前端开发,需要和后台联调:很多时候,前端开发并不需要等后台完全写好接口在去联调,自己可以写死数据,渲染数据,加样式.后台人员有时会很忙,他没有时间写好返回所有的数据等等,特别是新开一个项目,从零开始的 ...
- Gym - 101670E Forest Picture (CTU Open Contest 2017 模拟)
题目: https://cn.vjudge.net/problem/1451310/origin 题意&思路: 纯粹模拟. 大体题意是这样的: 1.有人要在一个10-9<=x<=1 ...
- HDUJ 2074 叠筐 模拟
叠筐 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submiss ...
- QQ模拟自动登录实现
QQ模拟自动登录实现 本篇文章主要介绍"QQ模拟自动登录实现(带验证码)",主要涉及到java 实现QQ自动登录(带验证码)方面的内容,对于java 实现QQ自动登录(带验证码)感 ...
随机推荐
- Python 集成开发环境(IDE)
DiscoverSDK网站进行了一次调查 - 什么是最好的Python IDE,这里是调查的结果 Python是一种非常流行的开源编程语言.得益于无尽的模块选项,Python今天广泛用于脚本 ...
- PHP amqp扩展安装
1.安装 rabbitmq-c下载地址:https://github.com/alanxz/rabbitmq-c> mkdir build > cd build> cmake -DO ...
- iOS申请证书,Certificates, Identifiers &Profiles 简介 - 申请证书
在真机调试以及发布应用时,要申请证书,我们必须知道Certificates, Identifiers ,Profiles 是什么含义,下面对它们做简单介绍,以及如果申请证书. Certificates ...
- Caught exception while loading file struts-default.xml 的错误
转自刘长炯的博客:http://www.blogjava.net/beansoft/archive/2008/10/13/233962.html MyEclipse 6开发JDK6和Struts 2冲 ...
- 25. Spring Boot使用自定义的properties【从零开始学Spring Boot】
转:http://blog.csdn.net/linxingliang/article/details/52069515 spring boot使用application.properties默认了很 ...
- Codeforces Round #277.5 (Div. 2)(C题)
C. Given Length and Sum of Digits... time limit per test 1 second memory limit per test 256 megabyte ...
- HTTP学习笔记(一)报文和连接管理
对TCP/IP协议簇有些了解的同学们应该都知道.TCP/IP协议通过精简ISO网络7层协议(事实上了解历史渊源的话,TCP/IP协议本来目的并非简化ISO的7层协议.仅仅是因为ISO协议簇制定速度慢于 ...
- hdu2222Keywords Search字典树入门……
#include<iostream> #include<cstring> using namespace std; struct node { int num; node *n ...
- spring学习六----------Bean的配置之Aware接口
© 版权声明:本文为博主原创文章,转载请注明出处 Aware Spring提供了一些以Aware结尾的接口,实现了Aware接口的bean在被初始化后,可以获取相应的资源 通过Aware接口,可以对S ...
- Linux内核编译过程分析
http://pan.baidu.com/s/1mgtACVu 其中是我总结生成的一些文档,以便于理解当我们输入make uImage后,系统是怎么一步一步生成uImage的,我采用的是逆向分析的方法 ...