제출 #922059

#제출 시각아이디문제언어결과실행 시간메모리
922059coding_snorlax팀들 (IOI15_teams)C++14
0 / 100
4073 ms13648 KiB
#include "teams.h" #include<bits/stdc++.h> using namespace std; #define pb push_back vector<int> List[100005]; int Req[100005]={0}; multiset<int> in_queue; int n; void init(int N, int A[], int B[]) { n=N; for(int i=0;i<N;i++) List[A[i]].push_back(B[i]); } int can(int M, int K[]) { for(int i=0;i<=n;i++) Req[i]=0; in_queue.clear(); for(int i=0;i<M;i++){ Req[K[i]]+=K[i]; } for(int i=1;i<=n;i++){ for(int j:List[i]) in_queue.insert(j); while(Req[i]){ if(in_queue.size()) in_queue.erase(in_queue.begin()); else return 0; Req[i]--; } } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...