| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 637340 | MohamedFaresNebili | 팀들 (IOI15_teams) | C++14 | 4094 ms | 15196 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "teams.h"
using namespace std;
const int INF = INT32_MAX;
const int batch = 750;
vector<pair<int, int>> arr;
void init(int N, int A[], int B[]) {
for(int i = 0; i < N; i++) {
int U = A[i], V = B[i];
arr.push_back({U, V});
}
}
int can(int M, int K[]) {
int N = arr.size();
vector<pair<int, int>> A(M);
for(int l = 0; l < M; l++) A[l].second = l, A[l].first = 0;
for(int l = 0; l < N; l++) {
int U = arr[l].first, V = arr[l].second;
for(int i = 0; i < M; i++) {
if(K[i] >= U && K[i] <= V)
A[i].first++;
}
}
sort(A.begin(), A.end()); int res = 1;
vector<bool> vis(N, 0);
for(int i = 0; i < M; i++) {
int cur = 0;
for(int j = 0; j < N && cur < K[A[i].second]; j++) {
if(vis[j]) continue;
int U = arr[j].first, V = arr[j].second;
if(K[A[i].second] >= U && K[A[i].second] <= V)
cur++, vis[j] = 1;
}
res &= (cur == K[A[i].second]);
}
return res;
}
컴파일 시 표준 에러 (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... | ||||
