COGS 1051. [Vijos1021] Victoria的舞会1

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(){;}

 

posted @ 2017-09-01 21:57  Alex丶Baker  阅读(187)  评论(0编辑  收藏  举报