20分的蒟蒻求助!!!
查看原帖
20分的蒟蒻求助!!!
995569
L__B楼主2023/10/29 13:58
#include<bits/stdc++.h>
using namespace std;
struct xx{
    string xm;
    float tw;
    int ks;
}br[200];
string s[200]; int n,m;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        cin>>br[i].xm>>br[i].tw>>br[i].ks;
        if(br[i].tw>=38.5&&br[i].ks)
          s[++m]=br[i].xm;
    }
    for(int i=1;i<=m;i++) cout<<s[i]<<"\n";
    printf("%d",m);
    return 0;
}
2023/10/29 13:58
加载中...