# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
384499 | luciocf | 팀들 (IOI15_teams) | C++14 | 4078 ms | 10220 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "teams.h"
#define ff first
#define ss second
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e5+10;
int n;
pii range[maxn];
void init(int N, int A[], int B[])
{
n = N;
for (int i = 1; i <= n; i++)
range[i] = {A[i-1], B[i-1]};
sort(range+1, range+n+1);
}
int can(int M, int K[])
{
int m = M;
vector<int> V;
for (int i = 0; i < m; i++)
V.push_back(K[i]);
sort(V.begin(), V.end());
multiset<int> st;
int ptr = 1;
for (auto qtd: V)
{
while (ptr <= n && range[ptr].ff <= qtd)
st.insert(range[ptr++].ss);
if (st.size() < qtd) return 0;
int aux = 0;
for (auto it = st.begin(); aux < qtd && it != st.end(); it = st.erase(it))
if (*it >= qtd)
aux++;
if (aux < qtd) return 0;
}
return 1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |