# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
67034 | nvmdava | 팀들 (IOI15_teams) | C++17 | 4038 ms | 12808 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "teams.h"
#include <bits/stdc++.h>
using namespace std;
struct unit{
int l, r, L, R;
bool operator<(const unit& rhs) const {
if(L == rhs.L){
return R < rhs.R;
}
return L < rhs.L;
}
};
vector<unit> v;
void init(int N, int A[], int B[]) {
unit t;
for(int i = 0 ; i < N; i++){
t.l = A[i];
t.r = B[i];
v.push_back(t);
}
}
int can(int M, int K[]) {
vector<int> q;
for(int i = 0; i < M; i++){
q.push_back(K[i]);
}
sort(q.begin(), q.end());
int i = 0, t = q[0];
for(auto x : v){
x.L = lower_bound(q.begin(), q.end(), x.l) - q.begin();
x.R = upper_bound(q.begin(), q.end(), x.r) - q.begin() - 1;
}
sort(v.begin(), v.end());
for(auto x : v){
if(x.L > i){
return 0;
}
if(x.R <= i){
t--;
if(t == 0){
i++;
if(i == M){
return 1;
}
t = q[i];
}
}
}
return 0;
}
컴파일 시 표준 에러 (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... |