akoj-1059-Picture
Description
给你一个矩形的宽度和高度,要求按sample output样例输出此矩形。
Input
输入包含多组数据,每一组包含两个数N和M( 0 < N ,M , < 75 )分别代表矩形的宽和高。输入以EOF结束。
Output
对每一组N和M,输出相应的矩形。每一组输出结束后输出一个空行。
Sample Input
3 2
Sample Output
+---+
| |
| |
+---+
Source
Hdu 翻译
#include <stdio.h> int main()
{
int n, m;
int i,j;
while ( ~scanf("%d%d", &n, &m))
{
printf("+");
i = n;
while (i--)
printf("-");
printf("+\n"); j = m;
while (m--)
{ printf("|");
i = n;
while (i--)
printf(" ");
printf("|\n");
}
printf("+");
i = n;
while (i--)
printf("-");
printf("+\n");
printf("\n"); }
return 0;
}
akoj-1059-Picture的更多相关文章
- 基于Picture Library创建的图片文档库中的上传多个文件功能(upload multiple files)报错怎么解决?
复现过程 首先,我创建了一个基于Picture Library的图片文档库,名字是 Pic Lib 创建完毕后,我点击它的Upload 下拉菜单,点击Upload Picture按钮 在弹出的对话框中 ...
- MFC Picture控件加载图片
CStatic *pPic = (CStatic*)GetDlgItem(IDC_PICTURE); CBitmap bitmap; bitmap.LoadBitmapW(IDB_BITMAP2); ...
- [POJ1177]Picture
[POJ1177]Picture 试题描述 A number of rectangular posters, photographs and other pictures of the same sh ...
- ytu 1059: 判别该年份是否闰年(水题,宏定义)
1059: 判别该年份是否闰年 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 222 Solved: 139[Submit][Status][Web ...
- USACO 5.5 Picture(周长并)
POJ最近做过的原题. /* ID: cuizhe LANG: C++ TASK: picture */ #include <cstdio> #include <cstring> ...
- 彩色照片转换为黑白照片(Color image converted to black and white picture)
This blog will be talking about the color image converted to black and white picture. The project st ...
- HDU 1828 Picture(线段树扫描线求周长)
Picture Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Su ...
- don't forget the bigger picture
Imagine a circle that contains all of human knowledge: By the time you finish elementary school, you ...
- A Complete Guide to the <Picture> Element
If you’ve ever struggled building responsive websites, this post is for you. It’s part of a series o ...
- 【BZOJ】1059: [ZJOI2007]矩阵游戏(二分图匹配)
http://www.lydsy.com/JudgeOnline/problem.php?id=1059 本题可以看出,无论怎样变化,在同一行和同一列的数永远都不会分手---还是吐槽,,我第一眼yy了 ...
随机推荐
- My new life
第一次开始写博客,也是在学长的建议下想要正式的写的.有点小激动,这篇博客标志着一个新的开始,它将记录下我学习编程的生活,也象征着我将向着自己渴望的方向发展.不过这篇博客就真的是一篇随笔哈哈. 希望我的 ...
- [leetcode-592-Fraction Addition and Subtraction]
Given a string representing an expression of fraction addition and subtraction, you need to return t ...
- Tomcat常用配置修改
Tomcat常用配置修改 说明 运行需要设置环境变量 JAVA_HOME 即JDK安装目录 tomcat 默认登录地址 http://localhost:8080 配置tomcat 1.端口设置 打开 ...
- poj1083,基本互斥问题
题意:南北两侧各有200个房间,两侧房间之间有一个走廊 现在需要把桌子从这400个房间之中搬进搬出,每一张桌子需要10分钟时间,如果走廊因为有桌子搬运而占用,则需等待,求共需多少时间(分钟)将桌子搬完 ...
- VB6之GDI+加载PNG图片
原生的VB6不支持PNG个图片,因为刚有VB的时候还没有PNG的概念呢.不过,利用GDI+加载解析个PNG简直是砍瓜切菜般简单. GDI+的模块是我在网上下载的,地址应该是:http://vistas ...
- AugularJS从入门到实践(二)
前 言 前端 AngularJS是为了克服HTML在构建应用上的不足而设计的.(引用百度百科) 本篇学习主要有两个部分: ①[AngularJS 过滤器] ②[AngularJS ...
- .net 类型转换
在.net 平台下类型有两种方式可以进行类型转换,强转或as转换.(有的说法是两种方式都进行强转,有两种强转方式). 如:typeA objA = (typeA)objB 或者使用另一种typeA ...
- PCI_Making Recommendations
协作性过滤 简单理解从众多用户中先搜索出与目标用户'品味'相似的部分人,然后考察这部分人的偏爱,根据偏爱结果为用户做推荐.这个过程也成为基于用户的协作性过滤(user_based collaborat ...
- Swift语法初见
Swift语法初见 http://c.biancheng.net/cpp/html/2424.html 类型的声明: let implicitInteger = 70 let implicitDoub ...
- Python面向对象编程(四)
1.多态 多态的概念虽然现在才说,但是我们一直在用.多态就是多种形态的意思,动物都猫,狗,猪等等,这些都是动物的多种形态. 反映在Python中,多态就意味着就算不知道变量所引用的对象类型是什么,也能 ...