码迷,mamicode.com
首页 > 其他好文 > 详细

hiho1258 Osu! Master

时间:2016-11-08 09:48:30      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:多少   top   com   题目   blank   pen   use   user   ring   

题目链接: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 }

 

hiho1258 Osu! Master

标签:多少   top   com   题目   blank   pen   use   user   ring   

原文地址:http://www.cnblogs.com/as3asddd/p/6041546.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!