# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
553883 | elazarkoren | 로봇 (IOI13_robots) | C++17 | 122 ms | 15944 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robots.h"
#include <bits/stdc++.h>
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define chkmin(a, b) a = min(a, b)
#define chkmax(a, b) a = max(a, b)
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vii;
bool good[2][2];
int putaway(int a, int b, int t, int x[], int y[], int w[], int s[]) {
vii robots;
for (int i = 0; i < a; i++) {
robots.push_back({i, 0});
}
for (int j = 0; j < b; j++) {
robots.push_back({j, 1});
}
for (int i = 0; i < t; i++) {
int count = 0;
for (int j = 0; j < 2; j++) {
if (robots[j].y && s[i] < y[robots[j].x]) {
good[i][j] = true;
count++;
} else if (!robots[j].y && w[i] < x[robots[j].x]) {
good[i][j] = true;
count++;
}
}
if (!count) return -1;
}
if (good[0][0] && good[1][1] || good[1][0] && good[0][1]) return 1;
return 2;
}
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |