hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4706
Children's Day
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 32768/32768 K (Java/Others)
a e
bdf
c g
Your task is to write different 'N' from size 3 to size 10. The pixel character used is from 'a' to 'z' continuously and periodic('a' is reused after 'z').
Not all the resultsare listed in the sample. There are just some lines. The ellipsis expresseswhat you should write.
分析:
输出由字符组成的‘N’ , 三到十的大小。(模拟一下就可以啦)
AC代码:
#include<cstdio>
#include<cstring>
using namespace std;
char map[][];
int main() {
int k = ;
for(int n = ;n <= ;n++) { //memset(map,'\n',sizeof(map));
for(int i = ;i <= n;i++) {
for(int j = ;j < n;j++) {
if(i == || i == n - || i + j == n - ) {
map[j][i] = k % + 'a';
k++;
} else if(i == n) {
map[j][i] = '\0';
} else map[j][i] = ' ';
}
} for(int i = ;i < n;i++)
printf("%s\n",map[i]);
}
return ;
}
hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup的更多相关文章
- hduoj 4706 Herding 2013 ACM/ICPC Asia Regional Online —— Warmup
hduoj 4706 Children's Day 2013 ACM/ICPC Asia Regional Online —— Warmup Herding Time Limit: 2000/1000 ...
- hduoj 4712 Hamming Distance 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4712 Hamming Distance Time Limit: 6000/3000 MS (Java/Other ...
- hduoj 4710 Balls Rearrangement 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4710 Balls Rearrangement Time Limit: 6000/3000 MS (Java/Ot ...
- hduoj 4708 Rotation Lock Puzzle 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4708 Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/O ...
- hduoj 4715 Difference Between Primes 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4715 Difference Between Primes Time Limit: 2000/1000 MS (J ...
- hduoj 4707 Pet 2013 ACM/ICPC Asia Regional Online —— Warmup
http://acm.hdu.edu.cn/showproblem.php?pid=4707 Pet Time Limit: 4000/2000 MS (Java/Others) Memory ...
- 2013 ACM/ICPC Asia Regional Online —— Warmup
1003 Rotation Lock Puzzle 找出每一圈中的最大值即可 代码如下: #include<iostream> #include<stdio.h> #inclu ...
- HDU 4714 Tree2cycle(树状DP)(2013 ACM/ICPC Asia Regional Online ―― Warmup)
Description A tree with N nodes and N-1 edges is given. To connect or disconnect one edge, we need 1 ...
- HDU 4749 Parade Show 2013 ACM/ICPC Asia Regional Nanjing Online
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4749 题目大意:给一个原序列N,再给出一个序列M,问从N中一共可以找出多少个长度为m的序列,序列中的数 ...
随机推荐
- 我的Mac软件集
哥总算用上了mac,走上了小康了 phpstorm:个人工作中最常用的软件了 pycharm:这个写python的,和phpstorm是一家开发的 sourceTree:git 可视化工具 xcode ...
- html之内联元素与块状元素;
html之内联元素与块状元素 一.html之内联元素与块状元素 1.块状元素一般比较霸道,它排斥与其他元素位于同一行内.比如div,并且width与height对它起作用. 2.内联元素只能容纳文本或 ...
- APP 上架苹果应用商城
http://www.360doc.com/content/15/0203/15/19663521_445974056.shtml http://jingyan.baidu.com/article/4 ...
- JSON数据转换为字典型
-(NSDictionary *)parseJSONStringToNSDictionary:(NSString *)JSONString { NSData *JSONData = [JSONS ...
- hadoop 2.4 伪分布式模式
1.core-site.xml 在<configuration></configuration>中插入 <property> <name>fs.defa ...
- c#设计模式之单例模式
单例模式(Singleton Pattern )就是为了整个应用程序的生命周期内的任何时刻,类只能创建一个实例. 单线程下的单例模式代码: public class Singleton { priva ...
- 第二条 一个类如果有多个参数,考虑用Builder构造者模式
1. @Data public class Student { //体检用 private String name; private int age; private int height; priv ...
- Windows Server 2008标准证书使用记录
Windows Server 2008标准证书使用记录 近期准备将单位的服务器全部升级到Windows Server 2008,但有一些“遗留”问题需要解决: (1)现在单位还有一台Windows ...
- search支持多种标签
织梦的搜索页面支持dede标签的方法一 打开文件:include/arc.searchview.class.php 找到: require_once(DEDEINC."/taglib/hot ...
- form表单类标签汇总
<form action="form_action.asp" method="get"> First name: <input type=&q ...