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 ...
随机推荐
- JavaScript权威指南--脚本化HTTP
知识要点 超文本传输协议(HTTP)规定web浏览器如何从web服务器获取文档和向web服务器发送表单内容,以及web服务器如何响应这些请求和提交.web浏览器会处理大量的HTTP.通常,HTTP并不 ...
- 610D - Vika and Segments(线段树+扫描线+离散化)
扫描线:http://www.cnblogs.com/scau20110726/archive/2013/04/12/3016765.html 看图,图中的数字是横坐标离散后对应的下标,计算时左端点不 ...
- HTML表单格式化
HTML表单格式化 一.说明 用table布局 二.效果 三.代码 <!DOCTYPE html> <html> <head> <title>Form. ...
- jsp/servlet区别
简介: JSP全名为Java Server Pages,中文名叫java服务器页面,其根本是一个简化的Servlet设计,它是由Sun Microsystems公司倡导.许多公司参与一起建立的一种动态 ...
- PyQt5-GUI生成随机生成小工具
自己修改了代码:实现了自动生成SSN,手机号和姓名的功能 import sys from PyQt5.QtGui import * from PyQt5.QtWidgets import * from ...
- JDBC 与 Bean Shell的使用(二)获取值,并且断言
这里我们使用的断言方式是BeanShell断言,做一个新增功能的接口测试, 1.发一个post请求,新增测试数据,然后做一个返回数据的响应断言-------大部分人都可以实现这个功能 2.如果是后台业 ...
- English trip -- VC(情景课)10 B Around the house 在家里
Vocablulary focus 核心词汇 cook play the guitar listen to music watch TV read magazines work in the gar ...
- 4-3 atom订阅源
部分章节还没有实做练习. 网上购买了安道的Rails指南中文版.联系了这个作者问了一个问题Rails5的翻译问题. try(), 判断是否存在,不存在的话返回nil.例子:pasting @perso ...
- codeforces 930b//Game with String// Codeforces Round #468 (Div. 1)
题意:一个串,右循环移位后,告诉你第一个字母,还能告诉你一个,问你能确定移位后的串的概率. 用map记录每个字母出现的位置.对于每个字母,用arr[j][k]记录它的所有出现位置的后j位是字母k的个数 ...
- vs2015下通过opencv使用hdf5
因为使用Kinect SDK编程,又需求高速文件I/O,所以通过opencv接口使用hdf5. (opencv 3.1以上版本,在其Extra Modules中支持hdf5) 一. 环境 OS: Wi ...