HDU 4706 Children\'s Day

http://vjudge.net/contest/view.action?cid=53024#problem/A

Children's Day

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1266    Accepted Submission(s): 812


Problem Description
Today is Children's Day. Some children ask you to output a big letter 'N'. 'N' is constituted by two vertical linesand one diagonal. Each pixel of this letter is a character orderly. No tail blank is allowed.
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').
 

Input
This problem has no input.
 

Output
Output different 'N' from size 3 to size 10. There is no blank line among output.
 

Sample Output
    
    
[pre] a e bdf c g h n i mo jl p k q ......... r j [/pre]
Hint
Not all the resultsare listed in the sample. There are just some lines. The ellipsis expresseswhat you should write.
 

Source
 

Recommend
liuyiding   |   We have carefully selected several similar problems for you:   5177  5176  5175  5173  5172 

#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<vector>
#include<cmath>
#include<stdlib.h>
#include<iomanip>
#include<list>
#include<deque>
#include<map>
#include <stdio.h>
#include <queue>

#define maxn 10000+5
#define ull unsigned long long
#define ll long long
#define reP(i,n) for(i=1;i<=n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define cle(a) memset(a,0,sizeof(a))
#define mod 90001
#define PI 3.141592657

const ull inf = 1LL << 61;
const double eps=1e-5;

using namespace std;

bool cmp(int a,int b){
return a>b;
}

char a[110][110];
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);

int num=0;
for(int i=3;i<=10;i++)
{ memset(a,'0',sizeof(a));
for(int j=1;j<=i;j++)
{

if(num==26)num=0;
a[j][1]=num+'a';
num++;
}
int j=i-1,k=2;
while(j>=2&&k<=i-1)
{
if(num==26)num=0;
a[j--][k++]=num+'a';
num++;
}
for(int j=1;j<=i;j++)
{

if(num==26)num=0;
a[j][i]=num+'a';
num++;
}
for(int p=1;p<=i;p++)
{ for(int q=1;q<=i;q++)
if(a[p][q]=='0')cout<<" ";
else
cout<<a[p][q];
cout<<endl;
}
}
return 0;
}

这道题我感觉是模拟,因为是模拟| /  |的画法进行写程序的,还是听好写的,当然也有人打表把这些字母都打出来也行。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值