제출 #434072

#제출 시각아이디문제언어결과실행 시간메모리
434072Tangent팀들 (IOI15_teams)C++17
21 / 100
4090 ms15136 KiB
#include "teams.h" #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vii; typedef vector<ll> vll; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vii> vvii; typedef vector<vll> vvll; typedef vector<vpii> vvpii; typedef vector<vpll> vvpll; #define ffor(i, a, b) for (ll i = (a); i < (ll)(b); i++) #define fford(i, a, b) for (ll i = (a); i > (ll)(b); i--) #define rep(i, n) ffor(i, 0, n) #define forin(x, a) for (auto &x: a) #define all(a) a.begin(), a.end() vpii students; void init(int N, int A[], int B[]) { rep(i, N) { students.emplace_back(B[i], A[i]); } sort(all(students)); rep(i, N) { swap(students[i].first, students[i].second); } } int can(int M, int K[]) { vii k; rep(i, M) { k.emplace_back(K[i]); } sort(all(k)); vii rem(k); forin(s, students) { rep(i, M) { if (rem[i] && k[i] >= s.first && k[i] <= s.second) { rem[i]--; break; } } } forin(x, rem) { if (x) { return 0; } } 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...