QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#181312 | #7227. The Magic Square | ckiseki# | AC ✓ | 1ms | 3872kb | C++17 | 2.5kb | 2023-09-16 17:40:44 | 2023-09-16 17:40:44 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef CKISEKI
#define safe cerr<<__PRETTY_FUNCTION__<<" line "<<__LINE__<<" safe\n"
#define debug(a...) debug_(#a, a)
#define orange(a...) orange_(#a, a)
template <typename ...T>
void debug_(const char *s, T ...a) {
cerr << "\e[1;32m(" << s << ") = (";
int cnt = sizeof...(T);
(..., (cerr << a << (--cnt ? ", " : ")\e[0m\n")));
}
template <typename I>
void orange_(const char *s, I L, I R) {
cerr << "\e[1;32m[ " << s << " ] = [ ";
for (int f = 0; L != R; ++L)
cerr << (f++ ? ", " : "") << *L;
cerr << " ]\e[0m\n";
}
#else
#define safe ((void)0)
#define debug(...) safe
#define orange(...) safe
#endif
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int n;
cin >> n;
if (n == 1) {
cout << "Possible\n";
cout << 1 << '\n';
cout << 1 << '\n';
return 0;
}
vector<tuple<int,int,int>> cur;
if (n % 3 == 1) {
cur.emplace_back(0, 0, 1);
cur.emplace_back(1, 0, 1);
cur.emplace_back(0, 1, 1);
cur.emplace_back(1, 1, 1);
} else if (n % 3 == 0) {
cur.emplace_back(0, 0, 2);
cur.emplace_back(0, 2, 1);
cur.emplace_back(1, 2, 1);
cur.emplace_back(2, 0, 1);
cur.emplace_back(2, 1, 1);
cur.emplace_back(2, 2, 1);
} else if (n % 3 == 2) {
cur.emplace_back(0, 0, 3);
for (int j = 0; j < 3; j++) {
cur.emplace_back(j, 3, 1);
cur.emplace_back(3, j, 1);
}
cur.emplace_back(3, 3, 1);
}
if (cur.size() > n) {
cout << "Impossible\n";
return 0;
}
while (cur.size() < n) {
for (auto &[x, y, b]: cur) {
debug(x, y, b);
x *= 2;
y *= 2;
b *= 2;
debug(x, y, b);
}
debug(cur.size());
int c = cur.size();
vector<tuple<int,int,int>> nxt;
for (auto &[x, y, b]: cur) {
if (b != 2 || c == n) {
nxt.emplace_back(x, y, b);
} else {
c += 3;
nxt.emplace_back(x, y, 1);
nxt.emplace_back(x, y+1, 1);
nxt.emplace_back(x+1, y+1, 1);
nxt.emplace_back(x+1, y, 1);
}
}
debug(c);
cur = nxt;
}
cout << "Possible\n";
int len = 0;
for (auto [x, y, b]: cur) {
len = max(len, x + b);
len = max(len, y + b);
}
auto ans = vector(len, vector(len, 0));
int z = 0;
for (auto [x, y, b]: cur) {
++z;
for (int i = 0; i < b; i++)
for (int j = 0; j < b; j++)
ans[x + i][y + j] = z;
}
cout << len << '\n';
for (int i = 0; i < len; i++)
for (int j = 0; j < len; j++)
cout << ans[i][j] << (j+1==len ? '\n' : ' ');
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3556kb
input:
2
output:
Impossible
result:
ok No solution for 2 squares
Test #2:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
4
output:
Possible 2 1 3 2 4
result:
ok answer 4 squares of 1 different sizes in total 2 * 2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
1
output:
Possible 1 1
result:
ok answer 1 squares of 1 different sizes in total 1 * 1
Test #4:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
3
output:
Impossible
result:
ok No solution for 3 squares
Test #5:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
5
output:
Impossible
result:
ok No solution for 5 squares
Test #6:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
6
output:
Possible 3 1 1 2 1 1 3 4 5 6
result:
ok answer 6 squares of 2 different sizes in total 3 * 3
Test #7:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
7
output:
Possible 4 1 2 6 6 4 3 6 6 5 5 7 7 5 5 7 7
result:
ok answer 7 squares of 2 different sizes in total 4 * 4
Test #8:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
8
output:
Possible 4 1 1 1 2 1 1 1 4 1 1 1 6 3 5 7 8
result:
ok answer 8 squares of 2 different sizes in total 4 * 4
Test #9:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
9
output:
Possible 6 1 1 1 1 2 3 1 1 1 1 5 4 1 1 1 1 6 6 1 1 1 1 6 6 7 7 8 8 9 9 7 7 8 8 9 9
result:
ok answer 9 squares of 3 different sizes in total 6 * 6
Test #10:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
10
output:
Possible 4 1 2 9 9 4 3 9 9 5 6 10 10 8 7 10 10
result:
ok answer 10 squares of 2 different sizes in total 4 * 4
Test #11:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
11
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 7 7 1 1 1 1 1 1 7 7 1 1 1 1 1 1 9 9 1 1 1 1 1 1 9 9 6 6 8 8 10 10 11 11 6 6 8 8 10 10 11 11
result:
ok answer 11 squares of 3 different sizes in total 8 * 8
Test #12:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
12
output:
Possible 6 1 1 1 1 2 3 1 1 1 1 5 4 1 1 1 1 6 7 1 1 1 1 9 8 10 10 11 11 12 12 10 10 11 11 12 12
result:
ok answer 12 squares of 3 different sizes in total 6 * 6
Test #13:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
13
output:
Possible 4 1 2 9 10 4 3 12 11 5 6 13 13 8 7 13 13
result:
ok answer 13 squares of 2 different sizes in total 4 * 4
Test #14:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
14
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 10 10 1 1 1 1 1 1 10 10 1 1 1 1 1 1 12 12 1 1 1 1 1 1 12 12 6 7 11 11 13 13 14 14 9 8 11 11 13 13 14 14
result:
ok answer 14 squares of 3 different sizes in total 8 * 8
Test #15:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
15
output:
Possible 6 1 1 1 1 2 3 1 1 1 1 5 4 1 1 1 1 6 7 1 1 1 1 9 8 10 11 14 14 15 15 13 12 14 14 15 15
result:
ok answer 15 squares of 3 different sizes in total 6 * 6
Test #16:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
16
output:
Possible 4 1 2 9 10 4 3 12 11 5 6 13 14 8 7 16 15
result:
ok answer 16 squares of 1 different sizes in total 4 * 4
Test #17:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
17
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 10 11 1 1 1 1 1 1 13 12 1 1 1 1 1 1 15 15 1 1 1 1 1 1 15 15 6 7 14 14 16 16 17 17 9 8 14 14 16 16 17 17
result:
ok answer 17 squares of 3 different sizes in total 8 * 8
Test #18:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
18
output:
Possible 6 1 1 1 1 2 3 1 1 1 1 5 4 1 1 1 1 6 7 1 1 1 1 9 8 10 11 14 15 18 18 13 12 17 16 18 18
result:
ok answer 18 squares of 3 different sizes in total 6 * 6
Test #19:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
19
output:
Possible 8 1 2 5 5 12 12 13 13 4 3 5 5 12 12 13 13 7 7 6 6 15 15 14 14 7 7 6 6 15 15 14 14 8 8 9 9 16 16 17 17 8 8 9 9 16 16 17 17 11 11 10 10 19 19 18 18 11 11 10 10 19 19 18 18
result:
ok answer 19 squares of 2 different sizes in total 8 * 8
Test #20:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
20
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 10 11 1 1 1 1 1 1 13 12 1 1 1 1 1 1 18 18 1 1 1 1 1 1 18 18 6 7 14 15 19 19 20 20 9 8 17 16 19 19 20 20
result:
ok answer 20 squares of 3 different sizes in total 8 * 8
Test #21:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
21
output:
Possible 6 1 1 1 1 2 3 1 1 1 1 5 4 1 1 1 1 6 7 1 1 1 1 9 8 10 11 14 15 18 19 13 12 17 16 21 20
result:
ok answer 21 squares of 2 different sizes in total 6 * 6
Test #22:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
22
output:
Possible 8 1 2 5 6 15 15 16 16 4 3 8 7 15 15 16 16 10 10 9 9 18 18 17 17 10 10 9 9 18 18 17 17 11 11 12 12 19 19 20 20 11 11 12 12 19 19 20 20 14 14 13 13 22 22 21 21 14 14 13 13 22 22 21 21
result:
ok answer 22 squares of 2 different sizes in total 8 * 8
Test #23:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
23
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 10 11 1 1 1 1 1 1 13 12 1 1 1 1 1 1 18 19 1 1 1 1 1 1 21 20 6 7 14 15 22 22 23 23 9 8 17 16 22 22 23 23
result:
ok answer 23 squares of 3 different sizes in total 8 * 8
Test #24:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
24
output:
Possible 12 1 1 1 1 1 1 1 1 2 3 6 6 1 1 1 1 1 1 1 1 5 4 6 6 1 1 1 1 1 1 1 1 8 8 7 7 1 1 1 1 1 1 1 1 8 8 7 7 1 1 1 1 1 1 1 1 9 9 10 10 1 1 1 1 1 1 1 1 9 9 10 10 1 1 1 1 1 1 1 1 12 12 11 11 1 1 1 1 1 1 1 1 12 12 11 11 13 13 14 14 17 17 18 18 21 21 22 22 13 13 14 14 17 17 18 18 21 21 22 22 16 16 15 15 ...
result:
ok answer 24 squares of 3 different sizes in total 12 * 12
Test #25:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
25
output:
Possible 8 1 2 5 6 18 18 19 19 4 3 8 7 18 18 19 19 13 13 9 10 21 21 20 20 13 13 12 11 21 21 20 20 14 14 15 15 22 22 23 23 14 14 15 15 22 22 23 23 17 17 16 16 25 25 24 24 17 17 16 16 25 25 24 24
result:
ok answer 25 squares of 2 different sizes in total 8 * 8
Test #26:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
29
output:
Possible 8 1 1 1 1 1 1 2 3 1 1 1 1 1 1 5 4 1 1 1 1 1 1 10 11 1 1 1 1 1 1 13 12 1 1 1 1 1 1 18 19 1 1 1 1 1 1 21 20 6 7 14 15 22 23 26 27 9 8 17 16 25 24 29 28
result:
ok answer 29 squares of 2 different sizes in total 8 * 8
Test #27:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
31
output:
Possible 8 1 2 5 6 24 24 25 25 4 3 8 7 24 24 25 25 13 14 9 10 27 27 26 26 16 15 12 11 27 27 26 26 17 18 21 21 28 28 29 29 20 19 21 21 28 28 29 29 23 23 22 22 31 31 30 30 23 23 22 22 31 31 30 30
result:
ok answer 31 squares of 2 different sizes in total 8 * 8
Test #28:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
37
output:
Possible 8 1 2 5 6 30 30 31 31 4 3 8 7 30 30 31 31 13 14 9 10 33 33 32 32 16 15 12 11 33 33 32 32 17 18 21 22 34 34 35 35 20 19 24 23 34 34 35 35 29 29 25 26 37 37 36 36 29 29 28 27 37 37 36 36
result:
ok answer 37 squares of 2 different sizes in total 8 * 8
Test #29:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
41
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 22 22 23 23 1 1 1 1 1 1 1 1 1 1 1 1 22 22 23 23 1 1 1 1 1 1 1 1 1 1 1 1 25 25 24 24 1 1 1 1 1 1 1 1 1 1 1 1 25 25 24 24 1 1 1 1 ...
result:
ok answer 41 squares of 3 different sizes in total 16 * 16
Test #30:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
43
output:
Possible 8 1 2 5 6 33 34 37 37 4 3 8 7 36 35 37 37 13 14 9 10 39 39 38 38 16 15 12 11 39 39 38 38 17 18 21 22 40 40 41 41 20 19 24 23 40 40 41 41 29 30 25 26 43 43 42 42 32 31 28 27 43 43 42 42
result:
ok answer 43 squares of 2 different sizes in total 8 * 8
Test #31:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
47
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 28 28 29 29 1 1 1 1 1 1 1 1 1 1 1 1 28 28 29 29 1 1 1 1 1 1 1 1 1 1 1 1 31 31 30 30 1 1 1 1 1 1 1 1 1 1 1 1 31 31 30 30 1 1 1 1 ...
result:
ok answer 47 squares of 3 different sizes in total 16 * 16
Test #32:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
49
output:
Possible 8 1 2 5 6 33 34 37 38 4 3 8 7 36 35 40 39 13 14 9 10 45 45 41 42 16 15 12 11 45 45 44 43 17 18 21 22 46 46 47 47 20 19 24 23 46 46 47 47 29 30 25 26 49 49 48 48 32 31 28 27 49 49 48 48
result:
ok answer 49 squares of 2 different sizes in total 8 * 8
Test #33:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
50
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 31 31 32 32 1 1 1 1 1 1 1 1 1 1 1 1 31 31 32 32 1 1 1 1 1 1 1 1 1 1 1 1 34 34 33 33 1 1 1 1 1 1 1 1 1 1 1 1 34 34 33 33 1 1 1 1 ...
result:
ok answer 50 squares of 3 different sizes in total 16 * 16
Test #34:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
57
output:
Possible 12 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 18 19 22 23 1 1 1 1 1 1 1 1 21 20 25 24 1 1 1 1 1 1 1 1 30 31 26 27 1 1 1 1 1 1 1 1 33 32 29 28 34 35 38 39 50 50 51 51 54 54 55 55 37 36 41 40 50 50 51 51 54 54 55 55 ...
result:
ok answer 57 squares of 3 different sizes in total 12 * 12
Test #35:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
61
output:
Possible 8 1 2 5 6 33 34 37 38 4 3 8 7 36 35 40 39 13 14 9 10 45 46 41 42 16 15 12 11 48 47 44 43 17 18 21 22 49 50 53 54 20 19 24 23 52 51 56 55 29 30 25 26 61 61 57 58 32 31 28 27 61 61 60 59
result:
ok answer 61 squares of 2 different sizes in total 8 * 8
Test #36:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
79
output:
Possible 16 1 2 5 6 17 18 21 21 48 48 49 49 52 52 53 53 4 3 8 7 20 19 21 21 48 48 49 49 52 52 53 53 13 14 9 10 23 23 22 22 51 51 50 50 55 55 54 54 16 15 12 11 23 23 22 22 51 51 50 50 55 55 54 54 28 28 29 29 24 24 25 25 60 60 61 61 56 56 57 57 28 28 29 29 24 24 25 25 60 60 61 61 56 56 57 57 31 31 30 ...
result:
ok answer 79 squares of 2 different sizes in total 16 * 16
Test #37:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
83
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 34 35 38 39 1 1 1 1 1 1 1 1 1 1 1 1 37 36 41 40 1 1 1 1 1 1 1 1 1 1 1 1 46 47 42 43 1 1 1 1 1 1 1 1 1 1 1 1 49 48 45 44 1 1 1 1 ...
result:
ok answer 83 squares of 3 different sizes in total 16 * 16
Test #38:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
87
output:
Possible 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 12 12 13 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 12 12 13 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 11 10 10 15 15 14 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 11 10 10 15 15 14 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 20 21 21 16 16 17 17 1 1 1 1 1 1 1 1 ...
result:
ok answer 87 squares of 3 different sizes in total 24 * 24
Test #39:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
89
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 34 35 38 39 1 1 1 1 1 1 1 1 1 1 1 1 37 36 41 40 1 1 1 1 1 1 1 1 1 1 1 1 46 47 42 43 1 1 1 1 1 1 1 1 1 1 1 1 49 48 45 44 1 1 1 1 ...
result:
ok answer 89 squares of 3 different sizes in total 16 * 16
Test #40:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
90
output:
Possible 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 15 15 16 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 15 15 16 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 14 10 11 18 18 17 17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 14 13 12 18 18 17 17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 23 23 24 24 19 19 20 20 1 1 1 1 1 1 1 1 ...
result:
ok answer 90 squares of 3 different sizes in total 24 * 24
Test #41:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
91
output:
Possible 16 1 2 5 6 17 18 21 22 60 60 61 61 64 64 65 65 4 3 8 7 20 19 24 23 60 60 61 61 64 64 65 65 13 14 9 10 29 30 25 26 63 63 62 62 67 67 66 66 16 15 12 11 32 31 28 27 63 63 62 62 67 67 66 66 40 40 41 41 33 34 37 37 72 72 73 73 68 68 69 69 40 40 41 41 36 35 37 37 72 72 73 73 68 68 69 69 43 43 42 ...
result:
ok answer 91 squares of 2 different sizes in total 16 * 16
Test #42:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
92
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 34 35 38 39 1 1 1 1 1 1 1 1 1 1 1 1 37 36 41 40 1 1 1 1 1 1 1 1 1 1 1 1 46 47 42 43 1 1 1 1 1 1 1 1 1 1 1 1 49 48 45 44 1 1 1 1 ...
result:
ok answer 92 squares of 3 different sizes in total 16 * 16
Test #43:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
93
output:
Possible 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 18 18 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 18 18 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 21 21 20 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 21 21 20 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 26 26 27 27 22 22 23 23 1 1 1 1 1 1 1 1 ...
result:
ok answer 93 squares of 3 different sizes in total 24 * 24
Test #44:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
94
output:
Possible 16 1 2 5 6 17 18 21 22 63 63 64 64 67 67 68 68 4 3 8 7 20 19 24 23 63 63 64 64 67 67 68 68 13 14 9 10 29 30 25 26 66 66 65 65 70 70 69 69 16 15 12 11 32 31 28 27 66 66 65 65 70 70 69 69 43 43 44 44 33 34 37 38 75 75 76 76 71 71 72 72 43 43 44 44 36 35 40 39 75 75 76 76 71 71 72 72 46 46 45 ...
result:
ok answer 94 squares of 2 different sizes in total 16 * 16
Test #45:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
95
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 34 35 38 39 1 1 1 1 1 1 1 1 1 1 1 1 37 36 41 40 1 1 1 1 1 1 1 1 1 1 1 1 46 47 42 43 1 1 1 1 1 1 1 1 1 1 1 1 49 48 45 44 1 1 1 1 ...
result:
ok answer 95 squares of 3 different sizes in total 16 * 16
Test #46:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
96
output:
Possible 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 18 19 22 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 21 20 22 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 24 24 23 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 24 24 23 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 29 29 30 30 25 25 26 26 1 1 1 1 1 1 1 1 ...
result:
ok answer 96 squares of 3 different sizes in total 24 * 24
Test #47:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
97
output:
Possible 16 1 2 5 6 17 18 21 22 66 66 67 67 70 70 71 71 4 3 8 7 20 19 24 23 66 66 67 67 70 70 71 71 13 14 9 10 29 30 25 26 69 69 68 68 73 73 72 72 16 15 12 11 32 31 28 27 69 69 68 68 73 73 72 72 46 46 47 47 33 34 37 38 78 78 79 79 74 74 75 75 46 46 47 47 36 35 40 39 78 78 79 79 74 74 75 75 49 49 48 ...
result:
ok answer 97 squares of 2 different sizes in total 16 * 16
Test #48:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
98
output:
Possible 16 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 1 1 1 1 1 1 1 1 1 1 1 1 34 35 38 39 1 1 1 1 1 1 1 1 1 1 1 1 37 36 41 40 1 1 1 1 1 1 1 1 1 1 1 1 46 47 42 43 1 1 1 1 1 1 1 1 1 1 1 1 49 48 45 44 1 1 1 1 ...
result:
ok answer 98 squares of 3 different sizes in total 16 * 16
Test #49:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
99
output:
Possible 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 6 7 18 19 22 23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 4 9 8 21 20 25 24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 15 10 11 27 27 26 26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 16 13 12 27 27 26 26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 32 32 33 33 28 28 29 29 1 1 1 1 1 1 1 1 ...
result:
ok answer 99 squares of 3 different sizes in total 24 * 24
Test #50:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
100
output:
Possible 16 1 2 5 6 17 18 21 22 69 69 70 70 73 73 74 74 4 3 8 7 20 19 24 23 69 69 70 70 73 73 74 74 13 14 9 10 29 30 25 26 72 72 71 71 76 76 75 75 16 15 12 11 32 31 28 27 72 72 71 71 76 76 75 75 49 49 50 50 33 34 37 38 81 81 82 82 77 77 78 78 49 49 50 50 36 35 40 39 81 81 82 82 77 77 78 78 52 52 51 ...
result:
ok answer 100 squares of 2 different sizes in total 16 * 16
Extra Test:
score: 0
Extra Test Passed