HDU 6077 17多校4 Time To Get Up 水题
Little Q's clock uses a standard 7-segment LCD display for all digits, plus two small segments for the '':'', and shows all times in a 24-hour format. The '':'' segments are on at all times.

Your job is to help Little Q read the time shown on his clock.
In each test case, there is an 7×21 ASCII image of the clock screen.
All digit segments are represented by two characters, and each colon segment is represented by one character. The character ''X'' indicates a segment that is on while ''.'' indicates anything else. See the sample input for details.
题意:把字符串翻译成时间。
题解:直接利用他们的区别判断即可。
#include <iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<map>
#include<vector>
#include<cmath>
#include<cstring>
using namespace std; char time[+][+];
int check(int i)
{
int j;
if(time[][i]=='X')
{
if(time[][i+]=='.')
return ;
else if(time[][i]=='.')
return ;
else if(time[][i+]=='.')
return ;
else
return ;
}
else
{
if(time[][i]=='X')
{
if(time[][i+]=='X')
{
if(time[][i+]=='X')
return ;
else
return ;
}
else
return ;
}
else
{
if(time[][i+]=='.')
{
if(time[][i+]=='X')
return ;
else
return ;
}
else
return ;
}
}
} int main()
{
int a,b,c,d;
int T;
scanf("%d",&T);
while(T--)
{
for(int i=;i<=;i++)
for(int j=;j<=;j++)
cin>>time[i][j];
a=check();
b=check();
c=check();
d=check();
printf("%d%d:%d%d\n",a,b,c,d);
}
return ;
}
HDU 6077 17多校4 Time To Get Up 水题的更多相关文章
- HDU 6124 17多校7 Euler theorem(简单思维题)
Problem Description HazelFan is given two positive integers a,b, and he wants to calculate amodb. Bu ...
- HDU 6106 17多校6 Classes(容斥简单题)
Problem Description The school set up three elective courses, assuming that these courses are A, B, ...
- HDU 6049 17多校2 Sdjpx Is Happy(思维题difficult)
Problem Description Sdjpx is a powful man,he controls a big country.There are n soldiers numbered 1~ ...
- HDU 6140 17多校8 Hybrid Crystals(思维题)
题目传送: Hybrid Crystals Problem Description > Kyber crystals, also called the living crystal or sim ...
- HDU 6143 17多校8 Killer Names(组合数学)
题目传送:Killer Names Problem Description > Galen Marek, codenamed Starkiller, was a male Human appre ...
- HDU 6045 17多校2 Is Derek lying?
题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=6045 Time Limit: 3000/1000 MS (Java/Others) Memory ...
- HDU 3130 17多校7 Kolakoski(思维简单)
Problem Description This is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This seq ...
- HDU 6038 17多校1 Function(找循环节/环)
Problem Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. D ...
- HDU 6034 17多校1 Balala Power!(思维 排序)
Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He want ...
随机推荐
- 【Oracle】【1】查询N分钟之前的数据
--查询距离现在N分钟前的数据 1440:表示一天有1440分钟 SYSDATE - 10 :表示10天前 参考博客: 1,oracle 查询十分钟之前的数据 - 胡金水的博客 - CSDN博客 ht ...
- oracle 基本操作--事务
事务:可以看做是由对数据可的若干操作组成的一个单元,浙西操作要么都完成,要么都取消,从而保证数据满足一致性的要求. 事务的组成: 一条或者多条DML 一条DDL 一条DCL DML语句需要使用comm ...
- Oracle11g温习-第十四章:约束( constraint )
2013年4月27日 星期六 10:48 1.约束的功能 通过一些强制性商业规则,保证数据的完整性.一致性 2.约束的类别 1 ) not null 不允许为空 2 ) check ...
- 平面最近点对模板[luogu P1429]
%:pragma GCC optimize() #include<bits/stdc++.h> #define DB double #define m (((l)+(r))>> ...
- [CodeForces - 447E] E - DZY Loves Fibonacci Numbers
E DZY Loves Fibonacci Numbers In mathematical terms, the sequence Fn of Fibonacci numbers is define ...
- 自定义putty主题
PuTTY很早之前就没有更新了(0.62),因为都是开源的所以有人branch出来做了增强,如这个PuTTY tray,增加了超链等功能: https://puttytray.goeswhere.co ...
- 【转】Vue-详解设置路由导航的两种方法: <router-link :to="..."> 和router.push(...)
一.<router-link :to="..."> to里的值可以是一个字符串路径,或者一个描述地址的对象.例如: // 字符串 <router-link to= ...
- Angular4.x 引入第三方 JS
引入 Jquery 使用 angular-cli 新建 angular项目 1.安装 jquery npm install jquery --save 2..angular-cli.json 中引入 ...
- Linux 下Qt实现守护进程实例(转)
原文地址:Linux守护进程的编程方法(含实例) 作者:lingdxuyan 参考文献 Linux信号列表(zz) Linux 守护进程的编程方法 linux上编写守护进程的例程 Linux下后台守 ...
- 小程序BindTap快速连续点击页面跳转多次
原因: 手机端点击Tap基础事件解决300ms延迟 解决办法: success 里面加一个延迟300ms能解决 setTimeout goRob(e) { const that = this retu ...