#include<stdio.h> #include<string.h> #define maxn 100 char name[maxn]; char s[30]; int main() { int i,j,t,n,ff=0,flag; int y1,y2,y3,y4;//无错 有错 全错 缺席 scanf("%d",&t); while(t--) { scanf("%d",&n); y1=y2=y3=y4=0; for(i=0;i<n;i++) { flag=0; scanf("%s",name); int temp=0; if(getchar()==' ') flag=1; int tt=0; while(1) { if(flag)break; scanf("%s",s); temp++; if(strcmp(s,"")==0)break; if(s[0]=='y') { tt=1; if(temp==1) { y1++; } else { y2++; } break; } if(temp==5)break; } if(temp==0) y4++; if(!tt&&temp!=0) y3++; } printf("Roll-call: %d ",++ff); printf("Present: %d out of %d ",y1,n); printf("Needs to study at home: %d out of %d ",y2,n); printf("Needs remedial work after school: %d out of %d ",y3,n); printf("Absent: %d out of %d ",y4,n); } }