#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. php __clone实现

    <?php class Account { public $balance; public function __construct($balance) { $this->balance ...

  2. SQL Server 2012数据库还原所遇到的问题

    在SQL Server2005及以下版本做数据库备份还原时,需要首先建立数据库,然后才能进行数据库还原操作:而在SQL Server2005以上版本做数据库还原时,不需要建立数据库,可以直接进行数据库 ...

  3. [布局] bootstrap基本标签总结

    文件头: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <titl ...

  4. css3 之表格隔行分色显示

    <html> <head> <title></title> <style type="text/css"> table{ ...

  5. Android 安装和启动另外一个应用

    有时候一个应用需要启动另外一个应用来完成操作,比如在某些应用中打开闹钟,相机,日历等等. 启动或安装相应的应用的方法: Step1:判断是否安装目标应用.只要知道目标应用的安装包名就可以通过判断&qu ...

  6. mongodb工具

    可视化管理工具 http://www.mongovue.com/ mongodb use case http://www.mongodb.org/about/applications/ mongodb ...

  7. Web应用部署工具

    Fabric----python写的,没试用过,基本上是local函数是调用本地命令,run是调用远程命令,看了些sample,还是觉得挺方便的. jekins------java的集成测试工具,也可 ...

  8. 利用ftrace跟踪内核static tracepoint——实例writeback event

    摘要:和很多linux内核子系统一样,static tracepoint有很多层次,其中某个层次都展示给不同层次的开发者来满足他们的不同需求.关于linux tracepoint的详细信息,我们可以在 ...

  9. Open Wifi SSID Broadcast vulnerability

    Open Wifi SSID Broadcast vulnerability 0x00 前言 前几天,看到微博上@RAyH4c分享了一份老外关于wifi钓鱼的文章,觉得挺好的,便翻译了一下.第一次翻译 ...

  10. 简单的HDFS思维导图