超大型led显示屏
来源:互联网 发布:戚家军知乎 编辑:程序博客网 时间:2024/04/28 11:46
#include <iostream>#include <string>using namespace std;int bb[10]={6,2,5,5,4,5,6,3,7,6};int main(){int h,m,s,ghh,gmm,gss,hhh,hmm,hss,score,a1[3],a2[3],homescore,guestscore,sum,time,k=0;string English,English1,hg;while(cin>>English){hg="";homescore=guestscore=0;sum=0;scanf("%d:%d:%d",&a1[0],&a1[1],&a1[2]);hhh=ghh=a1[0];hmm=gmm=a1[1];hss=gss=a1[2];while(cin>>English1){if(English1=="END"){scanf("%d:%d:%d",&a2[0],&a2[1],&a2[2]);int i;time=(a2[0]-hhh)*3600+(a2[1]-hmm)*60+a2[2]-hss;if(homescore<10)sum+=time*bb[homescore];else if(homescore>=10&&homescore<100)sum+=(time*bb[homescore/10]+time*bb[homescore%10]);else if(homescore>=100&&homescore<1000)sum+=(time*bb[homescore/100]+time*bb[homescore%10]+time*bb[homescore/10%10]);time=(a2[0]-ghh)*3600+(a2[1]-gmm)*60+a2[2]-gss;homescore+=score;if(guestscore<10)sum+=time*bb[guestscore];else if(guestscore>=10&&guestscore<100)sum+=(time*bb[guestscore/10]+time*bb[guestscore%10]);else if(guestscore>=100&&guestscore<1000)sum+=(time*bb[guestscore/100]+time*bb[guestscore%10]+time*bb[guestscore/10%10]);guestscore+=score;break;}else if(English1=="SCORE"){scanf("%d:%d:%d",&h,&m,&s);cin>>hg>>score;if(hg=="home"){time=(h-hhh)*3600+(m-hmm)*60+s-hss;if(homescore<10)sum+=time*bb[homescore];else if(homescore>=10&&homescore<100)sum+=(time*bb[homescore/10]+time*bb[homescore%10]);else if(homescore>=100&&homescore<1000)sum+=(time*bb[homescore/100]+time*bb[homescore%10]+time*bb[homescore/10%10]);homescore+=score;hhh=h;hmm=m;hss=s; }else{time=(h-ghh)*3600+(m-gmm)*60+s-gss;if(guestscore<10)sum+=time*bb[guestscore];else if(guestscore>=10&&guestscore<100)sum+=(time*bb[guestscore/10]+time*bb[guestscore%10]);else if(guestscore>=100&&guestscore<1000)sum+=(time*bb[guestscore/100]+time*bb[guestscore%10]+time*bb[guestscore/10%10]);guestscore+=score;ghh=h;gmm=m;gss=s; }}}cout<<"Case "<<++k<<": "<<sum<<endl;}return 0;}
0 0
- 超大型LED显示屏
- 超大型LED显示屏
- 超大型LED显示屏
- CSU_1507_超大型LED显示屏
- 超大型led显示屏
- O-超大型LED显示屏
- 超大型LED显示屏
- 超大型LED显示屏
- CSU 1507 超大型LED显示屏
- CSU 1507 超大型LED显示屏
- CSU-1507 超大型LED显示屏
- CSU OJ1507超大型LED显示屏
- 超大型LED显示屏(模拟)
- 湖南2014CPC 超大型LED显示屏
- CSU1507 超大型LED显示屏_模拟题
- CSU 1507: 超大型LED显示屏(数学啊)
- csu 1507: 超大型LED显示屏(要重新敲一遍)
- 湖南省第十届大学生计算机程序设计竞赛(原题) 第E题 超大型LED显示屏
- ffmpeg交叉编译
- 深度学习-开源框架了解(还在继续)
- Android 常用辅助工具类Utils总结
- 缓存注解 Cachealble CacheEvict CachePut 浅谈,以及conditions和ulessSpEL表达式
- java总结系列之反射机制
- 超大型led显示屏
- 打开当前程序集文件的方法
- poj1328Rader_installation
- Redis是什么?
- 自动抢红包,自动安装原理之AccessibilityService
- 从《硅谷之谜》找到创新的基因-叛逆与宽容
- eclipse+maven+mahout :环境搭建+推荐
- quick-cocos2d-x button使用方法(UIPushButton、UICheckBoxButton、UICheckBoxButtonGroup)
- mybatis_gennerator