#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1108 KB |
Output is correct |
2 |
Correct |
0 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1108 KB |
Output is correct |
2 |
Correct |
0 ms |
1108 KB |
Output is correct |
3 |
Correct |
0 ms |
1108 KB |
Output is correct |
4 |
Correct |
0 ms |
1108 KB |
Output is correct |
5 |
Correct |
0 ms |
1108 KB |
Output is correct |
6 |
Correct |
0 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1108 KB |
Output is correct |
2 |
Correct |
0 ms |
1108 KB |
Output is correct |
3 |
Correct |
0 ms |
1108 KB |
Output is correct |
4 |
Correct |
0 ms |
1108 KB |
Output is correct |
5 |
Correct |
0 ms |
1108 KB |
Output is correct |
6 |
Correct |
0 ms |
1108 KB |
Output is correct |
7 |
Correct |
0 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1108 KB |
Output is correct |
2 |
Correct |
0 ms |
1108 KB |
Output is correct |
3 |
Correct |
0 ms |
1108 KB |
Output is correct |
4 |
Correct |
0 ms |
1108 KB |
Output is correct |
5 |
Correct |
0 ms |
1108 KB |
Output is correct |
6 |
Correct |
0 ms |
1108 KB |
Output is correct |
7 |
Correct |
0 ms |
1108 KB |
Output is correct |
8 |
Correct |
0 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1108 KB |
Output is correct |
2 |
Correct |
0 ms |
1108 KB |
Output is correct |
3 |
Correct |
0 ms |
1108 KB |
Output is correct |
4 |
Correct |
0 ms |
1108 KB |
Output is correct |
5 |
Correct |
0 ms |
1108 KB |
Output is correct |
6 |
Correct |
0 ms |
1108 KB |
Output is correct |
7 |
Correct |
0 ms |
1108 KB |
Output is correct |
8 |
Correct |
0 ms |
1108 KB |
Output is correct |
9 |
Correct |
0 ms |
1108 KB |
Output is correct |