首页 > 其他 > 详细

hiho1258 Osu! Master

时间:2016-11-08 09:47:34      阅读:322      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!