UVA 1605 Building for UN
2015-08-29 09:57
507 查看
#include<cstdio> #include<iostream> #include<cstring> #include<string.h> #include<algorithm> using namespace std; char s[] = {'0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S','T', 'U', 'V', 'W','X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's','t', 'u', 'v', 'w','x','y', 'z'}; int main() { int n; int kase = 0; while(scanf("%d", &n) == 1) { if(kase !=0) printf("\n"); ++kase; if(n==1) { printf("%d %d %d\n", 1, 1, 1); printf("A\n"); continue; } printf("%d %d %d\n", 2, n, n); for(int i = 1; i <= n; ++i) { for(int j = 1; j <= n; ++j) printf("%c", s[i]); printf("\n"); } printf("\n"); for(int i = 1; i <= n; ++i) { for(int j = 1; j <= n; ++j) printf("%c", s[j]); printf("\n"); } } return 0; }
相关文章推荐
- UI 07 界面传值 之 从后向前 ---- 协议传值
- HDU 5147 Sequence II (线段树求前缀和、后缀和)
- UIView的alpha、hidden和opaque属性之间的关系和区别
- C#基础----string和stringBuilder
- Win10 10525升级Win10 Build 10532失败回滚怎么办?
- POJ 3080 Blue Jeans(水~)
- 单行文本框和多行文本框UiTextfield UiTextView
- POJ 2871 A Simple Question of Chemistry(水~)
- POJ 2785 4 Values whose Sum is 0(hash表)
- 从数据库中提取到ueditor并且重新编辑
- POJ 2664 && HDU 1144 Prerequisites?(水~)
- 【LeetCode-面试算法经典-Java实现】【225-Implement Stack using Queues(用队列实现栈操作)】
- 6、iOS 开发之 UIPickerView
- 4、iOS 开发之 UITableView
- 3、iOS 开发之 UIScrollView UIPageController NSTimer
- iOS部分-UI基础控件 - 01天 入门 第11课 上下左右移动
- 新建Android工程报错:'Building workspace' has encountered a problem...解决办法
- ngui自适应的一点学习
- ios开发-UI-自定义Tabbar 图书布局
- iOS之Operation Queues 和 Grand Central Dispatch