二年级小学生求助,重发,哪错了??

P1093 [NOIP2007 普及组] 奖学金

神贴搬运工 @ 2020-07-31 13:27:36

#include<bits/stdc++.h>
using namespace std;
struct node
{
    int x1,x2,x3,zong,id;
}a[1001];
bool cmp(node x,node y)
{
    if(x.zong!=y.zong)
    {
        return x.zong>y.zong;
    }
    else
    {
        return x.id<y.id;
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout<<fixed;
    int n,i;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>a[i].x1>>a[i].x2>>a[i].x3;
        a[i].id=i;
        a[i].zong=a[i].x1+a[i].x2+a[i].x3;
    }
    sort(a+1,a+n+1,cmp);
    for(i=1;i<=5;i++)
    {
        cout<<a[i].id<<" "<<a[i].zong<<"\n";
    }
}

by Davi_zhao @ 2020-07-31 13:49:39

小二不是刚学乘除法(


by SalomeJLQ @ 2020-07-31 13:51:00

我有点怀疑了()


by microchip @ 2020-07-31 13:58:00

怀疑啥呀,我见过一年级会打a+b的


by Petarl @ 2020-07-31 13:58:41

小2……来瓶酒!再来个菜!(逃


by Sktic @ 2020-07-31 13:59:03

%%%大神,我小二只会咕咕咕(雾


by microchip @ 2020-07-31 14:00:15

你是真滴厉害,2年级我还在学小猫


by gdjcwsk @ 2020-07-31 14:01:13

OOOOOOOOOrz


by Arghariza @ 2020-07-31 14:10:59

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOrz


by FishingStar @ 2020-07-31 14:11:41

小二在学十位乘除法呢


by Yaixy @ 2020-07-31 14:12:36

@神贴搬运工 OOOOOOOOOOOOrz 小二的时候我都不知道c艹是什么/kk


上一页 | 下一页