QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#142143 | #5575. Knight's Tour Redux | ammardab3an# | AC ✓ | 14ms | 3560kb | C++17 | 1.8kb | 2023-08-18 15:39:38 | 2023-08-18 15:39:40 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>>v10 = { {1,1},{4,2},{3,5},{2,8},{5,9},{6,6},{7,3},{10,4},{9,7},{8,10} };
vector<pair<int, int>>v8 = { {1,1},{2,4},{3,7},{6,8},{5,5},{4,2},{7,3},{8,6} };
vector<pair<int, int>>v7 = { {1,1},{2,4},{5,5},{6,2},{3,3},{4,6},{7,7} };
vector<pair<int, int>>v6 = { {1,1},{2,4},{5,5},{6,2},{3,3},{4,6} };
vector<pair<int, int>>v5 = { {1,3},{4,2},{5,5},{2,4},{3,1} };
if (n == 5) {
cout << "POSSIBLE\n";
for (auto x : v5) {
cout << x.first << " " << x.second << '\n';
}
return 0;
}
if (n == 12 || n == 13) {
cout << "POSSIBLE\n";
int cur = 0;
for (auto x : v6) {
cout << x.first + cur << " " << x.second + cur << '\n';
}
cur = 6;
for (auto x : v6) {
cout << x.first + cur << " " << x.second + cur << '\n';
}
cur = 12;
if (n == 13) {
cout << 13 << " " << 13 << '\n';
}
return 0;
}
for (int i = 0; i < 4; i++) {
if (n < i * 10)break;
int m = (n - i * 10) % 8;
if (!m || m == 1 || m == 7 || m == 6) {
cout << "POSSIBLE\n";
int cur = 0;
for (int j = 0; j < i; j++) {
for (auto x : v10)cout << x.first + cur << " " << x.second + cur << '\n';
cur += 10;
}
n -= 10 * i;
int mm = n / 8;
while (mm--) {
for (auto x : v8) {
cout << x.first + cur << " " << x.second + cur << '\n';
}
n -= 8;
cur += 8;
}
if (m == 1) {
cout << cur + 1 << " " << cur + 1 << '\n';
}
else if (m == 7) {
for (auto x : v7) {
cout << x.first + cur << " " << x.second + cur << '\n';
}
}
else if (m == 6) {
for (auto x : v6) {
cout << x.first + cur << " " << x.second + cur << '\n';
}
}
return 0;
}
}
cout << "IMPOSSIBLE\n";
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3460kb
input:
1
output:
POSSIBLE 1 1
result:
ok answer = 1
Test #2:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
2
output:
IMPOSSIBLE
result:
ok answer = 0
Test #3:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
3
output:
IMPOSSIBLE
result:
ok answer = 0
Test #4:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
4
output:
IMPOSSIBLE
result:
ok answer = 0
Test #5:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
5
output:
POSSIBLE 1 3 4 2 5 5 2 4 3 1
result:
ok answer = 1
Test #6:
score: 0
Accepted
time: 1ms
memory: 3500kb
input:
6
output:
POSSIBLE 1 1 2 4 5 5 6 2 3 3 4 6
result:
ok answer = 1
Test #7:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
7
output:
POSSIBLE 1 1 2 4 5 5 6 2 3 3 4 6 7 7
result:
ok answer = 1
Test #8:
score: 0
Accepted
time: 1ms
memory: 3440kb
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: 3440kb
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: 3508kb
input:
10
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10
result:
ok answer = 1
Test #11:
score: 0
Accepted
time: 1ms
memory: 3504kb
input:
11
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11
result:
ok answer = 1
Test #12:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
12
output:
POSSIBLE 1 1 2 4 5 5 6 2 3 3 4 6 7 7 8 10 11 11 12 8 9 9 10 12
result:
ok answer = 1
Test #13:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
13
output:
POSSIBLE 1 1 2 4 5 5 6 2 3 3 4 6 7 7 8 10 11 11 12 8 9 9 10 12 13 13
result:
ok answer = 1
Test #14:
score: 0
Accepted
time: 0ms
memory: 3436kb
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 13 14 10 11 11 12 14
result:
ok answer = 1
Test #15:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
15
output:
POSSIBLE 1 1 2 4 3 7 6 8 5 5 4 2 7 3 8 6 9 9 10 12 13 13 14 10 11 11 12 14 15 15
result:
ok answer = 1
Test #16:
score: 0
Accepted
time: 0ms
memory: 3436kb
input:
16
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 16 13 13 12 10 15 11 16 14
result:
ok answer = 1
Test #17:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
17
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 16 13 13 12 10 15 11 16 14 17 17
result:
ok answer = 1
Test #18:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
18
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 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: 0ms
memory: 3508kb
input:
19
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19
result:
ok answer = 1
Test #20:
score: 0
Accepted
time: 1ms
memory: 3444kb
input:
20
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20
result:
ok answer = 1
Test #21:
score: 0
Accepted
time: 6ms
memory: 3460kb
input:
99990
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #22:
score: 0
Accepted
time: 9ms
memory: 3440kb
input:
99991
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #23:
score: 0
Accepted
time: 6ms
memory: 3444kb
input:
99992
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #24:
score: 0
Accepted
time: 9ms
memory: 3436kb
input:
99993
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #25:
score: 0
Accepted
time: 6ms
memory: 3444kb
input:
99994
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #26:
score: 0
Accepted
time: 11ms
memory: 3444kb
input:
99995
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #27:
score: 0
Accepted
time: 14ms
memory: 3448kb
input:
99996
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #28:
score: 0
Accepted
time: 7ms
memory: 3524kb
input:
99997
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #29:
score: 0
Accepted
time: 10ms
memory: 3448kb
input:
99998
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #30:
score: 0
Accepted
time: 8ms
memory: 3480kb
input:
99999
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #31:
score: 0
Accepted
time: 4ms
memory: 3508kb
input:
100000
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #32:
score: 0
Accepted
time: 10ms
memory: 3504kb
input:
74615
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #33:
score: 0
Accepted
time: 4ms
memory: 3508kb
input:
25027
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #34:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
40852
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #35:
score: 0
Accepted
time: 4ms
memory: 3504kb
input:
31411
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #36:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
37332
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #37:
score: 0
Accepted
time: 11ms
memory: 3516kb
input:
80435
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #38:
score: 0
Accepted
time: 7ms
memory: 3508kb
input:
90457
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #39:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
1796
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #40:
score: 0
Accepted
time: 4ms
memory: 3508kb
input:
55809
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #41:
score: 0
Accepted
time: 6ms
memory: 3524kb
input:
97013
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #42:
score: 0
Accepted
time: 6ms
memory: 3556kb
input:
77938
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #43:
score: 0
Accepted
time: 12ms
memory: 3456kb
input:
87884
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #44:
score: 0
Accepted
time: 3ms
memory: 3460kb
input:
61687
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #45:
score: 0
Accepted
time: 5ms
memory: 3504kb
input:
32567
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #46:
score: 0
Accepted
time: 7ms
memory: 3440kb
input:
53441
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #47:
score: 0
Accepted
time: 0ms
memory: 3440kb
input:
19197
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #48:
score: 0
Accepted
time: 3ms
memory: 3448kb
input:
77260
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #49:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
6699
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #50:
score: 0
Accepted
time: 10ms
memory: 3560kb
input:
72561
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #51:
score: 0
Accepted
time: 4ms
memory: 3508kb
input:
60412
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #52:
score: 0
Accepted
time: 7ms
memory: 3508kb
input:
78243
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #53:
score: 0
Accepted
time: 8ms
memory: 3444kb
input:
93055
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #54:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
72060
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #55:
score: 0
Accepted
time: 2ms
memory: 3480kb
input:
10561
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #56:
score: 0
Accepted
time: 8ms
memory: 3508kb
input:
56368
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #57:
score: 0
Accepted
time: 3ms
memory: 3528kb
input:
44898
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #58:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
69941
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #59:
score: 0
Accepted
time: 2ms
memory: 3444kb
input:
24192
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #60:
score: 0
Accepted
time: 3ms
memory: 3456kb
input:
13677
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #61:
score: 0
Accepted
time: 3ms
memory: 3444kb
input:
47780
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #62:
score: 0
Accepted
time: 5ms
memory: 3444kb
input:
36022
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #63:
score: 0
Accepted
time: 5ms
memory: 3456kb
input:
50675
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #64:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
26644
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #65:
score: 0
Accepted
time: 8ms
memory: 3444kb
input:
56969
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #66:
score: 0
Accepted
time: 3ms
memory: 3504kb
input:
53401
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #67:
score: 0
Accepted
time: 4ms
memory: 3440kb
input:
24772
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #68:
score: 0
Accepted
time: 4ms
memory: 3444kb
input:
35433
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1
Test #69:
score: 0
Accepted
time: 12ms
memory: 3464kb
input:
89877
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 14 12 13 15 12 18 15 19 16 16 17 13 20 14 19 17 18 20 21 21 22 24 23 27 26 28 25 25 24 22 27 23 28 26 29 29 30 32 31 35 34 36 33 33 32 30 35 31 36 34 37 37 38 40 39 43 42 44 41 41 40 38 43 39 44 42 45 45 46 48 47 51 50 52 49 49 48 46 51 47 52 ...
result:
ok answer = 1
Test #70:
score: 0
Accepted
time: 9ms
memory: 3460kb
input:
99986
output:
POSSIBLE 1 1 4 2 3 5 2 8 5 9 6 6 7 3 10 4 9 7 8 10 11 11 12 14 13 17 16 18 15 15 14 12 17 13 18 16 19 19 20 22 21 25 24 26 23 23 22 20 25 21 26 24 27 27 28 30 29 33 32 34 31 31 30 28 33 29 34 32 35 35 36 38 37 41 40 42 39 39 38 36 41 37 42 40 43 43 44 46 45 49 48 50 47 47 46 44 49 45 50 48 51 51 52 ...
result:
ok answer = 1
Test #71:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
6094
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 16 13 13 12 10 15 11 16 14 17 17 18 20 19 23 22 24 21 21 20 18 23 19 24 22 25 25 26 28 27 31 30 32 29 29 28 26 31 27 32 30 33 33 34 36 35 39 38 40 37 37 36 34 39 35 40 38 41 41 42 44 43 47 46 48 45 45 44 42 47 43 48 46 49 49 50 52 51 55 54 ...
result:
ok answer = 1