| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 294387 | peti1234 | 팀들 (IOI15_teams) | C++17 | 4059 ms | 18148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
long long n, pos, sum;
vector<pair<int, int> > sz;
priority_queue<pair<int, int> > q;
vector<int> kerd;
//bool can(int m, vector<int> a) {
bool can(int m, int a[]) {
pos=0, sum=0;
for (int i=0; i<m; i++) sum+=a[i];
if (sum>n) return 0;
kerd.clear();
for (int i=0; i<m; i++) for (int j=0; j<a[i]; j++) kerd.push_back(a[i]);
for (int i=0; i<n; i++) q.push(sz[i]);
sort(kerd.begin(), kerd.end());
for (int i=0; i<sum; i++) {
while(q.size()>0 && kerd[i]>-q.top().first || kerd[i]<q.top().second) q.pop();
if (q.size()==0) return 0;
q.pop();
}
return 1;
}
//void init(int p, vector<int> a, vector<int> b) {
void init(int p, int a[], int b[]) {
n=p;
for (int i=0; i<n; i++) sz.push_back({-b[i], a[i]});
}컴파일 시 표준 에러 (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... | ||||
