| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|
| 1218541 |  | LIA | 팀들 (IOI15_teams) | C++17 |  | 4094 ms | 36200 KiB | 
#include "teams.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple <ll,ll,ll> plll;
typedef vector <plll> vplll;
typedef pair <ll,ll> pll;
typedef vector <ll> vll;
typedef vector <pll> vpll;
typedef vector <vector <pll>> vvpll;
typedef vector <vector <ll>> vvll;
typedef vector <bool> vb;
typedef vector <vector <bool>> vvb;
#define loop(i, s, e) for (ll i = (s); i < (e); ++i)
#define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i)
#define all(a) a.begin(), a.end()
const ll inf = 1e9 + 7;
ll n;
multiset<pll> p;
void init(int N, int A[], int B[]) {
    n = N;
    loop(i,0,n) {
        ll a = A[i], b = B[i];
        p.insert({a,b});
    }
}
int can(int m, int k[]) {
    bool ok = true;
    for (int i = 0; i < m; ++i) {
        ll sz  = k[i];
        ll cnt = 0;
        for (auto it = p.end(); it != p.begin() && cnt < sz; ) {
            if (it->first <= sz && it->second >= sz) {
                ++cnt;
                it = p.erase(it);  
            } else {
                --it;             
            }
        }
        if (cnt < sz) {
            ok = false;
            break;
        }
    }
    return ok ? 1 : 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |