PAT乙级 1080.MOOC期终成绩

PAT乙级 1080.MOOC期终成绩_第1张图片

#include
#include
#include
#include
#include
#include
using namespace std;
struct node
{
    string name;
    int grom;
    int Gm;
    int Gn;
    int G;
    bool gm;
    bool gn;
} note[10010];
bool cmp(struct node a,struct node b)
{
    if(a.G==b.G)
        return a.nameb.G;
}
int main()
{
    map p2;
    set p1;
    int p,m,n,t=0;
    cin>>p>>m>>n;
    for(int i=0;i>s1;
        scanf("%d",&z);
        if(z>=200)
        {
            p1.insert(s1);
            note[t].name=s1;
            note[t].grom=z;
            p2[s1]=t;
            t++;
        }
    }
    for(int i=0;i>s1;
        scanf("%d",&z);
        if(p1.count(s1))
        {
            note[p2[s1]].Gm=z;
            note[p2[s1]].gm=true;
        }
        else
            continue;
    }
    for(int i=0;i>s1;
        scanf("%d",&z);
        if(p1.count(s1))
        {
            note[p2[s1]].Gn=z;
            note[p2[s1]].gn=true;
        }
        else
            continue;
    }
    for(int i=0;inote[i].Gn)
            note[i].G=((0.40*note[i].Gm+0.60*note[i].Gn)*10+5)/10;
        else
            note[i].G=note[i].Gn;
    }
    sort(note,note+t,cmp);
    for(int i=0;i=60)
        {
            cout<

你可能感兴趣的:(PAT试题)