# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
115516 | E869120 | Teams (IOI15_teams) | C++14 | 4014 ms | 21240 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "teams.h"
#include <bits/stdc++.h>
using namespace std;
int N;
vector<int>G[1 << 17];
void init(int n, int A[], int B[]) {
N = n;
for (int i = 0; i < N; i++) G[A[i]].push_back(B[i]);
}
int can(int M, int K[]) {
priority_queue<int, vector<int>, greater<int>>Q;
sort(K, K + M); int cx = 0;
for (int i = 0; i < M; i++) {
for (int j = cx + 1; j <= K[i]; j++) {
for (int k = 0; k < G[j].size(); k++) Q.push(G[j][k]);
}
while (!Q.empty()) { int pos = Q.top(); if (pos < K[i]) Q.pop(); else break; }
for (int j = 0; j < K[i]; j++) {
if (Q.empty()) return 0;
Q.pop();
}
cx = K[i];
}
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... |