#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
using namespace std; int main(){
//initialize for positive number
char h[][];
strcpy(h[], "*****..***..*...*.*****...*...*.*****.*****.***...*****.*...*");
strcpy(h[], "*.....*...*.*...*.*.......*...*.*...*...*...*..*..*...*..*.*.");
strcpy(h[], "*****.*****.*...*.***.....*****.*****...*...*...*.*...*...*..");
strcpy(h[], "....*.*...*..*.*..*.......*...*.*.*.....*...*..*..*...*...*..");
strcpy(h[], "*****.*...*...*...*****...*...*.*..**.*****.***...*****...*.."); //initialize for negative number
char v[][];
strcpy(v[], "*****");
strcpy(v[], "*....");
strcpy(v[], "*****");
strcpy(v[], "....*");
strcpy(v[], "*****");
strcpy(v[], ".....");
strcpy(v[], ".***.");
strcpy(v[], "*...*");
strcpy(v[], "*****");
strcpy(v[], "*...*");
strcpy(v[],"*...*");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],".*.*.");
strcpy(v[],"..*..");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*....");
strcpy(v[],"***..");
strcpy(v[],"*....");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],".....");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],"*.*..");
strcpy(v[],"*..**");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],"***..");
strcpy(v[],"*..*.");
strcpy(v[],"*...*");
strcpy(v[],"*..*.");
strcpy(v[],"***..");
strcpy(v[],".....");
strcpy(v[],"*****");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*...*");
strcpy(v[],"*****");
strcpy(v[],".....");
strcpy(v[],"*...*");
strcpy(v[],".*.*.");
strcpy(v[],"..*..");
strcpy(v[],"..*..");
strcpy(v[],"..*.."); bool flag = false, pos;
int n, m, i, j, k;
while (cin >> n){
if (n == ) break;
if (flag)
cout << endl << endl; flag = true;
pos = true;
if (n < ){
pos = false;
n = abs(n);
}
//output for positive number
if (pos){
for (i = ; i < ; ++i){
m = ;
while (m < n){
for (j = ; h[i][j]; ++j){
k = ;
while (k < n){
cout << h[i][j];
++k;
}
}
++m;
cout << endl;
}
}
}
else{
for (i = ; i < ; ++i){
m = ;
while (m < n){
for (j = ; v[i][j]; ++j){
k = ;
while (k < n){
cout << v[i][j];
++k;
}
}
++m;
cout << endl;
}
}
}
}
cout << endl << endl;
return ;
}
 //画图题,直接打表
#include <stdio.h> char h[][] =
{
"*****..***..**.*******.*****.*****.********.**",
"*..**.**.*.**.****..*..**..*.*.",
"*****.*****.**.***..*****.********.***..",
".*.**..*.*..*.**.*.*..**..*..***..",
"*****.**********.*..**.*****.*********.."
}; char v[][] =
{
"*****",
"*.",
"*****",
".*",
"*****",
"..",
".***.",
"**",
"*****",
"**",
"**",
"..",
"**",
"**",
"**",
".*.*.",
"..*..",
"..",
"*****",
"*.",
"***..",
"*.",
"*****",
"..",
"..",
"..",
"**",
"**",
"*****",
"**",
"**",
"..",
"*****",
"**",
"*****",
"*.*..",
"*..**",
"..",
"*****",
"..*..",
"..*..",
"..*..",
"*****",
"..",
"***..",
"*..*.",
"**",
"*..*.",
"***..",
"..",
"*****",
"**",
"**",
"**",
"*****",
"..",
"**",
".*.*.",
"..*..",
"..*..",
"..*.."
}; void draw(int n)
{
if(n < )
{
n = -n;
for(int i = ; i < * n; i++)
{
for(int j = ; j < * n; j++)
{
printf("%c", v[i / n][j / n]);
}
printf("\n");
}
}
else
{
for(int i = ; i < * n; i++)
{
for(int j = ; j < * n; j++)
{
printf("%c", h[i / n][j / n]);
}
printf("\n");
}
}
printf("\n\n");
} int main()
{
int n;
while(scanf("%d", &n), n) draw(n);
return ;
}

uva 10894 - Save Hridoy的更多相关文章

  1. UVA - 11986 Save from Radiation

    Description J Save from Radiation Most of you are aware of Nuclear Power Plant Explosion at Fukushim ...

  2. UVa 12403 - Save Setu

    题目:有两种操作:1.当前数值添加.2.输出当前数值. 分析:简单题.模拟就可以. 说明:A+B. #include <iostream> #include <cstdlib> ...

  3. UVA 1291 十四 Dance Dance Revolution

    Dance Dance Revolution Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Su ...

  4. UVA 322 ships (POJ 1138)

    题目地址: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

  5. UVA它11292 - Dragon of Loowater

    Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance tur ...

  6. UVA 257 - Palinwords(弦HASH)

    UVA 257 - Palinwords 题目链接 题意:输出一个文本里面的palinword,palinword的定义为.包括两个不同的回文子串,而且要求回文子串不能互相包括 思路:对于每一个单词推 ...

  7. UVA 11292 Dragon of Loowater(简单贪心)

    Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance tur ...

  8. UVA 1341 - Different Digits(数论)

    UVA 1341 - Different Digits 题目链接 题意:给定一个正整数n.求一个kn使得kn上用的数字最少.假设同样,则输出值最小的 思路: 首先利用鸽笼原理证明最多须要2个数字去组成 ...

  9. Risk UVA - 12264 拆点法+最大流+二分 最少流量的节点流量尽量多。

    /** 题目:Risk UVA - 12264 链接:https://vjudge.net/problem/UVA-12264 题意:给n个点的无权无向图(n<=100),每个点有一个非负数ai ...

随机推荐

  1. centos 开启apache rewrite模式

    mod_rewrite能使网页伪静态,对于搜索引擎友好,下面就是开启这个功能的说明!启用mod_rewrite模块在conf目录的httpd.conf文件中找到 LoadModule rewrite_ ...

  2. Qweb报表中的Reload from Attachment参数

    通过继承的方式修改了Qweb报表却发现没有生效,经查,其原因在于报表的设置中勾选了 Reload from Attachment 选项. 将本选项取消选中即可生效.

  3. SQLServer备忘

        1,创建主键有三种方式,尤其注意联合主键: (1) (2) (3)   2,修改主键的方式       2,创建外键应该也有三种方式:

  4. mobile javascript

    http://www.cnblogs.com/zhepama/archive/2013/06/01/3112023.html http://www.csdn.net/article/2014-01-0 ...

  5. 【HDOJ】1493 QQpet exploratory park

    超水的动态规划.最后要对概率求Sigma. #include <cstdio> #include <cstring> #include <cstdlib> #def ...

  6. jQuery 左侧滑动

    $("#slideleft button").click(function(){ var $lefty = $(this).next(); $lefty.animate({ lef ...

  7. Wamp集成环境安装

    一.Wamp下载 点我下载WampServer2.1a-x32 二.Wamp安装步骤 三.修改语言为汉语 四.查看测试页面

  8. 远程连接mysql,mysql如何开启远程连接

    很多时候,mysql只需要开本地连接,也就是本机(服务器本身)连接就可以,默认也是这样,默认也不支持远程连接 但有的时候,我们需要将mysql独立出一台主机或数据库,放到另一台机器的时候,这时,就需要 ...

  9. js过滤空格

    点击查看效果 点击进入下载 <html> <head> <title> 过滤空格 </title> <SCRIPT LANGUAGE=" ...

  10. 【ThinkingInC++】64、重载new和delete,来模仿内存的分配

    /** * 书本:[ThinkingInC++] * 功能:重载new和delete.来模仿内存的分配 * 时间:2014年10月5日14:30:11 * 作者:cutter_point */ #in ...