| Task: | Peli |
| Sender: | JuusoH |
| Submission time: | 2026-07-02 11:29:49 +0300 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| subtask | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| test | verdict | time | subtask | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
| #2 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
| #3 | WRONG ANSWER | 0.01 s | 2, 3 | details |
| #4 | RUNTIME ERROR | 0.01 s | 3 | details |
| #5 | WRONG ANSWER | 0.01 s | 2, 3 | details |
| #6 | RUNTIME ERROR | 0.01 s | 3 | details |
Code
#include <bits/stdc++.h>
const int size = 100;
bool lookup[size][size] = {};
void build_lookup() {
for (int i = 0; i < size; i++) {
for (int l = 0; l < size; l++) {
bool res = false;
if (i == l) {
res = true;
} else if (i == 0) {
res = true;
} else if (l == 0) {
res = true;
} else {
for (int x = 0; x < i; x++) {
if (lookup[i - x - 1][l] == false) {
res = true;
break;
}
}
if (res == false) {
for (int y = 0; y < l; y++) {
if (lookup[i][l - y - 1] == false) {
res = true;
break;
}
}
}
if (res == false) {
for (int z = 1; z < std::min(i, l); z++) {
int x = i - z;
int y = l - z;
if (lookup[x][y] == false) {
res = true;
break;
}
}
}
}
lookup[i][l] = res;
}
}
std::cout << "ready\n";
}
bool test(int a, int b) {
return lookup[a][b];
}
int main() {
build_lookup();
int tests;
std::cin >> tests;
for (int i = 0; i < tests; i++) {
int a, b;
std::cin >> a >> b;
if (test(a, b)) {
std::cout << "first\n";
} else {
std::cout << "second\n";
}
}
return 0;
}
Test details
Test 1 (public)
Subtask: 1, 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 5 2 2 1 2 3 2 4 3 ... |
| correct output |
|---|
| first second first first second |
| user output |
|---|
| ready first second first first ... |
Feedback: Output is longer than expected
Test 2
Subtask: 1, 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 100 1 1 1 2 1 3 1 4 ... |
| correct output |
|---|
| first second first first first ... |
| user output |
|---|
| ready first second first first ... |
Feedback: Output is longer than expected
Test 3
Subtask: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000 82 14 91 84 13 97 92 23 ... |
| correct output |
|---|
| first first first first first ... |
| user output |
|---|
| ready first first first first ... |
Feedback: Output is longer than expected
Test 4
Subtask: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 1630 271 1812 1671 254 1938 1827 443 ... |
| correct output |
|---|
| first first first first first ... |
| user output |
|---|
| ready |
Test 5
Subtask: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000 36 14 79 81 93 82 32 1 ... |
| correct output |
|---|
| first first first first first ... |
| user output |
|---|
| ready first first first first ... |
Feedback: Output is longer than expected
Test 6
Subtask: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 486 300 899 1455 879 543 40 65 ... |
| correct output |
|---|
| second second second second second ... |
| user output |
|---|
| ready second first second second |
