2017中国大学生程序设计竞赛 - 女生专场A【模拟】
【题意】:求AC题数和总时长。
【分析】:模拟。设置标记数组记录AC与否,再设置错题数组记录错的次数。罚时罚在该题上,该题没AC则不计入总时间,AC则计入。已经AC的题不用再管,因为不会再罚时。
【代码】:
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
#include<queue>
#define ll long long
#define inf 0x3fffffff
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std; int main()
{
int t;
int n,m;
int x,hh,mm,num,time;
char s[];
int vis[],wa[];//标记AC与否 标记某题WA次数
scanf("%d",&t);
while(t--)
{
num=time=;
mem(vis,);
mem(wa,);
scanf("%d%d",&n,&m);
for(int i=;i<m;i++)
{
scanf("%d%d:%d%s",&x,&hh,&mm,s);
x-=;
if(vis[x])//AC过的不再访问
continue;
if(s[]=='A')//A了的话
{
num++;//A题数++
time+=hh*+mm+wa[x]*;
vis[x]=;
}
else
{
wa[x]++;
}
}
printf("%d %d\n",num,time);
}
}
悲惨七夕
2017中国大学生程序设计竞赛 - 女生专场A【模拟】的更多相关文章
- 2017中国大学生程序设计竞赛 - 女生专场 Deleting Edges(思维+最短路)
Deleting Edges Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) ...
- 2017中国大学生程序设计竞赛 - 女生专场 Happy Necklace(递推+矩阵快速幂)
Happy Necklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) ...
- 2017中国大学生程序设计竞赛 - 女生专场(Graph Theory)
Graph Theory Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)To ...
- 2017中国大学生程序设计竞赛 - 女生专场(dp)
Building Shops Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) To ...
- 2017中国大学生程序设计竞赛 - 女生专场 1002 dp
Building Shops Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) ...
- 2017中国大学生程序设计竞赛 - 女生专场C【前后缀GCD】
C HDU - 6025 [题意]:去除数列中的一个数字,使去除后的数列中所有数字的gcd尽可能大. [分析]: 数组prefixgcd[],对于prefixgcd[i]=g,g为a[0]-a[i]的 ...
- 2017中国大学生程序设计竞赛 - 女生专场B【DP】
B HDU - 6024 [题意]:n个教室,选一些教室建造糖果商店. 每个教室,有一个坐标xi和在这个教室建造糖果商店的花费ci. 对于每一个教室,如果这个教室建造糖果商店,花费就是ci,否则就是与 ...
- HDU 6024(中国大学生程序设计竞赛女生专场1002)
这是CCPC女生专场的一道dp题.大佬们都说它简单,我并没有感到它有多简单. 先说一下题意:在一条直线上,有n个教室,现在我要在这些教室里从左到右地建设一些作为糖果屋,每个教室都有自己的坐标xi 和建 ...
- "巴卡斯杯" 中国大学生程序设计竞赛 - 女生专场
Combine String #include<cstdio> #include<cstring> #include<iostream> #include<a ...
随机推荐
- elasticsearch集群及filebeat server和logstash server
elasticsearch集群及filebeat server和logstash server author:JevonWei版权声明:原创作品blog:http://119.23.52.191/ 实 ...
- 【bzoj5071】[Lydsy十月月赛]小A的数字 乱搞
题目描述 有一串数字 A1,A2...An 每次可以进行如下操作,选择一个数字 i ,将 (Ai-1 , Ai , Ai+1) 变为 (Ai-1 + Ai , -Ai , Ai+1 + Ai) ,特别 ...
- CSS兼容性总结
一.针对IE6的 !important 必须写在前面,例如: background:#9C6 !important;background:#999; 二.CSS HACK //IE6 专用 _heig ...
- CF115B Lawnmower
题目描述 You have a garden consisting entirely of grass and weeds. Your garden is described by an n×mn×m ...
- 周记【距gdoi:126天】
这周比上周好了那么一点点……但还是有点呵呵 搞了仙人掌图(当然不是动态的……),以及一个远古算法2-sat(神奇的对称性运用,需要巨大脑洞的建边). 然后关于高考不加分竞赛被“打压”……大神们都发表了 ...
- CentOS系统缺少库文件解决办法
By francis_hao May 31,2017 程序在编译时出现缺少库文件的提示,如下: as: error while loading shared libraries: libz. ...
- bzoj Gty的超级妹子树 块状树
Gty的超级妹子树 Time Limit: 7 Sec Memory Limit: 32 MBSubmit: 500 Solved: 122[Submit][Status][Discuss] De ...
- react 记录:React Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack
前言: react-router-dom 4.4.2 在页面中直接使用 import { Link } from 'react-router-dom' //使用 <Link to={{ path ...
- 转载:Apache commons开源工具简介
Apache Commons是一个非常有用的工具包,解决各种实际的通用问题,下面是一个简述表,详细信息访问http://jakarta.apache.org/commons/index.html Be ...
- 百练3383:Cell Phone Network
传送门:http://bailian.openjudge.cn/practice/3383/ [题解] 题目就是最小支配集. 学习了最小支配集的解法: 树形dp(有空可以推一推) 贪心:DFS遍历后逆 ...