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, ...
随机推荐
- Python爬虫之三种网页抓取方法性能比较
下面我们将介绍三种抓取网页数据的方法,首先是正则表达式,然后是流行的 BeautifulSoup 模块,最后是强大的 lxml 模块. 1. 正则表达式 如果你对正则表达式还不熟悉,或是需要一些提 ...
- 【鬼脸原创】谷歌扩展--知乎V2.0
目的: 用键盘替代鼠标,做一个安静刷知乎的美男(女)子! 功能: 功能 按键 说明 直接定位到搜索框 q 打开 首页 w 打开 话题 e 打开 发现 r 打开 消息 m 打开 ...
- java基础62 JavaScript中的函数(网页知识)
1.JavaScript中,函数的格式 function 函数名(形参列表){ 函数体; } 2.JavaScript中,函数需要注意的细节 1.在javaScript中,函数定义形参时,是不能使用v ...
- (四)HttpClient 使用代理 IP
第一节: HttpClient 使用代理 IP 在爬取网页的时候,有的目标站点有反爬虫机制,对于频繁访问站点以及规则性访问站点的行为,会采集屏蔽IP措施. 这时候,代理IP就派上用场了. 关于代理IP ...
- sqlserver中的循环遍历(普通循环和游标循环)(转载)
sql 经常用到循环,下面介绍一下普通循环和游标循环 1.首先需要一个测试表数据Student
- Java 之 JDBC
mysql : //****** 四大金刚: 驱动类名.url.用户名.密码 //MySQL四大金刚 String driverClassname="com.mysql.jdbc.Drive ...
- CROC 2016 - Elimination Round (Rated Unofficial Edition) F - Cowslip Collections 数论 + 容斥
F - Cowslip Collections http://codeforces.com/blog/entry/43868 这个题解讲的很好... #include<bits/stdc++.h ...
- html5+css3 h5页面生成的思路
<!DOCTYPE html><html style="height: 100%;"> <head> <meta charset=&quo ...
- 洛谷P4645 [COCI2006-2007 Contest#7] BICIKLI [Tarjan,拓扑排序]
题目传送门 BICIKLI 题意翻译 给定一个有向图,n个点,m条边.请问,1号点到2号点有多少条路径?如果有无限多条,输出inf,如果有限,输出答案模10^9的余数. 两点之间可能有重边,需要看成是 ...
- 虚拟机hadoop集群搭建
hadoop tar -xvf hadoop-2.7.3.tar.gz mv hadoop-2.7.3 hadoop 在hadoop根目录创建目录 hadoop/hdfs hadoop/hdfs/tm ...