제출 #761961

#제출 시각아이디문제언어결과실행 시간메모리
761961Dan4Life팀들 (IOI15_teams)C++17
34 / 100
4062 ms9940 KiB
#include <bits/stdc++.h> using namespace std; pair<int,int> v[100000]; int n; multiset<int> S; void init(int N, int a[], int b[]) { for(int i = 0; i < N; i++) v[i]=make_pair(a[i],b[i]); n = N; sort(v,v+n); } int can(int m, int a[]) { sort(a,a+m); int j = 0; S.clear(); for(int i = 0; i < m; i++){ int x = a[i]; while(j<n and v[j].first<=a[i]) S.insert(v[j].second), j++; while(x--){ auto itr = S.lower_bound(a[i]); if(itr==end(S)) return 0; S.erase(itr); } } 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...