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的更多相关文章

  1. 基于Picture Library创建的图片文档库中的上传多个文件功能(upload multiple files)报错怎么解决?

    复现过程 首先,我创建了一个基于Picture Library的图片文档库,名字是 Pic Lib 创建完毕后,我点击它的Upload 下拉菜单,点击Upload Picture按钮 在弹出的对话框中 ...

  2. MFC Picture控件加载图片

    CStatic *pPic = (CStatic*)GetDlgItem(IDC_PICTURE); CBitmap bitmap; bitmap.LoadBitmapW(IDB_BITMAP2); ...

  3. [POJ1177]Picture

    [POJ1177]Picture 试题描述 A number of rectangular posters, photographs and other pictures of the same sh ...

  4. ytu 1059: 判别该年份是否闰年(水题,宏定义)

    1059: 判别该年份是否闰年 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 222  Solved: 139[Submit][Status][Web ...

  5. USACO 5.5 Picture(周长并)

    POJ最近做过的原题. /* ID: cuizhe LANG: C++ TASK: picture */ #include <cstdio> #include <cstring> ...

  6. 彩色照片转换为黑白照片(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 ...

  7. HDU 1828 Picture(线段树扫描线求周长)

    Picture Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Su ...

  8. don't forget the bigger picture

    Imagine a circle that contains all of human knowledge: By the time you finish elementary school, you ...

  9. 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 ...

  10. 【BZOJ】1059: [ZJOI2007]矩阵游戏(二分图匹配)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1059 本题可以看出,无论怎样变化,在同一行和同一列的数永远都不会分手---还是吐槽,,我第一眼yy了 ...

随机推荐

  1. Codeforces 818B Permutation Game

    首先看一下题目 B. Permutation Game time limit per test 1 second memory limit per test 256 megabytes input s ...

  2. centos7 minimal版本下mysql的安装

    最近第一次尝在虚拟机上安装mysql,由于是centos7 minimal版本,很多安装包或命令必须自己添加,遇到很多问题. 首先是执行# yum install mysql-server 报错: 打 ...

  3. 用py2exe将python文件转换成exe可执行程序

    1.首先需要安装py2exe模块,下载地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/ 然后用pip install 命令安装py2exe模块,如果你用的py ...

  4. Java通过Axis2发布WebService

    参考文档: http://blog.csdn.net/ghsau/article/details/12714965 http://www.iteye.com/topic/1135747 http:// ...

  5. [Splay伸展树]splay树入门级教程

    首先声明,本教程的对象是完全没有接触过splay的OIer,大牛请右上角.. 首先引入一下splay的概念,他的中文名是伸展树,意思差不多就是可以随意翻转的二叉树 PS:百度百科中伸展树读作:BoGa ...

  6. 简单的使用Seajs

    什么是Seajs Seajs是一个加载器 http://yslove.net/seajs/ 遵循 CMD 规范模块化开发,依赖的自动加载.配置的简洁清晰. 兼容性 Chrome 3+ Firefox ...

  7. centos7使用cobbler(2.8)批量部署操作系统之二

    1. Cobbler常用命令 1.1 查看cobbler帮助 # cobbler --help usage ===== cobbler <distro|profile|system|repo|i ...

  8. 在Linux上创建Postgresql数据库

    由于前一次用默认的配置创建pgsql数据库倒置root的占用率达到97%. 重新创建一次数据库,很多坑又忘了. 创建一个放Data的文件夹,/majestic12/pgsql/data PGDATA ...

  9. Angular4 - Can't bind to 'ngModel' since it isn't a known property of 'input'.

    用[(ngModel)]="xxx"双向绑定,如:控制台报错:Can't bind to 'ngModel' since it isn't a known property of ...

  10. zepto.js 的tap事件中点击一次触发两次事件

    html代码: <div class="xh-lxx-cart-count1"> <span class="minus">-</s ...