hiho1258 Osu! Master

题目链接:http://hihocoder.com/problemset/problem/1258

题目大意:看能连击的次数

思路:水 看有多少个1和s就好了

 1 #include <stdio.h>
 2 #include <string.h>
 3 #include <iostream>
 4 using namespace std;
 5 char str[10];
 6 const int maxn=10000;
 7 int main(){
 8     int n;
 9     //freopen("C:\\Users\\acm\\Desktop\\2015Beijing\\in.txt","r",stdin);
10     while(scanf("%d",&n)!=EOF){
11         int cnt=0,x;
12         for(int i=1;i<=n;i++){
13             scanf("%s",str);
14             if(str[0]=='S') cnt++;
15             else {
16                 scanf("%d",&x);
17                 if(x==1) cnt++;
18             }
19         }
20         printf("%d\n",cnt);
21     }
22     return 0;
23 }

 

posted @ 2016-11-08 09:34  as3asddd  阅读(135)  评论(0编辑  收藏  举报