| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 121728 | nvmdava | 팀들 (IOI15_teams) | C++17 | 4022 ms | 19600 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "teams.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > ls;
void init(int N, int A[], int B[]) {
for(int i = 0; i < N; i++){
ls.push_back({A[i], B[i]});
}
sort(ls.begin(), ls.end(), [](pair<int, int>& lhs, pair<int, int>& rhs){
if(lhs.second == rhs.second)
return lhs.first > rhs.first;
return lhs.second > rhs.second;
});
}
int can(int M, int K[]) {
sort(K + 0, K + M, [](int& lhs ,int &rhs){
return lhs > rhs;
});
int it = 0;
priority_queue<int> pq;
for(int i = 0; i < M; i++){
while(it != ls.size() && ls[it].second >= K[i]){
pq.push(ls[it++].first);
}
while(!pq.empty() && pq.top() > K[i]) pq.pop();
while(K[i]--){
if(pq.empty()) return 0;
pq.pop();
}
}
return 1;
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
