NBUT 1219 Time 2010辽宁省赛
Time limit 1000 ms
Memory limit 131072 kB
Digital clock use 4 digits to express time, each digit is described by 3*3 characters (including”|”,”_”and” “).now given the current time, please tell us how can it be expressed by the digital clock.
Input
Each case contains 4 integers in a line, separated by space.
Proceed to the end of file.
Output
Sample Input
1 2 5 6
2 3 4 2
Sample Output
_ _ _
| _||_ |_
||_ _||_|
_ _ _
_| _||_| _|
|_ _| ||_
Hint
The digits showed by the digital clock are as follows:
_ _ _ _ _ _ _ _
| _| _||_||_ |_ ||_||_|| |
||_ _| | _||_| ||_| _||_| 签到题,理清楚就好,代码如下
#include <iostream>
#include<stdio.h>
using namespace std;
int num[];
char s1[][]={
{' ','_',' '},{' ',' ',' '},{' ','_',' '},{' ','_',' '},
{' ',' ',' '},{' ','_',' '},{' ','_',' '},{' ','_',' '},
{' ','_',' '},{' ','_',' '}
};
char s2[][]={
{'|',' ','|'},{' ',' ','|'},{' ','_','|'},{' ','_','|'},
{'|','_','|'},{'|','_',' '},{'|','_',' '},{' ',' ','|'},
{'|','_','|'},{'|','_','|'}
};
char s3[][]={
{'|','_','|'},{' ',' ','|'},{'|','_',' '},{' ','_','|'},
{' ',' ','|'},{' ','_','|'},{'|','_','|'},{' ',' ','|'},
{'|','_','|'},{' ','_','|'}
};
int main()
{
while(~scanf("%d",&num[]))
{
for(int i=;i<;i++)scanf("%d",&num[i]); for(int i=;i<;i++)
for(int j=;j<;j++)
{ printf("%c",s1[num[i]][j]);
}
printf("\n");
for(int i=;i<;i++)
for(int j=;j<;j++)
{
printf("%c",s2[num[i]][j]);
}
printf("\n");
for(int i=;i<;i++)
for(int j=;j<;j++)
{
printf("%c",s3[num[i]][j]);
}
printf("\n"); } return ;
}
NBUT 1219 Time 2010辽宁省赛的更多相关文章
- NBUT 1221 Intermediary 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB It is widely known that any two strangers can get to know ...
- NBUT 1220 SPY 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB The National Intelligence Council of X Nation receives a ...
- NBUT 1217 Dinner 2010辽宁省赛
Time limit 1000 ms Memory limit 32768 kB Little A is one member of ACM team. He had just won the g ...
- NBUT 1224 Happiness Hotel 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB The life of Little A is good, and, he managed to get enoug ...
- NBUT 1222 English Game 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB This English game is a simple English words connection gam ...
- NBUT 1225 NEW RDSP MODE I 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB Little A has became fascinated with the game Dota recent ...
- NBUT 1218 You are my brother 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB Little A gets to know a new friend, Little B, recently. On ...
- NBUT 1223 Friends number 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB Paula and Tai are couple. There are many stories betwee ...
- ZOJ 1985 Largest Rectangle in a Histogram(刷广告)2010辽宁省赛
Largest Rectangle in a Histogram Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21204 ...
随机推荐
- UVa 818 切断圆环链(dfs+二进制枚举)
https://vjudge.net/problem/UVA-818 题意:有n个圆环,其中有一些已经扣在了一起.现在需要打开尽量少的圆环,使得所有圆环可以组成一条链,例如,有5个圆环,1-2,2-3 ...
- nginx 80 端口默认被占用
/etc/nginx/sites-enabled,修改该目录下的default文件, 将默认端口号80改为其他端口号, /etc/nginx/nginx.conf 文件配置里的80端口就会生效
- c++ 静态函数
//对象与对象之间的成员变量是相互独立的.要想共用数据,则需要使用静态成员或静态方法 //#只要在类中声明静态成员变量,即使不定义对象,也可以为静态成员变量分配空间,进而可以使用静态成员变量.(因为静 ...
- jekins,报错 stderr: Could not create directory '/usr/share/tomcat7/.ssh'. Failed to add the host to the list of
public key是在~/.ssh/id_rsa.pub,而private key是~/.ssh/id_rsa 设置的时候,Jenkins需要的是private key
- BN层
论文名字:Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift 论 ...
- Unity 如何在打包的时候执行一些逻辑
1.如果想让unity在打包的过程中,执行一些逻辑,那么该如何做呢?代码如下: using UnityEditor; using UnityEditor.Build; using UnityEngin ...
- English trip -- Phonics 3 元音字母e
xu言: 额...今天给我上自然拼读的maple老师 - . -和上次给我上第二集自然拼读的是同一个老师.突然考了考我上次学的内容~感觉大脑一片空白.看来review不能光说而不下苦功夫啊... 元音 ...
- English trip -- VC(情景课)1 B Countries
Vocabulary focus 核心词汇 Vo ca bu la ry fo cus [və(ʊ)'kæbjʊlərɪ] ['fəʊkəs] Listen and repeat 听并 ...
- LeetCode--125--验证回文串
问题描述: 好 times out: class Solution(object): def isPalindrome(self, s): """ :type s: st ...
- 字 字节 比特,以及各个算数类型所占用的大小范围 c++
字 储存的基本单元,. 1字=4/8字节 字节 byte 字节是计算机中数据处理的基本单元. 1byte=8bit 比特(bit/位) 表示二进制位,计算机内部数据储存的最小单位 例如 1011是一个 ...