| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 56049 | aquablitz11 | Robots (IOI13_robots) | C++14 | 205 ms | 9084 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "robots.h"
using namespace std;
#define forn(i, n) for (int i = 0; i < (n); ++i)
#define F first
#define S second
typedef pair<int, int> pii;
const int N = 50010;
const int INF = 2e9+1;
bool used[N];
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[])
{
int tim = 0, done = 0;
bool ok = true;
while (ok) {
++tim;
ok = false;
forn(i, A) {
pii mx(-1, -1);
forn(j, T) if (!used[j] && W[j] < X[i])
mx = max(mx, pii(S[j], j));
if (mx != pii(-1, -1)) {
used[mx.S] = true;
ok = true;
++done;
continue;
}
}
forn(i, B) {
pii mx(-1, -1);
forn(j, T) if (!used[j] && S[j] < Y[i])
mx = max(mx, pii(W[j], j));
if (mx != pii(-1, -1)) {
used[mx.S] = true;
ok = true;
++done;
continue;
}
}
if (done == T)
return tim;
}
return -1;
}
| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
