제출 #384606

#제출 시각아이디문제언어결과실행 시간메모리
384606Leonardo_Paes팀들 (IOI15_teams)C++17
0 / 100
4086 ms9044 KiB
#include "teams.h" #include <bits/stdc++.h> using namespace std; typedef pair<int,int> pii; #define f first #define s second vector<pii> e; void init(int N, int A[], int B[]) { for(int i=0; i<N; i++){ e.push_back({B[i], A[i]}); } sort(e.begin(), e.end()); } int can(int M, int K[]) { sort(K, K+M); vector<pii> wtf(M); for(int i=0; i<M; i++){ wtf[i] = {K[i], K[i]}; } int i = 0; for(pii p : e){ while(i<M and wtf[i].s == 0) i++; if(i == M) break; if(p.s <= wtf[i].f) wtf[i].s--; } while(i<M and wtf[i].s == 0) i++; return (i == M); 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...