# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
413070 | 2021-05-28T07:59:16 Z | 장태환(#7546) | Toy Train (IOI17_train) | C++14 | 8 ms | 736 KB |
#include "train.h" using namespace std; int vec[200100][2]; std::vector<int> who_wins(std::vector<int> a, std::vector<int> r, std::vector<int> u, std::vector<int> v) { std::vector<int> res(a.size()); int i; for (i = 0; i < u.size(); i++) { vec[u[i]][v[i] - u[i]] = 1; } for (i = a.size() - 1; i >= 0; i--) { if (vec[i][0]&&r[i]&&(a[i]||!vec[i][1])) { res[i] = 1; } if (vec[i][1]&&(a[i]||!vec[i][0]||(vec[i][0] && r[i]))) { res[i] |= res[i + 1]; } } return res; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 504 KB | Output is correct |
2 | Correct | 4 ms | 560 KB | Output is correct |
3 | Correct | 4 ms | 556 KB | Output is correct |
4 | Correct | 4 ms | 560 KB | Output is correct |
5 | Correct | 4 ms | 588 KB | Output is correct |
6 | Correct | 4 ms | 588 KB | Output is correct |
7 | Correct | 4 ms | 588 KB | Output is correct |
8 | Correct | 4 ms | 588 KB | Output is correct |
9 | Correct | 6 ms | 588 KB | Output is correct |
10 | Correct | 4 ms | 588 KB | Output is correct |
11 | Correct | 4 ms | 460 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | 3rd lines differ - on the 2nd token, expected: '1', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 736 KB | 3rd lines differ - on the 78th token, expected: '0', found: '1' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 588 KB | 3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 736 KB | 3rd lines differ - on the 1st token, expected: '1', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 504 KB | Output is correct |
2 | Correct | 4 ms | 560 KB | Output is correct |
3 | Correct | 4 ms | 556 KB | Output is correct |
4 | Correct | 4 ms | 560 KB | Output is correct |
5 | Correct | 4 ms | 588 KB | Output is correct |
6 | Correct | 4 ms | 588 KB | Output is correct |
7 | Correct | 4 ms | 588 KB | Output is correct |
8 | Correct | 4 ms | 588 KB | Output is correct |
9 | Correct | 6 ms | 588 KB | Output is correct |
10 | Correct | 4 ms | 588 KB | Output is correct |
11 | Correct | 4 ms | 460 KB | Output is correct |
12 | Incorrect | 1 ms | 204 KB | 3rd lines differ - on the 2nd token, expected: '1', found: '0' |
13 | Halted | 0 ms | 0 KB | - |