0
已采纳
岳成浩
资深守护
资深守护
自己想
岳成浩在2021-02-04 16:32:11追加了内容
int cnt=0;
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i].name>>a[i].x>>a[i].y>>a[i].m>>a[i].d;
if(a[i].x=='M'){
cnt++;
}
}
for(int i=1;i<=n;i++){
cout<<a[i].name<<" ";
cout<<a[i].x<<" ";
cout<<a[i].y<<" ";
cout<<a[i].m<<" ";
cout<<a[i].d<<endl;;
}
cout<<cnt;
核心
0