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, ...
随机推荐
- Golang新起航!(编译安装go)
别废话,直接上~ linux下安装GO1.8 1.下载go的版本 国内地址源:https://dl.gocn.io/ 在这里选择源码的方式安装,在安装go的时候是需要gcc的,所以你的linux系统需 ...
- js函数前加分号和感叹号的作用
js函数前加分号和感叹号是什么意思?有什么用? 一般看JQuery插件里的写法是这样的 (function($) { //... })(jQuery); 今天看到bootstrap的javascrip ...
- java基础65 JavaScript中的Window对象(网页知识)
1.javaScript组成部分 1.EMCAScript(基本语法) 2.BOM(Browser Object Model):浏览器对象模型 浏览器对象模型中的浏览器的各 ...
- excl筛选求和
Excel中的筛选,是一个很常用的功能.但不知道是有意还是疏忽,Excel没有直接提供在筛选后的一些统计功能,例如求和.平均值等.而由于筛选的主要功能之一就是可以方便快捷的进行变换,所普通的以直接在数 ...
- css同时满足两个类名才有效果的写法
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...
- (三)HttpClient 抓取图片
第一节: HttpClient 抓取图片 这里pom.xml需要用到io输入输出: <dependency> <groupId>commons-io</groupId&g ...
- Effective STL 学习笔记: 多用 vector & string
Effective STL 学习笔记: 多用 vector & string 如果可能的话, 尽量避免自己去写动态分配的数组,转而使用 vector 和 string . 原书作者唯一想到的一 ...
- CVE-2010-0248
[CNNVD]Microsoft Internet Explorer 多个远程代码执行漏洞(CNNVD-201001-237) Microsoft Internet Explorer 6, 6 SP1 ...
- Centos6.5安装步骤(U盘安装)
https://blog.csdn.net/hochoy/article/details/80697454
- 12:输出1到n位最大整数
如果按照最简单的循环输出,会遇到边界问题,n非常大的话,int甚至long都不能满足需求,所以这里需要用数组或者是字符串来表示要输出的数字. 如果面试题给定了一个n位整数,那么就是大数问题,用字符串来 ...