acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 题解

    userId_undefined

    zsy

    秩序白银
    55阅读
    0回复
    1点赞
  • 答案

    #include<bits/stdc++.h> using namespace std; struct node{ string name; int w,r,j,z; }a[200005]; bool cmp(node a, node b){ if(a.w!=b.w) return a.w>b.w; else if(a.r != b.r) return a.r>b.r; else if(a.j != b.j) return a.j>b.j; else return a.z<b.z; } int main(){ int n, idx = 0; cin>>n; for(int i=0;i<n;i++){ string s; int b,c,d; cin>>s>>b>>c>>d; if(b>200) cout<<s<<endl; else{ a[idx].name=s; a[idx].w=b; a[idx].r=c; a[idx].j=d; a[idx].z=idx; idx++; } } sort(a,a+idx,cmp); for(int i=0;i<idx;i++) cout<<a[i].name<<endl; return 0; }

    userId_undefined

    鲁玮博

    倔强青铜
    33阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; struct node{ string name; int w , r , j , z; }a[200005]; bool cmp(node a , node b){ if(a.w != b.w) return a.w>b.w; else if(a.r != b.r) return a.r>b.r; else if(a.j != b.j) return a.j>b.j; else return a.z<b.z; } int main(){ int n , idx = 0; cin>>n; for(int i=0;i<n;i++){ string s; int b,c,d; cin>>s>>b>>c>>d; if(b>200) cout<<s<<endl; else{ a[idx].name = s; a[idx].w = b; a[idx].r = c; a[idx].j = d; a[idx].z = idx; idx++; } } sort(a,a+idx,cmp); for(int i=0;i<idx;i++) cout<<a[i].name<<endl; return 0; }

    userId_undefined

    扬帆科技(GYF)

    倔强青铜
    15阅读
    0回复
    0点赞
  • python题解

    userId_undefined

    yang(Python)

    秩序白银
    1阅读
    0回复
    0点赞
首页