1 条题解

  • 1
    @ 2024-11-10 11:34:22

    #include<bits/stdc++.h> using namespace std; struct xy { int x, y; int a = 0; } ps[200]; int main() { int sum; cin>>sum; for (int i = 1; i <= sum; i++) { cin >> ps[i].x >> ps[i].y; } int Max = 0; int Maxp = 0; for (int i = 1; i <= sum; i++) { ps[i].a = 0; for (int j = 1; j <= sum; j++) { if (ps[i].x > ps[j].x && ps[i].y > ps[j].y) { ps[i].a += 1; } } if (ps[i].a >= Max) { Max = ps[i].a; Maxp = i; } } for (int i = 1; i <= sum; i++) { cout<<ps[i].a<<endl; } cout<<Maxp; return 0; }

    • 1

    信息

    ID
    681
    时间
    1000ms
    内存
    64MiB
    难度
    10
    标签
    递交数
    11
    已通过
    2
    上传者