HDU 4706 Children Day

本文详细解读了一道编程模拟题,题目要求输出从大小3到10的不同样式字母N,每个N由连续的字符组成,且遵循特定的结构规则。文章通过代码示例展示了如何实现这一过程,并提供了输出样例作为参考。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


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


把一道模拟题做成这样,我也是醉了,这个还是最早看过一个ACMer的博客,才这样写的。。。

# include<cstdio>
# include<iostream>
# include<cstring>
using namespace std;

int main(void)
{
    printf("a e\nbdf\nc g\n");
    printf("h  n\ni mo\njl p\nk  q\n");
    printf("r   z\ns  ya\nt x b\nuw  c\nv   d\n");
    printf("e    o\nf   np\ng  m q\nh l  r\nik   s\nj    t\n");
    printf("u     g\nv    fh\nw   e i\nx  d  j\ny c   k\nzb    l\na     m\n");
    printf("n      b\no     ac\np    z d\nq   y  e\nr  x   f\ns w    g\ntv     h\nu      i\n");
    printf("j       z\nk      ya\nl     x b\nm    w  c\nn   v   d\no  u    e\np t     f\nqs      g\nr       h\n");
    printf("i        a\nj       zb\nk      y c\nl     x  d\nm    w   e\nn   v    f\no  u     g\np t      h\nqs       i\nr        j\n");

    return 0;
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值