제출 #419196

#제출 시각아이디문제언어결과실행 시간메모리
419196LouayFarah팀들 (IOI15_teams)C++14
0 / 100
4078 ms16316 KiB
#include "bits/stdc++.h" #include "teams.h" using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second int n; vector<pair<int, int>> students; vector<int> cnt; void init(int N, int a[], int b[]) { n = N; for(int i = 0; i<n; i++) { students.pb(mp(a[i], b[i])); } sort(students.begin(), students.end()); } int can(int m, int k[]) { cnt.assign(m, 0); for(int i = 0; i<m; i++) cnt[i] = k[i]; int i = 0, j = 0; while(i<n&&j<m) { if(k[j]>=students[i].fi&&k[j]<=students[i].se) { cnt[j]--; } if(cnt[j]==0) j++; i++; } if(j==m) return 1; 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...