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