#include<cstdio>
int a[1000][4];
int main()
{
int i,j,n,k,res=1;
scanf("%d%d",&n,&k);
for(i=0;i<n;i++)scanf("%d%d%d%d",&a[i][0],&a[i][1],&a[i][2],&a[i][3]);
for(i=0;i<n;i++)if(a[i][0]==k)break;
for(j=0;j<n;j++)if(a[i][1]<a[j][1]||(a[i][1]==a[j][1]&&a[i][2]<a[j][2])||(a[i][1]==a[j][1]&&a[i][2]==a[j][2]&&a[i][3]<a[j][3]))res++;
printf("%d",res);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1104 KB |
Output is correct |
2 |
Correct |
0 ms |
1104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1104 KB |
Output is correct |
2 |
Correct |
0 ms |
1104 KB |
Output is correct |
3 |
Correct |
0 ms |
1104 KB |
Output is correct |
4 |
Correct |
0 ms |
1104 KB |
Output is correct |
5 |
Correct |
0 ms |
1104 KB |
Output is correct |
6 |
Correct |
0 ms |
1104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1104 KB |
Output is correct |
2 |
Correct |
0 ms |
1104 KB |
Output is correct |
3 |
Correct |
0 ms |
1104 KB |
Output is correct |
4 |
Correct |
0 ms |
1104 KB |
Output is correct |
5 |
Correct |
0 ms |
1104 KB |
Output is correct |
6 |
Correct |
0 ms |
1104 KB |
Output is correct |
7 |
Correct |
0 ms |
1104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1104 KB |
Output is correct |
2 |
Correct |
0 ms |
1104 KB |
Output is correct |
3 |
Correct |
0 ms |
1104 KB |
Output is correct |
4 |
Correct |
0 ms |
1104 KB |
Output is correct |
5 |
Correct |
0 ms |
1104 KB |
Output is correct |
6 |
Correct |
0 ms |
1104 KB |
Output is correct |
7 |
Correct |
0 ms |
1104 KB |
Output is correct |
8 |
Correct |
0 ms |
1104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1104 KB |
Output is correct |
2 |
Correct |
0 ms |
1104 KB |
Output is correct |
3 |
Correct |
0 ms |
1104 KB |
Output is correct |
4 |
Correct |
0 ms |
1104 KB |
Output is correct |
5 |
Correct |
0 ms |
1104 KB |
Output is correct |
6 |
Correct |
0 ms |
1104 KB |
Output is correct |
7 |
Correct |
0 ms |
1104 KB |
Output is correct |
8 |
Correct |
0 ms |
1104 KB |
Output is correct |
9 |
Correct |
0 ms |
1104 KB |
Output is correct |