This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
struct co{
    int a,b,c;
    int ind;
    bool operator<(const co& other) const {
        return a==other.a?(b==other.b?(c<other.c):b<other.b):a<other.a;
    }
    bool operator>(const co& other) const { return !(*this<(other)); }
    bool operator==(const co& other) const { return a==other.a && b==other.b && c==other.c; }
} data[1001];
int main()
{
    int n;
    int k;
    int i,j;
    scanf("%d%d",&n,&k);
    for(i=0;i<n;++i) scanf("%d%d%d%d",&data[i].ind,&data[i].a,&data[i].b,&data[i].c);
    for(i=0;i<n;++i) if(data[i].ind==k) break;
    int ans=1;
    for(j=0;j<n;++j) if(data[i]<data[j]) ++ans;
    printf("%d\n",ans);
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |