Submission #5328

#TimeUsernameProblemLanguageResultExecution timeMemory
5328baneling100올림픽 (KOI13_olympic)C++98
100 / 100
0 ms1104 KiB
#include <stdio.h> #include <algorithm> using namespace std; typedef pair <int,int> ppair; pair <ppair,ppair> medal[1001]; int n, k, ans; void input(void) { int i, a, b, c, d; scanf("%d %d",&n,&k); for(i=1 ; i<=n ; i++) { scanf("%d %d %d %d",&a,&b,&c,&d); if(a==k) a=0; medal[i]=make_pair(make_pair(-b,-c),make_pair(-d,a)); } sort(medal+1,medal+n+1); } void process(void) { int i; for(i=1 ; i<=n ; i++) if(medal[i].second.second==0) { ans=i; break; } } void output(void) { printf("%d",ans); } int main(void) { input(); process(); output(); 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...