codeforces#281 A
脑子有点秀逗
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int teama[]={};
int teamb[]={};
int main()
{
string away,home;
cin>>home>>away;
int n;
cin>>n;
for(int i=;i<n;i++)
{
int nu,time;
string ca,peo;
cin>>time>>peo>>nu>>ca;
if(peo=="h"){
if(ca=="r"&&teama[nu]!=-){
cout<<home<<" "<<nu<<" "<<time<<endl;
teama[nu]=-;
}
if(ca=="y"){
if(teama[nu]==){
cout<<home<<" "<<nu<<" "<<time<<endl;
teama[nu]=-;
}
if(teama[nu]!=-)
teama[nu]++;
}
}
else{
if(ca=="r"&&teamb[nu]!=-){
cout<<away<<" "<<nu<<" "<<time<<endl;
teamb[nu]=-;
}
if(ca=="y"){
if(teamb[nu]==)
{
cout<<away<<" "<<nu<<" "<<time<<endl;
teamb[nu]=-;
}
if(teamb[nu]!=-)
teamb[nu]++;
}
}
}
return ;
}
codeforces#281 A的更多相关文章
- codeforces@281 B
shui #include<iostream> #include<cstdio> #include<cstring> #include<algorithm&g ...
- Codeforces Round #281 (Div. 2)
题目链接:http://codeforces.com/contest/493 A. Vasya and Football Vasya has started watching football gam ...
- Codeforces Round #281 (Div. 2) 解题报告
题目地址:http://codeforces.com/contest/493 A题 写完后就交了,然后WA了,又读了一遍题,没找出错误后就开始搞B题了,后来回头重做的时候才发现,球员被红牌罚下场后还可 ...
- Codeforces Round #281 (Div. 2) D(简单博弈)
题目:http://codeforces.com/problemset/problem/493/D 题意:一个n*n的地图,有两个人在比赛,第一个人是白皇后开始在(1,1)位置,第二个人是黑皇后开始在 ...
- Codeforces Round #281 (Div. 2) B. Vasya and Wrestling 水题
B. Vasya and Wrestling 题目连接: http://codeforces.com/contest/493/problem/B Description Vasya has becom ...
- Codeforces Round #281 (Div. 2) A. Vasya and Football 模拟
A. Vasya and Football 题目连接: http://codeforces.com/contest/493/problem/A Description Vasya has starte ...
- Codeforces Round #281 (Div. 2) D. Vasya and Chess 水
D. Vasya and Chess time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- Codeforces Round #281 (Div. 2) C. Vasya and Basketball 二分
C. Vasya and Basketball time limit per test 2 seconds memory limit per test 256 megabytes input stan ...
- Codeforces Round #281 (Div. 2) D. Vasya and Chess 镜面对称 博弈论
D. Vasya and Chess time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
随机推荐
- Nodejs RESTFul架构实践之api篇(转)
why token based auth? 此段摘自 http://zhuanlan.zhihu.com/FrontendMagazine/19920223 英文原文 http://code.tuts ...
- 【转载】黑客内核:编写属于你的第一个Linux内核模块
黑客内核:编写属于你的第一个Linux内核模块
- 调用支付宝SDK问题
近期做了一个项目里面要有支付.银联.支付宝,微信支付 我先一个一个写吧 先说支付宝SDK 支付宝SDK放进project里面之后肯定会报错.这时候你就要一个一个改掉 1. 2. 3. 哎 我懒得写了. ...
- 使用excel进行数据挖掘(6)---- 预測
在配置环境后,能够使用excel进行数据挖掘. 环境配置问题可參阅: http://blog.csdn.net/xinxing__8185/article/details/46445435 例子 DM ...
- NOIP2012 T3开车旅行 set+倍增
70分做法: 先预处理出所有点的最近和次近(O(n^2)一遍就OK) 然后暴力求出每个解(O(nm)) //By SiriusRen #include <cstdio> #include ...
- autocomplete="off" 不起作用解决方案
autocomplete属性是表单字段中的HTML5新属性,该属性有两种状态值,分别为"on" 和 "off",该属性可省略:省略属性值后默认值为"o ...
- APP信息获取接口
https://itunes.apple.com/lookup?id=APPID&callback=2 http://myapp.com/cgi-bin/mapp/mapp_info?type ...
- swift语言点评十八-异常与错误
1.错误类型与枚举的结合 enum VendingMachineError: Error { case invalidSelection case insufficientFunds(coinsNee ...
- Matplotlib 画廊
https://matplotlib.org/gallery.html
- 路飞学城Python-Day15
模拟实现一个ATM + 购物商城程序 额度 15000或自定义 实现购物商城,买东西加入 购物车,调用信用卡接口结账 可以提现,手续费5% 支持多账户登录 支持账户间转账 记录每月日常消费流水 提供还 ...