1258: Time

时间限制: 1 Sec  内存限制: 128 MB
提交: 16  解决: 11
[提交][状态][讨论版]

题目描述

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.

输入

There are several test cases.

Each case contains 4 integers in a line, separated by space.

Proceed to the end of file.

输出

For each test case, output the time expressed by the digital clock such as Sample Output.

样例输入

1 2 5 6
2 3 4 2

样例输出

    _  _  _
| _||_ |_
||_ _||_|
_ _ _
_| _||_| _|
|_ _| ||_
#include<iostream>
#include<cstring>
#include<cstdio> using namespace std; int main(){
int a[];
while(scanf("%d %d %d %d", &a[], &a[], &a[], &a[]) == ){
for(int i = ; i <= ; i++){
for(int j = ; j < && i == ; j++){
if(a[j] == || a[j] == ) printf(" ");
else printf(" _ ");
}
for(int j = ; j < && i == ; j++){
switch(a[j]){
case : case :
case : printf("|_|"); break;
case :
case : printf(" |"); break;
case :
case : printf(" _|"); break;
case :
case : printf("|_ "); break;
case : printf("| |"); break;
}
}
for(int j = ; j < && i == ; j++){
switch(a[j]){
case : case :
case : printf(" |"); break;
case : printf("|_ "); break;
case : case :
case : printf(" _|"); break;
case : case :
case : printf("|_|"); break;
}
}
printf("\n");
}
}
}

HNUSTOJ-1258 Time的更多相关文章

  1. hdu 1258 Sum It Up(dfs+去重)

    题目大意: 给你一个总和(total)和一列(list)整数,共n个整数,要求用这些整数相加,使相加的结果等于total,找出所有不相同的拼凑方法. 例如,total = 4,n = 6,list = ...

  2. POJ 1258

    http://poj.org/problem?id=1258 今天晚上随便找了两道题,没想到两道都是我第一次碰到的类型———最小生成树.我以前并没有见过,也不知道怎么做,然后就看书,思路很容易理解 但 ...

  3. hdoj - 1258 Sum It Up && hdoj - 1016 Prime Ring Problem (简单dfs)

    http://acm.hdu.edu.cn/showproblem.php?pid=1258 关键点就是一次递归里面一样的数字只能选一次. #include <cstdio> #inclu ...

  4. poj - 1258 Agri-Net (最小生成树)

    http://poj.org/problem?id=1258 FJ为了竞选市长,承诺为这个地区的所有农场联网,为了减少花费,希望所需光纤越少越好,给定每两个农场的花费,求出最小花费. 最小生成树. # ...

  5. [TimusACM][1258]程序员撞墙的问题

    (本文是从我的旧博客迁移过来的) 问题地址:http://acm.timus.ru/problem.aspx?space=1&num=1258 前几日在博客园看到这种在线测试的时候,有一种相见 ...

  6. 最小生成树 10.1.5.253 1505 poj 1258 http://poj.org/problem?id=1258

    #include <iostream>// poj 1258 10.1.5.253 1505 using namespace std; #define N 105 // 顶点的最大个数 ( ...

  7. 【hihocoder 1258 Osu! Master】

    2015北京区域赛现场赛签到题. 题面:http://media.hihocoder.com/contests/icpcbeijing2015/problems.pdf OJ链接:http://hih ...

  8. hdoj 1258 SUM IT UP

    程序的思想是:输入数据是,先使用快排对其从大到小进行排序,然后记录相同数据的个数,比如4 3 3 2 2 1 1,最后的数据变成4 3 2 1 ,并且同时数据的个数f[]变成1 2 2 2 然后就是遍 ...

  9. lightOJ 1258 Making Huge Palindromes(KMP)

    题目链接:http://lightoj.com/volume_showproblem.php?problem=1258 就是求逆串和原串的匹配长度 答案就是原串长度的2倍减去匹配长度即可 第一次我将原 ...

  10. 51NOD 1258 序列求和 V4 [任意模数fft 多项式求逆元 伯努利数]

    1258 序列求和 V4 题意:求\(S_m(n) = \sum_{i=1}^n i^m \mod 10^9+7\),多组数据,\(T \le 500, n \le 10^{18}, k \le 50 ...

随机推荐

  1. 编译依赖ndt_gpu库的包,遇到Eigen报错

    背景: 使用NDT建图,帧率比较慢,打算使用gpu加速计算. ndt_gpu是一个使用gpu加速ndt计算的库,首先在工作空间编译这个包. 然后在ndtMap包中链接这个库,其CMakelists.t ...

  2. 【转载】What is the difference between authorized_keys and known_hosts file for SSH?

    The known_hosts file lets the client authenticate the server, to check that it isn't connecting to a ...

  3. jenkins 管理员密码重置

    jenkins管理员 admin的密码忘记怎么重置呢? 修改admin的加密密码为123456的加密密码 #jbcrypt:$2a$10$MiIVR0rr/UhQBqT.bBq0QehTiQVqgNp ...

  4. 【转载】opencv 二值化函数——cv2.threshold

    https://blog.csdn.net/weixin_38570251/article/details/82079080 threshold:固定阈值二值化, ret, dst = cv2.thr ...

  5. Springboot 构建http服务,返回的http行是'HTTP/1.1 200' 无状态码描述 客户端解析错误

    ————————————————————————————————————————— *** 响应的数据格式  HTTP/1.1 200 OK  Server: Apache-Coyote/1.1  A ...

  6. selenium+键盘鼠标

    一.简单操作 1.点击(鼠标左键)页面按钮:click() 2.请空输入框:clear() 3.输入字符串:send_keys() 二.模拟键盘 模拟键盘的操作需要先导入键盘模块:from selen ...

  7. 白鹭http请求post

    示例demo: //new http请求 var request = new egret.HttpRequest(); //请求参数 var params = "p1=postP1& ...

  8. iptables添加、删除端口

    简洁才是王道, 下面是添加一个udp端口,端口号8566,即接收到8566端口的所有udp包 /sbin/iptables -I INPUT -p udp --dport -j ACCEPT 要删除这 ...

  9. babel-node 和 nodemon

    概述 今天我继续完善我做的用来 mock 前端数据的库:ym-mock. 我想要实现 2 个需求: 支持 es6,至少要能 import 吧. 修改了代码之后能自动热更新,不能我修改了服务器代码要手动 ...

  10. 你知道 Git 是如何做版本控制的吗?(转)

    总结:阅读这篇文章需要20分钟 本文是转载自 滴滴WebApp架构组 的一篇文章,文章讲解了神秘的.git目录下的一些文件,最终阐述了git是如何存储数据,及git分支的相关内容. git如何存储数据 ...