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

COGS 1051. [Vijos1021] Victoria的舞会1

时间:2017-09-01 23:12:12      阅读:318      评论:0      收藏:0      [点我收藏+]

标签:getch   style   define   ble   void   ++   blank   targe   bit   

1051. [Vijos1021] Victoria的舞会1

#include<bits/stdc++.h>
using namespace std;
#define maxn 2333
int n,m,x,num[maxn<<3],ans;
char ch;
inline void read(int &now)
{
    ch=getchar(); now=0;
    while(ch>9||ch<0) ch=getchar();
    while(ch>=0&&ch<=9) now=now*10+ch-0,ch=getchar();
}
int ac()
{
    freopen("victoria1.in","r",stdin);
    freopen("victoria1.out","w",stdout);
    read(n); read(m);
    for(int i=1;i<=n;i++)
    {
        while(scanf("%d",&x)&&x) num[i]++;
        if(num[i]>=m) ans++;
    }
    printf("%d\n",ans);
    return 0;
}
int i_want_ac=ac();
int main(){;}

 

COGS 1051. [Vijos1021] Victoria的舞会1

标签:getch   style   define   ble   void   ++   blank   targe   bit   

原文地址:http://www.cnblogs.com/chen74123/p/7465224.html

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