QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#95123 | #5575. Knight's Tour Redux | pedroteosousa | AC ✓ | 18ms | 4252kb | C++20 | 2.2kb | 2023-04-09 07:45:28 | 2023-04-09 07:45:30 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> resp;
int sub[10][2] = {
{0, 0},
{3, 1},
{6, 2},
{9, 3},
{8, 6},
{5, 5},
{2, 4},
{1, 7},
{4, 8},
{7, 9},
};
int m[20][20][2] = {
{},{{0, 0}},{},{},{},
{{0, 2},{3, 1},{4, 4},{1, 3},{2, 0},},
{{0, 0},{1, 3},{4, 2},{5, 5},{2, 4},{3, 1},},
{{0, 0},{1, 3},{2, 6},{5, 5},{6, 2},{3, 1},{4, 4},},
{{0, 0},{1, 3},{2, 6},{5, 7},{4, 4},{3, 1},{6, 2},{7, 5},},
{{0, 0},{1, 3},{2, 6},{5, 7},{4, 4},{3, 1},{6, 2},{7, 5},{8, 8},},
{{0, 0},{1, 3},{2, 6},{3, 9},{6, 8},{5, 5},{4, 2},{7, 1},{8, 4},{9, 7},},
{{0, 0},{1, 3},{2, 6},{3, 9},{6, 8},{5, 5},{4, 2},{7, 1},{8, 4},{9, 7},{10, 10},},
{{0, 0},{1, 3},{4, 2},{7, 1},{8, 4},{11, 5},{10, 8},{9, 11},{6, 10},{5, 7},{2, 6},{3, 9},},
{{0, 0},{1, 3},{4, 4},{5, 1},{2, 2},{3, 5},{6, 6},{7, 9},{8, 12},{11, 11},{12, 8},{9, 7},{10, 10},},
{{0, 0},{1, 3},{2, 6},{5, 7},{4, 4},{3, 1},{6, 2},{7, 5},{8, 8},{9, 11},{12, 10},{13, 13},{10, 12},{11, 9},},
{{0, 0},{1, 3},{2, 6},{5, 7},{4, 4},{3, 1},{6, 2},{7, 5},{8, 8},{9, 11},{10, 14},{13, 13},{14, 10},{11, 9},{12, 12},},
{{0, 0},{1, 3},{2, 6},{3, 9},{6, 8},{5, 5},{4, 2},{7, 1},{8, 4},{9, 7},{10, 10},{11, 13},{14, 12},{15, 15},{12, 14},{13, 11},},
{{0, 0},{1, 3},{2, 6},{3, 9},{4, 12},{5, 15},{8, 16},{9, 13},{6, 14},{7, 11},{10, 10},{11, 7},{12, 4},{13, 1},{16, 2},{15, 5},{14, 8},},
{{0, 0},{1, 3},{2, 6},{3, 9},{6, 8},{5, 5},{4, 2},{7, 1},{8, 4},{9, 7},{10, 10},{11, 13},{12, 16},{15, 17},{14, 14},{13, 11},{16, 12},{17, 15},},
{{0, 0},{1, 3},{2, 6},{3, 9},{4, 12},{7, 13},{8, 16},{5, 15},{6, 18},{9, 17},{10, 14},{11, 11},{14, 10},{15, 7},{18, 8},{17, 5},{16, 2},{13, 1},{12, 4},},
};
void solve(int n) {
if (n > 1 && n <= 4) return;
int x = 0, y = 0;
while (true) {
if (n <= 19) {
for (int i = 0; i < n; i++) {
resp.push_back({x + m[n][i][0], y + m[n][i][1]});
}
break;
}
for (int i = 0; i < 10; i++) {
resp.push_back({x + sub[i][0], y + sub[i][1]});
}
x += 10;
y += 10;
n -= 10;
}
}
int main() {
int n; scanf("%d", &n);
solve(n);
if (resp.size() == 0) {
printf("IMPOSSIBLE\n");
} else {
printf("POSSIBLE\n");
for (auto rr: resp) {
printf("%d %d\n", rr.first + 1, rr.second + 1);
}
}
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3572kb
input:
1
output:
POSSIBLE 1 1
result:
ok answer = 1
Test #2:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
2
output:
IMPOSSIBLE
result:
ok answer = 0
Test #3:
score: 0
Accepted
time: 2ms
memory: 3640kb
input:
3
output:
IMPOSSIBLE
result:
ok answer = 0
Test #4:
score: 0
Accepted
time: 2ms
memory: 3460kb
input:
4
output:
IMPOSSIBLE
result:
ok answer = 0
Test #5:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
5
output:
POSSIBLE 1 3 4 2 5 5 2 4 3 1
result:
ok answer = 1
Test #6:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
6
output:
POSSIBLE 1 1 2 4 5 3 6 6 3 5 4 2
result:
ok answer = 1
Test #7:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
7
output:
POSSIBLE 1 1 2 4 3 7 6 6 7 3 4 2 5 5
result:
ok answer = 1
Test #8:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
8
output:
POSSIBLE 1 1 2 4 3 7 6 8 5 5 4 2 7 3 8 6
result:
ok answer = 1
Test #9:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
9
output:
POSSIBLE 1 1 2 4 3 7 6 8 5 5 4 2 7 3 8 6 9 9
result:
ok answer = 1
Test #10:
score: 0
Accepted
time: 1ms
memory: 3764kb
input:
10
output:
POSSIBLE 1 1 2 4 3 7 4 10 7 9 6 6 5 3 8 2 9 5 10 8
result:
ok answer = 1
Test #11:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
11
output:
POSSIBLE 1 1 2 4 3 7 4 10 7 9 6 6 5 3 8 2 9 5 10 8 11 11
result:
ok answer = 1
Test #12:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
12
output:
POSSIBLE 1 1 2 4 5 3 8 2 9 5 12 6 11 9 10 12 7 11 6 8 3 7 4 10
result:
ok answer = 1
Test #13:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
13
output:
POSSIBLE 1 1 2 4 5 5 6 2 3 3 4 6 7 7 8 10 9 13 12 12 13 9 10 8 11 11
result:
ok answer = 1
Test #14:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
14
output:
POSSIBLE 1 1 2 4 3 7 6 8 5 5 4 2 7 3 8 6 9 9 10 12 13 11 14 14 11 13 12 10
result:
ok answer = 1
Test #15:
score: 0
Accepted
time: 2ms
memory: 3708kb
input:
15
output:
POSSIBLE 1 1 2 4 3 7 6 8 5 5 4 2 7 3 8 6 9 9 10 12 11 15 14 14 15 11 12 10 13 13
result:
ok answer = 1
Test #16:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
16
output:
POSSIBLE 1 1 2 4 3 7 4 10 7 9 6 6 5 3 8 2 9 5 10 8 11 11 12 14 15 13 16 16 13 15 14 12
result:
ok answer = 1
Test #17:
score: 0
Accepted
time: 2ms
memory: 3748kb
input:
17
output:
POSSIBLE 1 1 2 4 3 7 4 10 5 13 6 16 9 17 10 14 7 15 8 12 11 11 12 8 13 5 14 2 17 3 16 6 15 9
result:
ok answer = 1
Test #18:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
18
output:
POSSIBLE 1 1 2 4 3 7 4 10 7 9 6 6 5 3 8 2 9 5 10 8 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16
result:
ok answer = 1
Test #19:
score: 0
Accepted
time: 1ms
memory: 3740kb
input:
19
output:
POSSIBLE 1 1 2 4 3 7 4 10 5 13 8 14 9 17 6 16 7 19 10 18 11 15 12 12 15 11 16 8 19 9 18 6 17 3 14 2 13 5
result:
ok answer = 1
Test #20:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
20
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 12 14 13 17 14 20 17 19 16 16 15 13 18 12 19 15 20 18
result:
ok answer = 1
Test #21:
score: 0
Accepted
time: 18ms
memory: 4252kb
input:
99990
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #22:
score: 0
Accepted
time: 11ms
memory: 4004kb
input:
99991
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #23:
score: 0
Accepted
time: 8ms
memory: 4028kb
input:
99992
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #24:
score: 0
Accepted
time: 15ms
memory: 4252kb
input:
99993
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #25:
score: 0
Accepted
time: 8ms
memory: 4028kb
input:
99994
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #26:
score: 0
Accepted
time: 8ms
memory: 3980kb
input:
99995
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #27:
score: 0
Accepted
time: 11ms
memory: 4024kb
input:
99996
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #28:
score: 0
Accepted
time: 11ms
memory: 4252kb
input:
99997
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #29:
score: 0
Accepted
time: 7ms
memory: 4036kb
input:
99998
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #30:
score: 0
Accepted
time: 17ms
memory: 4172kb
input:
99999
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #31:
score: 0
Accepted
time: 13ms
memory: 4252kb
input:
100000
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #32:
score: 0
Accepted
time: 11ms
memory: 4084kb
input:
74615
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #33:
score: 0
Accepted
time: 5ms
memory: 3656kb
input:
25027
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #34:
score: 0
Accepted
time: 2ms
memory: 3688kb
input:
40852
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #35:
score: 0
Accepted
time: 3ms
memory: 3720kb
input:
31411
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #36:
score: 0
Accepted
time: 2ms
memory: 3832kb
input:
37332
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #37:
score: 0
Accepted
time: 6ms
memory: 4172kb
input:
80435
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #38:
score: 0
Accepted
time: 3ms
memory: 3980kb
input:
90457
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #39:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
1796
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #40:
score: 0
Accepted
time: 10ms
memory: 3716kb
input:
55809
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #41:
score: 0
Accepted
time: 5ms
memory: 4072kb
input:
97013
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #42:
score: 0
Accepted
time: 7ms
memory: 4192kb
input:
77938
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #43:
score: 0
Accepted
time: 15ms
memory: 4076kb
input:
87884
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #44:
score: 0
Accepted
time: 3ms
memory: 3720kb
input:
61687
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #45:
score: 0
Accepted
time: 6ms
memory: 3872kb
input:
32567
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #46:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
53441
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #47:
score: 0
Accepted
time: 4ms
memory: 3880kb
input:
19197
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #48:
score: 0
Accepted
time: 5ms
memory: 4172kb
input:
77260
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #49:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
6699
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #50:
score: 0
Accepted
time: 12ms
memory: 4072kb
input:
72561
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #51:
score: 0
Accepted
time: 8ms
memory: 3712kb
input:
60412
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #52:
score: 0
Accepted
time: 1ms
memory: 4068kb
input:
78243
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #53:
score: 0
Accepted
time: 9ms
memory: 4044kb
input:
93055
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #54:
score: 0
Accepted
time: 5ms
memory: 3984kb
input:
72060
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #55:
score: 0
Accepted
time: 1ms
memory: 3828kb
input:
10561
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #56:
score: 0
Accepted
time: 6ms
memory: 3784kb
input:
56368
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #57:
score: 0
Accepted
time: 8ms
memory: 3884kb
input:
44898
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #58:
score: 0
Accepted
time: 6ms
memory: 4060kb
input:
69941
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #59:
score: 0
Accepted
time: 5ms
memory: 3704kb
input:
24192
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #60:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
13677
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #61:
score: 0
Accepted
time: 3ms
memory: 3876kb
input:
47780
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #62:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
36022
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #63:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
50675
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #64:
score: 0
Accepted
time: 4ms
memory: 3656kb
input:
26644
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #65:
score: 0
Accepted
time: 10ms
memory: 3644kb
input:
56969
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #66:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
53401
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #67:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
24772
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #68:
score: 0
Accepted
time: 2ms
memory: 3880kb
input:
35433
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #69:
score: 0
Accepted
time: 11ms
memory: 4252kb
input:
89877
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #70:
score: 0
Accepted
time: 12ms
memory: 3980kb
input:
99986
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1
Test #71:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
6094
output:
POSSIBLE 1 1 4 2 7 3 10 4 9 7 6 6 3 5 2 8 5 9 8 10 11 11 14 12 17 13 20 14 19 17 16 16 13 15 12 18 15 19 18 20 21 21 24 22 27 23 30 24 29 27 26 26 23 25 22 28 25 29 28 30 31 31 34 32 37 33 40 34 39 37 36 36 33 35 32 38 35 39 38 40 41 41 44 42 47 43 50 44 49 47 46 46 43 45 42 48 45 49 48 50 51 51 54 ...
result:
ok answer = 1