HDU 4706 Children's Day (水题)
Children's Day
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 158    Accepted Submission(s): 72
For example, this is a big 'N' start with 'a' and it's size is 3.
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').
a e
bdf
c g
h n
i mo
jl p
k q
.........
r j
[/pre]
Not all the resultsare listed in the sample. There are just some lines. The ellipsis expresseswhat you should write.
今天比赛的水题。
记录一发
/* *******************************************
Author : kuangbin
Created Time : 2013年09月08日 星期日 12时16分28秒
File Name : 1001.cpp
******************************************* */ #include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std; char str[][];
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int cnt = ;
for(int i = ;i <= ;i++)
{
for(int j = ;j < i;j++)
{
for(int k = ;k < i;k++)
str[j][k] = ' ';
str[j][i] = ;
}
for(int j = ;j < i;j++)
{
str[j][] = 'a' + cnt;
cnt = (cnt+)%;
}
for(int j = i-;j > ;j--)
{
str[j][i--j] = 'a' + cnt;
cnt = (cnt+)%;
}
for(int j = ;j < i;j++)
{
str[j][i-] = 'a' + cnt;
cnt = (cnt+)%;
}
for(int j = ;j < i;j++)
printf("%s\n",str[j]);
} return ;
}
HDU 4706 Children's Day (水题)的更多相关文章
- HDU 5578 Friendship of Frog 水题
		
Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
 - HDU 5590 ZYB's Biology 水题
		
ZYB's Biology Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid ...
 - HDU 5538 L - House Building 水题
		
L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
 - hdu 1005:Number Sequence(水题)
		
Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
 - hdu 1018:Big Number(水题)
		
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
 - hdu 2041:超级楼梯(水题,递归)
		
超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Su ...
 - HDOJ/HDU 1328 IBM Minus One(水题一个,试试手)
		
Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or ...
 - HDOJ(HDU) 2090 算菜价(简单水题、)
		
Problem Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐.现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵. Input ...
 - HDOJ(HDU)  1555  How many days?(水题)
		
Problem Description 8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天? Input 输入包括多个测试实例.每个测试实例包括2个整数M, ...
 
随机推荐
- js权威指南---学习笔记02
			
1.JS只有函数作用域,没有块级作用域这个概念: 它有一个特性——声明提前:在同一个函数中不同位置声明的变量,都被提前在函数开始的时候,执行声明操作:在原先位置执行赋值操作: 2.声明的全局变量,相当 ...
 - No.3 selenium学习之路之鼠标&键盘事件
			
鼠标事件 from selenium.webdriver.common.action_chains import ActionChains contest_click() 右击 double_cli ...
 - 使用JS实现文字搬运工
			
使用JS实现文字搬运工 效果图: 代码如下,复制即可使用: <!DOCTYPE html> <html><head><meta http-equiv=&quo ...
 - ZOJ 3781 Paint the Grid Reloaded(DFS连通块缩点+BFS求最短路)
			
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5268 题目大意:字符一样并且相邻的即为连通.每次可翻转一个连通块X( ...
 - 20155309 《java程序设计》实验四Android程序设计
			
任务一: 完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号 完成这个任务,首先需要了解Android应用程序文件的组成: src目录: 在src目录中 ...
 - 题解-python-CodeForces 1A
			
A. Theatre Square time limit per test 2 seconds memory limit per test 64 megabytes input standard in ...
 - 参数化SQL语句
			
避免SQL注入的方法有两种:一是所有的SQL语句都存放在存储过程中,这样不但可以避免SQL注入,还能提高一些性能,并且存储过程可以由专门的数据库管理员(DBA)编写和集中管理,不过这种做法有时候针对相 ...
 - GUC-12 ScheduledThreadPool
			
import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.Executors ...
 - Spring Boot数据库交互
			
在上篇文件的基础上进行开发,简单实现一下增.查操作,删除和修改类似,作为一个demo就暂时不做重复工作了,实现原理类似 IDEA创建Spring Boot项目 项目结构 新建MySQL数据库相关信息 ...
 - IDEA创建Spring Boot项目
			
首先安装Spring Boot CLI 先确定自己安装的JDK是1.8版本或者以上,然后下载Srping Boot CLI,Spring Boot CLI下载地址,下载下来是一个压缩包,解压,得到一个 ...