# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
339134 | 2020-12-24 16:21:43 | 12tqian | Robots (IOI13_robots) | C++17 | 0 / 100 | 2 ms | 492 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "robots.h"
#include <bits/stdc++.h>
using namespace std;
#define f0r(i, a) f1r(i, 0, a)
#define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define pb push_back
#define eb emplace_back
#define f first
#define s second
#define mp make_pair
#define sz(x) (int) (x).size()
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<pi> vpi;
int bzero(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
vi robots; f0r(i, A) robots.eb(X[i]);
vi pre(A+1);
sort(all(robots));
f0r(i, T) {
pre[W[i]]++;
}
f1r(i, 1, A+1) pre[i] += pre[i-1];
auto check = [&](int x) -> bool {
f0r(i, A) {
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
robots.cpp: In function 'int bzero(int, int, int, int*, int*, int*, int*)': robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:22:16: note: in expansion of macro 'f0r' 22 | vi robots; f0r(i, A) robots.eb(X[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:25:5: note: in expansion of macro 'f0r' 25 | f0r(i, T) { | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:28:5: note: in expansion of macro 'f1r' 28 | f1r(i, 1, A+1) pre[i] += pre[i-1]; | ^~~ robots.cpp: In lambda function: robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:30:9: note: in expansion of macro 'f0r' 30 | f0r(i, A) { | ^~~ robots.cpp: In function 'int smallsolve(int, int, int, int*, int*, int*, int*)': robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:53:5: note: in expansion of macro 'f0r' 53 | f0r(i, T) { | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:56:5: note: in expansion of macro 'f0r' 56 | f0r(i, T) pre[W[i]][S[i]]++; | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:57:5: note: in expansion of macro 'f0r' 57 | f0r(i, A+1) { | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:59:9: note: in expansion of macro 'f0r' 59 | f0r(j, B+1) { | ^~~ robots.cpp: In lambda function: robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:69:9: note: in expansion of macro 'f0r' 69 | f0r(i, A) { | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:70:13: note: in expansion of macro 'f0r' 70 | f0r(j, B) { | ^~~ robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)': robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:94:5: note: in expansion of macro 'f0r' 94 | f0r(i, A) X[i]--; | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:95:5: note: in expansion of macro 'f0r' 95 | f0r(i, B) Y[i]--; | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:111:5: note: in expansion of macro 'f0r' 111 | f0r(i, A) tmp.pb(X[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:116:5: note: in expansion of macro 'f0r' 116 | f0r(i, A) X[i] = get(X[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:117:5: note: in expansion of macro 'f0r' 117 | f0r(i, T) W[i] = get(W[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:122:5: note: in expansion of macro 'f0r' 122 | f0r(i, B) tmp.pb(Y[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:126:5: note: in expansion of macro 'f0r' 126 | f0r(i, B) Y[i] = get(Y[i]); | ^~~ robots.cpp:6:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses] 6 | #define f1r(i, a, b) for (int (i) = (a); (i) < (b); (i)++) | ^ robots.cpp:5:19: note: in expansion of macro 'f1r' 5 | #define f0r(i, a) f1r(i, 0, a) | ^~~ robots.cpp:127:5: note: in expansion of macro 'f0r' 127 | f0r(i, T) S[i] = get(S[i]); | ^~~
# | 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... |