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<stdio.h>
int n, m;
int a[1002][5];
int main()
{
int i, k, cnt=1;
scanf("%d %d",&n,&m);
for(i=1 ; i<=n ; i++)
{
scanf("%d",&k);
scanf("%d %d %d",&a[k][1],&a[k][2],&a[k][3]);
}
for(i=1 ; i<=n ; i++)
{
if(a[m][1]<a[i][1]) cnt++;
if(a[m][1]==a[i][1] && a[m][2]<a[i][2]) cnt++;
if(a[m][1]==a[i][1] && a[m][2]==a[i][2] && a[m][3]<a[i][3]) cnt++;
}
printf("%d",cnt);
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... |