UVA1605
来源:互联网 发布:实力vip软件下载 编辑:程序博客网 时间:2024/05/18 03:52
//UVA1605BuildingForUN#include<cstdio>#include<cstdlib>#include<cstring>//类似于制定一个比赛的表格const int MAXN = 50 + 5;char a[MAXN][MAXN];int main() {int n;int cnt = 0;while(scanf("%d", &n) == 1 && n) { if(cnt++) printf("\n");printf("%d %d %d\n", 2, n, n);for(int i = 'A'; i - 'A'< n && i <= 'Z'; i++) for(int j = 0; j < n; j++) a[i - 'A'][j] = i;for(int i = 'a'; i - 'a' < n && i <= 'z'; i++) for(int j = 0; j < n; j++) a[i - 'a' + 26][j] = i;//第一层,按行for(int i = 0; i < n; i++) {for(int j = 0; j < n; j++) printf("%c", a[i][j]);printf("\n");} //第二层,按列 printf("\n");for(int i = 0; i < n; i++) {for(int j = 0; j < n; j++) printf("%c", a[j][i]);printf("\n");}}return 0;} /**/
阅读全文
0 0
- uva1605
- UVA1605
- UVA1605-Building for UN
- UVa1605 Building for UN
- 联合国大楼UVa1605
- UVa1605 - Building for UN(构造)
- UVA1605 Building for UN (构造)
- UVa1605 Building for UN 构造
- 解题报告 之 UVA1605 Building for UN
- 联合国大楼UVA1605(Building for UN)
- Uva1605——Building for UN
- Uva1605 Building for UN 【构造法】【例题8-2】
- uva1605 - Building for UN 入门经典II 第八章例题8-2
- UVa1605 例题8-2 联合国大楼(Building for UN,ACM/ICPC NEERC 2007)
- 例题8-2 联合国大楼(Building for UN, ACM/ICPC NEERC 2007, UVa1605)
- JavaWeb中的Struts2概述
- visual studio2017解决问题:Cannot find the resource compiler dll rcdll.dll
- Https必懂解析
- [LeetCode]257. Binary Tree Paths
- VMware Harbor现已加入Rancher社区Catalog
- UVA1605
- Android Studio生成混淆jar包
- HDOJ 2037
- CodeForces
- 图片点击用webview百度页面
- HDU 6034 Balala Power! (贪心)
- Qt 5入门指南之Qt Quick编程示例
- SAP MM批次管理(4)批次分类
- hpuoj【1054】保留字母 [水题]