이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
# | 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... |