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>
int a[1000][4];
int main()
{
int i,j,n,k;
scanf("%d%d",&n,&k);
for(i=0;i<n;i++)for(j=0;j<4;j++)scanf("%d",&a[i][j]);
for(i=0;i<n;i++)if(a[i][0]==k)break;
k=1;
for(j=0;j<n;j++)
{
if(a[j][1]>a[i][1])k++;
else if(a[j][1]==a[i][1]&&a[j][2]>a[i][2])k++;
else if(a[j][1]==a[i][1]&&a[j][2]==a[i][2]&&a[j][3]>a[i][3])k++;
}
printf("%d",k);
}
# | 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... |