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. 15套java架构师大型分布式综合项目实战、千万高并发-视频教程

    * { font-family: "Microsoft YaHei" !important } h1 { color: #FF0 } 15套java架构师.集群.高可用.高可扩 展 ...

  2. explode和implode的运用

    $kesu_list=DD('Kesu.Kesu')->kesu_list(); foreach($kesu_list[0] as $key=>$val){ $reason_id_list ...

  3. php session_start()报错 解决办法

    1.php.ini中的output_buffering=off 改成output_buffering=4096 2.php.ini中的session.save_path是否设置好了 3.php.ini ...

  4. “HK”的日常之ARP断网攻击

    ARP断网攻击是什么?可以吃吗?如果可以吃它好吃吗? ARP断网攻击就是通过伪造IP地址和MAC地址实现ARP欺骗,能够在网络中产生大量的ARP通信量使网络阻塞,攻击者只要持续不断的发出伪造的ARP响 ...

  5. UML中关联(Association)和依赖(Dependency)的区别

    原文转自:http://blog.csdn.net/metasearch/article/details/2334853 在UMLCHINA精华区,看到了一些关联和依赖的讨论,似乎越讲越糊涂.我想谈一 ...

  6. FastJson对于JSON格式字符串、JSON对象及JavaBean之间的相互转换

    fastJson对于json格式字符串的解析主要用到了一下三个类: JSON:fastJson的解析器,用于JSON格式字符串与JSON对象及javaBean之间的转换. JSONObject:fas ...

  7. 利用java反射机制编写solr通用的java客户端

    一.前言 通过上一篇的讲解,我们知道了dynamicFiled字段,它是动态的,不需要显示的声明.而且一些常用的基本类型solr已经默认给我们创建好了. 例如:*_i,*_is,等. 如果我们要使用动 ...

  8. Chrome浏览器扩展开发系列之十二:Content Scripts

    Content Scripts是运行在Web页面的上下文的JavaScript文件.通过标准的DOM,Content Scripts 可以操作(读取并修改)浏览器当前访问的Web页面的内容. Cont ...

  9. HTML5 服务器推送事件(Server-sent Events)

    服务器推送事件(Server-sent Events)WebSocket 协议的一种服务器向客户端发送事件&数据的单向通讯.目前所有主流浏览器均支持服务器发送事件,当然除了 Internet ...

  10. 用Left join代替not in

    很多人都知道 在各种数据库里面 not in 的效率极其低下.例如 select * from a where a.id not in ( select id from b ) 我们假如a表有 10万 ...