Submission #17660

#TimeUsernameProblemLanguageResultExecution timeMemory
17660Namnamseo올림픽 (KOI13_olympic)C++14
100 / 100
0 ms1100 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...