脑子有点秀逗

 #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的更多相关文章

  1. codeforces@281 B

    shui #include<iostream> #include<cstdio> #include<cstring> #include<algorithm&g ...

  2. Codeforces Round #281 (Div. 2)

    题目链接:http://codeforces.com/contest/493 A. Vasya and Football Vasya has started watching football gam ...

  3. Codeforces Round #281 (Div. 2) 解题报告

    题目地址:http://codeforces.com/contest/493 A题 写完后就交了,然后WA了,又读了一遍题,没找出错误后就开始搞B题了,后来回头重做的时候才发现,球员被红牌罚下场后还可 ...

  4. Codeforces Round #281 (Div. 2) D(简单博弈)

    题目:http://codeforces.com/problemset/problem/493/D 题意:一个n*n的地图,有两个人在比赛,第一个人是白皇后开始在(1,1)位置,第二个人是黑皇后开始在 ...

  5. Codeforces Round #281 (Div. 2) B. Vasya and Wrestling 水题

    B. Vasya and Wrestling 题目连接: http://codeforces.com/contest/493/problem/B Description Vasya has becom ...

  6. Codeforces Round #281 (Div. 2) A. Vasya and Football 模拟

    A. Vasya and Football 题目连接: http://codeforces.com/contest/493/problem/A Description Vasya has starte ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. 循环语句第3种 FOR ... in ... LOOP END LOOP;

    --------第3种--------  FOR ... in ... LOOP  END LOOP;    BEGIN    FOR i IN 1..10 LOOP      dbms_output ...

  2. NYIST 749 蚂蚁的难题(八)

    蚂蚁的难题(八)时间限制:2000 ms | 内存限制:65535 KB难度:5 描述蚂蚁是一个古玩爱好者,他收藏了很多瓶瓶罐罐. 有一天,他要将他的宝贝们一字排开, 摆放到一个长度为L的展台上. 已 ...

  3. echarts 柱状图和饼状图动态获取后台数据

    运用echarts来实现图表 1.首先下载echarts包  http://echarts.baidu.com/echarts2/doc/example.html,在这里我下载的是 2.将echart ...

  4. java ee5的新特性

    1.标注 一种元数据,作用分为三类:编写文档@Document.代码分析@Deparecated(过时的)和编译检查@override(重写) 2.EJB3 EJB2的升级版,商业化的java bea ...

  5. Android用canvas画哆啦A梦

    先上图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/diss ...

  6. 从头认识java-16.4 nio的读与写(ByteBuffer的使用)

    这一章节我们来讨论一下nio的读与写. 1.nio的读 package com.ray.ch16; import java.io.IOException; import java.io.RandomA ...

  7. bzoj2663: [Beijing wc2012]灵魂宝石(二分+匈牙利)

    2663: [Beijing wc2012]灵魂宝石 题目:传送门 题解: 又是一道卡精度的题目. 很容易就可以看出单调性啊,如果R越大,选的人就越多,R越小,选的人就越少. 那最小值就直接搞咯. 那 ...

  8. HTTP学习记录

    title: HTTP学习记录 toc: true date: 2018-09-21 20:40:48 HTTP协议,HyperText Transfer Protocol,超文本传输协议,是因特网上 ...

  9. java类型与Hadoop类型之间的转换

    java基本类型与Hadoop常见基本类型的对照Long LongWritableInteger   IntWritableBoolean   BooleanWritable String Text ...

  10. 你不知道的JavaScript(五)内置对象模版

    尽管JavaScript中有对象的概念,但一般我们并不说JavaScript是面向对象的编程语言,因为它不具备面向对象的一些最基本特征. 在c++/Java等这些面向对象的编程语言中,我们要定义一个对 ...