QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#776905 | #2808. Gardening | linusvdv# | 100 ✓ | 15ms | 3876kb | C++14 | 2.9kb | 2024-11-23 21:32:27 | 2024-11-23 21:32:28 |
Judging History
answer
#include <algorithm>
#include <iostream>
#include <vector>
bool IsPossible(int height, int length, int num_area) {
if (height%2 == 1 || length%2 == 1) {
return false;
}
if (num_area > height * length / 4) {
return false;
}
if (num_area < std::max(height, length) / 2) {
return false;
}
if (num_area == height * length / 4 - 1) {
return false;
}
if (height == length && num_area == height / 2 + 1) {
return false;
}
return true;
}
void Solve(std::vector<std::vector<int>>& field, int height, int length, int num_area, int height_offset, int length_offset) {
// full outline
if (num_area == 0) {
return;
}
if (IsPossible(height-2, length-2, num_area-1)) {
for (int i = 0; i < height; i++) {
field[height_offset+i][length_offset] = num_area;
field[height_offset+i][length_offset+length-1] = num_area;
}
for (int i = 0; i < length; i++) {
field[height_offset][length_offset+i] = num_area;
field[height_offset+height-1][length_offset+i] = num_area;
}
Solve(field, height-2, length-2, num_area-1, height_offset+1, length_offset+1);
}
// reduce top
else if (IsPossible(height-2, length, num_area - length/2)) {
for (int i = 0; i < length/2; i++) {
field[height_offset][length_offset+2*i] = num_area-i;
field[height_offset+1][length_offset+2*i] = num_area-i;
field[height_offset][length_offset+2*i+1] = num_area-i;
field[height_offset+1][length_offset+2*i+1] = num_area-i;
}
Solve(field, height-2, length, num_area-length/2, height_offset+2, length_offset);
}
// reduce left
else if (IsPossible(height, length-2, num_area - height/2)) {
for (int i = 0; i < height/2; i++) {
field[height_offset+2*i][length_offset] = num_area-i;
field[height_offset+2*i+1][length_offset] = num_area-i;
field[height_offset+2*i][length_offset+1] = num_area-i;
field[height_offset+2*i+1][length_offset+1] = num_area-i;
}
Solve(field, height, length-2, num_area-height/2, height_offset, length_offset+2);
}
else {
std::cout << "ERROR\n";
}
}
int main() {
int num_testcases;
std::cin >> num_testcases;
for (int i = 0; i < num_testcases; i++) {
int height;
int length;
int num_area;
std::cin >> height >> length >> num_area;
if (!IsPossible(height, length, num_area)) {
std::cout << "NO\n";
continue;
}
std::cout << "YES\n";
std::vector<std::vector<int>> field(height, std::vector<int>(length, 0));
Solve(field, height, length, num_area, 0, 0);
for (std::vector<int>& row : field) {
for (int& dot : row) {
std::cout << dot << " ";
}
std::cout << "\n";
}
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 15ms
memory: 3472kb
input:
28119 2 4 2 2 2 1 4 2 2 2 2 1 2 2 1 2 2 3 2 4 2 4 4 2 2 2 2 2 2 2 4 4 3 2 2 1 4 2 2 4 4 4 4 2 2 2 4 2 2 2 2 2 2 2 2 2 1 2 2 1 2 2 1 2 2 1 2 2 2 2 2 1 2 4 2 2 2 1 2 2 1 2 2 1 4 2 2 2 2 2 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 4 2 7 2 2 1 2 4 2 2 2 1 4 2 2 2 4 2 2 2 1 2 4 4 2 2 1 2 2 1 2 2 1 4 2 2 2 2 2 2 2 1 ...
output:
YES 2 2 1 1 2 2 1 1 YES 1 1 1 1 YES 2 2 2 2 1 1 1 1 YES 1 1 1 1 YES 1 1 1 1 NO YES 2 2 1 1 2 2 1 1 YES 2 2 2 2 2 1 1 2 2 1 1 2 2 2 2 2 NO NO NO YES 1 1 1 1 YES 2 2 2 2 1 1 1 1 YES 4 4 3 3 4 4 3 3 2 2 1 1 2 2 1 1 YES 2 2 2 2 1 1 1 1 YES 2 2 1 1 2 2 1 1 NO NO YES 1 1 ...
result:
ok Correct! Azusa and Laika like the garden :) (28119 test cases)
Subtask #2:
score: 6
Accepted
Dependency #1:
100%
Accepted
Test #2:
score: 6
Accepted
time: 3ms
memory: 3756kb
input:
2953 2 2 1 2 12 6 2 34 17 2 26 51 2 2 1 2 2 1 2 24 12 4 4 2 4 50 45 2 28 14 4 4 4 4 48 48 2 22 11 2 26 13 4 2 2 4 2 2 2 22 11 2 38 19 2 40 20 2 38 19 2 40 20 4 30 23 2 16 8 4 4 3 2 44 2 4 42 85 2 2 1 2 32 53 2 2 1 4 18 60 2 6 9 2 10 5 2 50 25 4 26 77 2 2 4 2 40 20 4 4 4 2 2 1 2 2 1 2 36 2 2 18 9 4 4...
output:
YES 1 1 1 1 YES 6 6 5 5 4 4 3 3 2 2 1 1 6 6 5 5 4 4 3 3 2 2 1 1 YES 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 NO YES 1 1 1 1 YES 1 1 1 1 YES 12 12 11 11 10 10 9 9 8...
result:
ok Correct! Azusa and Laika like the garden :) (2953 test cases)
Test #3:
score: 6
Accepted
time: 11ms
memory: 3588kb
input:
2976 2 2 1 2 2 1 2 2 1 2 2 1 2 16 8 4 4 2 4 16 13 4 28 25 2 2 1 4 14 13 2 34 17 4 34 31 2 2 1 2 34 17 2 2 1 4 4 3 4 26 19 4 42 27 2 44 22 4 48 28 4 4 2 2 4 2 2 2 1 2 32 2 2 2 1 2 34 17 2 42 59 2 42 21 2 32 16 4 48 31 4 4 4 2 2 1 2 12 6 2 2 1 4 36 32 2 16 8 4 14 10 2 2 2 2 10 5 2 24 12 2 2 2 2 2 1 2 ...
output:
YES 1 1 1 1 YES 1 1 1 1 YES 1 1 1 1 YES 1 1 1 1 YES 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 YES 2 2 2 2 2 1 1 2 2 1 1 2 2 2 2 2 YES 13 13 11 11 9 9 7 7 5 5 3 3 3 3 3 3 13 13 11 11 9 9 7 7 5 5 3 2 2 1 1 3 12 12 10 10 8 8 6 6 4 4 3 2 2 1 1 3 12 12 10 10 8 8 6 6...
result:
ok Correct! Azusa and Laika like the garden :) (2976 test cases)
Subtask #3:
score: 10
Accepted
Dependency #2:
100%
Accepted
Test #4:
score: 10
Accepted
time: 10ms
memory: 3532kb
input:
2175 2 2 1 2 2 1 2 30 15 4 4 2 4 48 28 6 36 27 2 2 1 2 32 16 2 18 9 2 44 22 2 34 17 2 20 10 4 4 4 2 36 2 4 8 5 4 6 6 4 40 23 4 18 12 2 44 22 2 46 23 4 38 9 4 4 4 6 6 7 2 50 67 2 30 15 4 4 3 2 46 23 4 46 40 4 28 26 2 6 3 4 4 4 6 46 47 4 24 13 2 12 6 2 2 2 2 30 15 6 6 9 2 2 2 2 44 22 4 44 43 4 20 9 4 ...
output:
YES 1 1 1 1 YES 1 1 1 1 YES 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 YES 2 2 2 2 2 1 1 2 2 1 1 2 2 2 2 2 YES 28 28 26 26 24 24 22 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok Correct! Azusa and Laika like the garden :) (2175 test cases)
Test #5:
score: 10
Accepted
time: 10ms
memory: 3592kb
input:
2190 2 2 2 2 38 2 4 4 3 2 16 8 2 6 3 4 4 8 2 34 17 4 26 22 6 10 11 2 40 2 2 16 31 2 32 16 6 10 5 4 28 94 2 42 21 6 26 34 6 50 74 2 2 1 6 40 43 2 22 11 4 30 30 6 20 29 4 4 4 6 36 37 2 18 9 4 4 13 2 2 1 6 40 43 4 18 48 2 2 1 2 38 19 2 22 11 4 38 38 4 12 11 4 4 3 2 2 1 6 22 23 2 30 15 2 30 15 4 4 3 4 4...
output:
NO NO NO YES 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 YES 3 3 2 2 1 1 3 3 2 2 1 1 NO YES 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 YES 22 22 20 2...
result:
ok Correct! Azusa and Laika like the garden :) (2190 test cases)
Subtask #4:
score: 18
Accepted
Test #6:
score: 18
Accepted
time: 7ms
memory: 3596kb
input:
311 2 2 1 12 12 14 6 6 6 40 40 297 28 28 82 30 30 74 4 4 10 38 38 210 6 6 4 42 42 365 8 8 11 16 16 30 6 6 7 22 22 38 10 10 5 2 2 2 12 12 19 16 16 52 28 28 124 26 26 92 2 2 2 28 28 25 20 20 19 18 18 43 4 4 3 30 30 78 26 26 130 18 18 58 26 26 59 6 6 4 10 10 6 14 14 34 18 18 184 12 12 108 18 18 35 30 3...
output:
YES 1 1 1 1 YES 14 14 14 14 14 14 14 14 14 14 14 14 14 13 13 13 13 13 13 13 13 13 13 14 14 13 12 12 11 11 10 10 9 9 13 14 14 13 12 12 11 11 10 10 9 9 13 14 14 13 8 8 7 7 6 6 5 5 13 14 14 13 8 8 7 7 6 6 5 5 13 14 14 13 4 4 4 4 4 4 4 4 13 14 14 13 4 3 3 2 2 1 1 4 13 14 14 13 4 3 3 2 2 1 1 4 ...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #7:
score: 18
Accepted
time: 3ms
memory: 3876kb
input:
297 2 2 1 6 6 33 24 24 491 36 36 198 10 10 11 8 8 6 10 10 17 4 4 3 36 36 716 26 26 80 20 20 146 4 4 3 2 2 1 28 28 284 10 10 14 2 2 1 18 18 20 4 4 3 12 12 35 14 14 19 4 4 3 22 22 113 38 38 20 44 44 377 18 18 24 34 34 247 16 16 9 8 8 11 8 8 63 22 22 94 16 16 24 26 26 145 8 8 16 16 16 31 18 18 26 10 10...
output:
YES 1 1 1 1 NO NO YES 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197 197...
result:
ok Correct! Azusa and Laika like the garden :) (297 test cases)
Test #8:
score: 18
Accepted
time: 6ms
memory: 3560kb
input:
307 2 2 2 28 28 15 16 16 245 8 8 10 42 42 225 34 34 119 8 8 10 10 10 8 18 18 317 12 12 22 20 20 26 14 14 7 20 20 76 32 32 15 16 16 31 4 4 4 14 14 26 16 16 11 24 24 21 20 20 382 8 8 56 28 28 91 20 20 45 18 18 15 2 2 2 2 2 1 12 12 7 40 40 319 14 14 8 10 10 6 26 26 130 14 14 28 8 8 39 16 16 41 18 18 70...
output:
NO NO NO YES 10 10 10 10 10 10 10 10 10 9 9 8 8 7 7 10 10 9 9 8 8 7 7 10 10 6 6 5 5 4 4 10 10 6 6 5 5 4 4 10 10 3 3 2 2 1 1 10 10 3 3 2 2 1 1 10 10 10 10 10 10 10 10 10 YES 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225...
result:
ok Correct! Azusa and Laika like the garden :) (307 test cases)
Test #9:
score: 18
Accepted
time: 6ms
memory: 3632kb
input:
282 2 2 1 24 24 63 18 18 71 20 20 100 2 2 1 28 28 490 4 4 3 2 2 1 26 26 147 6 6 7 30 30 33 20 20 309 4 4 3 6 6 7 12 12 29 24 24 13 10 10 14 26 26 41 2 2 2 28 28 156 28 28 76 44 44 122 6 6 7 14 14 32 42 42 115 20 20 45 12 12 14 2 2 1 10 10 12 2 2 2 10 10 20 6 6 7 12 12 110 4 4 3 20 20 37 8 8 5 26 26 ...
output:
YES 1 1 1 1 YES 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 63 63 62 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 62 63 63 62 61 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 ...
result:
ok Correct! Azusa and Laika like the garden :) (282 test cases)
Test #10:
score: 18
Accepted
time: 6ms
memory: 3620kb
input:
305 2 2 1 10 10 16 12 12 6 8 8 16 12 12 15 24 24 27 14 14 10 2 2 4 36 36 529 36 36 76 36 36 19 16 16 49 18 18 25 12 12 21 6 6 8 8 8 9 6 6 4 14 14 34 12 12 8 20 20 11 40 40 640 14 14 25 14 14 10 18 18 16 32 32 29 6 6 7 14 14 152 8 8 10 38 38 321 4 4 3 12 12 16 22 22 56 20 20 96 24 24 86 42 42 238 18 ...
output:
YES 1 1 1 1 YES 16 16 15 15 14 14 13 13 12 12 16 16 15 15 14 14 13 13 12 12 11 11 11 11 11 11 11 11 11 11 11 10 10 9 9 8 8 7 7 11 11 10 10 9 9 8 8 7 7 11 11 6 6 4 4 2 2 2 2 11 11 6 6 4 4 2 1 1 2 11 11 5 5 3 3 2 1 1 2 11 11 5 5 3 3 2 2 2 2 11 11 11 11 11 11 11 11 11 11 11 YES 6 6 6 6 6 6 ...
result:
ok Correct! Azusa and Laika like the garden :) (305 test cases)
Test #11:
score: 18
Accepted
time: 6ms
memory: 3732kb
input:
312 2 2 1 26 26 46 14 14 52 26 26 143 10 10 25 20 20 34 12 12 22 16 16 56 30 30 97 8 8 43 4 4 3 8 8 17 8 8 63 18 18 76 18 18 10 12 12 90 28 28 91 10 10 14 4 4 3 12 12 13 8 8 19 28 28 133 14 14 8 2 2 1 40 40 368 18 18 79 22 22 91 6 6 3 10 10 19 8 8 11 28 28 154 22 22 52 2 2 1 6 6 14 28 28 190 14 14 1...
output:
YES 1 1 1 1 YES 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 46 46 45 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 45 46 46 45 44 43 43 43 43 43 43 43 43 43 43 43 43 ...
result:
ok Correct! Azusa and Laika like the garden :) (312 test cases)
Test #12:
score: 18
Accepted
time: 3ms
memory: 3628kb
input:
325 2 2 3 4 4 3 10 10 6 30 30 165 18 18 70 16 16 23 8 8 5 10 10 6 24 24 56 34 34 205 14 14 81 14 14 21 12 12 23 2 2 2 32 32 117 32 32 200 36 36 179 14 14 48 6 6 4 8 8 9 22 22 44 24 24 13 8 8 11 32 32 61 22 22 114 26 26 100 14 14 46 20 20 42 6 6 7 18 18 10 14 14 47 2 2 1 42 42 362 24 24 91 22 22 81 8...
output:
NO NO NO YES 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 164 165 165 164 163 163 162 162 161 161 160 160 159 1...
result:
ok Correct! Azusa and Laika like the garden :) (325 test cases)
Test #13:
score: 18
Accepted
time: 3ms
memory: 3620kb
input:
343 2 2 1 22 22 58 4 4 3 4 4 2 20 20 120 24 24 65 8 8 7 10 10 20 18 18 41 44 44 23 24 24 13 12 12 31 2 2 1 26 26 14 4 4 3 6 6 4 18 18 37 14 14 10 20 20 40 18 18 13 24 24 31 30 30 82 18 18 10 24 24 64 8 8 15 16 16 16 20 20 81 30 30 109 4 4 4 20 20 397 22 22 74 6 6 9 12 12 10 22 22 29 10 10 21 10 10 6...
output:
YES 1 1 1 1 YES 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 57 58 58 57 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 57 58 58 57 56 55 55 54 54 53 53 52 52 51 51 50 50 49 49 48 48 56 57 58 58 57 56 55 55...
result:
ok Correct! Azusa and Laika like the garden :) (343 test cases)
Test #14:
score: 18
Accepted
time: 6ms
memory: 3620kb
input:
311 2 2 1 10 10 22 2 2 1 6 6 7 10 10 21 40 40 389 10 10 11 16 16 53 36 36 21 8 8 5 2 2 1 6 6 4 2 2 2 38 38 132 32 32 135 34 34 149 2 2 1 24 24 40 8 8 14 32 32 583 24 24 32 20 20 11 12 12 30 2 2 1 24 24 119 8 8 7 18 18 48 2 2 1 2 2 1 38 38 181 8 8 6 4 4 2 12 12 27 16 16 54 24 24 64 30 30 186 20 20 36...
output:
YES 1 1 1 1 YES 22 22 21 21 20 20 19 19 18 18 22 22 21 21 20 20 19 19 18 18 17 17 16 16 15 15 14 14 13 13 17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 9 9 8 8 12 12 11 11 10 10 9 9 8 8 7 7 5 5 3 3 3 3 3 3 7 7 5 5 3 2 2 1 1 3 6 6 4 4 3 2 2 1 1 3 6 6 4 4 3 3 3 3 3 3 YES 1 1 1 1 YES 7 ...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #15:
score: 18
Accepted
time: 6ms
memory: 3848kb
input:
303 2 2 2 4 4 3 26 26 81 38 38 267 46 46 440 4 4 3 22 22 12 12 12 36 14 14 41 44 44 367 20 20 94 20 20 47 38 38 294 18 18 70 28 28 175 10 10 20 42 42 183 4 4 3 20 20 68 6 6 29 10 10 19 16 16 15 36 36 19 2 2 1 16 16 14 28 28 92 30 30 274 2 2 1 26 26 192 24 24 27 4 4 2 2 2 2 16 16 9 2 2 1 14 14 48 18 ...
output:
NO NO YES 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 81 81 80 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 80 81 81 80 79 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78...
result:
ok Correct! Azusa and Laika like the garden :) (303 test cases)
Test #16:
score: 18
Accepted
time: 6ms
memory: 3512kb
input:
299 2 2 1 16 16 9 14 14 21 20 20 29 18 18 10 30 30 181 46 46 362 10 10 24 18 18 31 10 10 11 14 14 24 46 46 278 22 22 11 6 6 8 24 24 90 12 12 26 24 24 91 6 6 6 16 16 33 26 26 138 26 26 160 2 2 1 20 20 16 18 18 62 4 4 3 20 20 86 28 28 37 12 12 22 22 22 379 34 34 255 28 28 44 26 26 155 36 36 266 28 28 ...
output:
YES 1 1 1 1 NO YES 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 20 20 20 20 20 20 20 20 20 20 20 20 21 21 20 19 19 18 18 17 17 16 16 15 15 20 21 21 20 19 19 18 18 17 17 16 16 15 15 20 21 21 20 14 14 13 13 12 12 11 11 10 10 20 21 21 20 14 14 13 13 12 12 11 11 10 10 20 21 21 20 9 9 9 9 9 9 9 9...
result:
ok Correct! Azusa and Laika like the garden :) (299 test cases)
Test #17:
score: 18
Accepted
time: 7ms
memory: 3820kb
input:
326 2 2 1 2 2 1 24 24 106 32 32 226 4 4 2 16 16 113 12 12 36 2 2 1 14 14 41 4 4 11 8 8 5 24 24 17 10 10 22 8 8 16 32 32 164 26 26 14 2 2 1 6 6 6 6 6 4 6 6 4 16 16 43 26 26 41 26 26 77 12 12 30 6 6 5 20 20 98 36 36 501 8 8 15 12 12 26 20 20 65 26 26 64 10 10 15 20 20 11 10 10 6 16 16 50 6 6 6 12 12 2...
output:
YES 1 1 1 1 YES 1 1 1 1 YES 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 105 105 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 95 106 106 105 105 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 95 10...
result:
ok Correct! Azusa and Laika like the garden :) (326 test cases)
Test #18:
score: 18
Accepted
time: 6ms
memory: 3624kb
input:
327 2 2 2 8 8 14 22 22 12 18 18 62 2 2 1 28 28 117 32 32 252 6 6 4 44 44 426 40 40 80 22 22 107 10 10 11 2 2 3 10 10 41 2 2 1 4 4 2 14 14 8 20 20 11 12 12 12 2 2 1 2 2 1 8 8 13 26 26 126 6 6 7 26 26 130 6 6 9 4 4 3 16 16 39 4 4 3 28 28 60 40 40 312 2 2 1 16 16 49 16 16 63 14 14 163 12 12 18 10 10 19...
output:
NO YES 14 14 13 13 12 12 11 11 14 14 13 13 12 12 11 11 10 10 9 9 8 8 7 7 10 10 9 9 8 8 7 7 6 6 4 4 2 2 2 2 6 6 4 4 2 1 1 2 5 5 3 3 2 1 1 2 5 5 3 3 2 2 2 2 NO YES 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 61 61 60 60 59 59 58 58 57 57 56 56 55 55 54 54 62 62 61 61 60 60 59 59...
result:
ok Correct! Azusa and Laika like the garden :) (327 test cases)
Subtask #5:
score: 39
Accepted
Test #19:
score: 39
Accepted
time: 3ms
memory: 3624kb
input:
310 44 2 22 36 8 195 2 2 4 2 50 61 12 42 275 4 4 5 26 30 416 24 20 252 20 32 498 30 30 130 32 48 1153 46 16 574 4 40 89 6 28 64 10 16 9 18 42 152 4 14 1 6 50 280 10 10 87 44 24 395 2 2 4 40 46 273 34 34 607 22 22 300 40 40 1166 10 48 211 42 22 334 6 10 20 38 38 189 6 10 36 14 14 33 44 48 1518 32 18 ...
output:
YES 22 22 22 22 21 21 21 21 20 20 20 20 19 19 19 19 18 18 18 18 17 17 17 17 16 16 16 16 15 15 15 15 14 14 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1 1 NO NO NO NO NO NO NO NO ...
result:
ok Correct! Azusa and Laika like the garden :) (310 test cases)
Test #20:
score: 39
Accepted
time: 3ms
memory: 3592kb
input:
295 264 2 471 40 40 1025 34 48 847 4 4 14 14 40 439 24 42 319 2 2 4 12 12 40 44 14 346 46 10 209 22 22 407 44 24 338 34 30 275 12 4 36 22 22 248 20 14 215 10 10 32 20 20 319 30 30 539 18 18 45 20 20 312 18 40 142 30 30 582 12 22 246 26 46 847 24 32 258 24 36 253 20 20 161 32 18 514 4 44 18 36 36 855...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 45 45 44 43 43 42 42 41 41 40 40 39 39 38 38 37 37 44 45 45 44 43 43 42 42 41 41 40 40 39 39 38 38 37 37 44 45 45 44 36 36 35 35 3...
result:
ok Correct! Azusa and Laika like the garden :) (295 test cases)
Test #21:
score: 39
Accepted
time: 2ms
memory: 3848kb
input:
298 22 2 32 2 2 3 4 8 22 18 16 51 4 4 3 38 10 162 44 44 1879 30 38 332 22 28 167 46 42 566 12 12 25 6 6 14 18 18 177 20 12 130 36 38 366 40 32 106 20 48 778 32 30 207 26 44 983 22 40 26 36 14 155 20 20 294 20 14 166 26 44 728 40 22 586 48 12 420 20 20 185 20 44 841 10 36 306 48 18 605 4 36 116 2 2 1...
output:
NO NO NO YES 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 50 50 49 49 48 48 47 47 46 46 45 45 44 44 51 51 50 50 49 49 48 48 47 47 46 46 45 45 44 44 51 51 43 43 42 42 41 41 40 40 39 39 38 38 37 37 51 51 43 43 42 42 41 41 40 40 39 39 38 38 37 37 51 51 36 36 35 35 34 34 33 33 32 32 31 31 30 ...
result:
ok Correct! Azusa and Laika like the garden :) (298 test cases)
Test #22:
score: 39
Accepted
time: 4ms
memory: 3508kb
input:
314 94 2 80 32 32 868 18 18 224 2 12 20 2 2 4 6 6 16 2 8 16 20 20 353 38 48 707 4 32 114 30 20 68 38 46 1623 34 48 48 28 10 38 38 46 225 36 24 607 16 46 323 6 6 19 34 34 145 34 8 187 10 14 86 34 22 587 36 44 266 42 28 123 46 40 578 36 12 268 42 18 135 44 44 778 18 34 577 42 2 3 10 48 117 8 8 52 22 2...
output:
NO NO NO NO NO NO NO NO NO NO YES 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 67 68 68 67 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 67 68 68 67 66 65 65 65 65 65 65 65 65 65 65 65 65 65 65 66 67 68 68 67 66 65 64 64 63 6...
result:
ok Correct! Azusa and Laika like the garden :) (314 test cases)
Test #23:
score: 39
Accepted
time: 2ms
memory: 3632kb
input:
335 2 2 4 14 14 87 10 10 40 12 32 164 2 38 68 2 16 14 48 34 107 16 16 123 42 20 93 38 2 14 8 12 34 22 44 456 42 16 81 2 2 2 4 32 60 8 8 46 30 48 945 16 16 37 12 12 58 16 24 12 44 44 1589 36 36 246 4 38 134 8 8 51 46 24 1012 20 12 136 48 8 173 2 2 3 10 4 34 14 14 154 32 26 45 22 18 194 22 22 45 32 8 ...
output:
NO NO NO NO NO NO YES 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 107 107 ...
result:
ok Correct! Azusa and Laika like the garden :) (335 test cases)
Test #24:
score: 39
Accepted
time: 3ms
memory: 3624kb
input:
300 2 2 4 16 12 98 38 40 481 32 8 144 16 2 23 20 46 680 14 14 111 28 28 357 42 18 478 26 34 305 44 48 1357 32 32 112 24 10 203 46 28 689 26 20 323 12 12 46 20 20 58 34 8 160 28 32 367 10 38 323 16 16 249 50 44 1081 6 22 109 32 28 489 28 22 71 36 2 38 16 6 25 28 30 237 14 18 224 38 14 496 48 28 242 1...
output:
NO NO NO NO NO NO NO NO NO NO NO YES 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 112 112 1...
result:
ok Correct! Azusa and Laika like the garden :) (300 test cases)
Test #25:
score: 39
Accepted
time: 0ms
memory: 3636kb
input:
304 390 2 218 6 10 10 6 14 37 10 28 214 20 20 179 28 28 477 26 34 619 16 18 74 24 12 111 24 50 1020 28 16 323 24 22 423 8 8 43 24 24 415 26 32 621 32 42 1215 4 24 30 26 26 513 34 34 593 4 6 16 8 44 28 6 18 45 26 30 470 20 36 288 20 20 286 24 6 31 22 42 845 28 28 16 2 2 3 36 10 238 20 20 307 14 18 52...
output:
NO YES 10 10 9 9 8 8 7 7 6 6 10 10 9 9 8 8 7 7 6 6 5 5 5 5 5 5 5 5 5 5 5 4 4 3 3 2 2 1 1 5 5 4 4 3 3 2 2 1 1 5 5 5 5 5 5 5 5 5 5 5 NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 ...
result:
ok Correct! Azusa and Laika like the garden :) (304 test cases)
Test #26:
score: 39
Accepted
time: 3ms
memory: 3564kb
input:
331 2 2 4 28 40 122 10 12 60 38 38 560 10 10 29 2 2 4 16 16 234 2 28 41 34 22 745 26 8 101 32 26 246 10 30 185 32 40 1138 32 32 593 34 14 61 8 28 210 28 32 87 32 18 41 46 46 108 12 44 36 12 28 63 10 38 259 4 4 9 34 4 96 8 18 16 32 32 732 26 44 582 38 50 1262 18 24 339 34 2 21 18 12 68 12 32 79 8 8 2...
output:
NO YES 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 ...
result:
ok Correct! Azusa and Laika like the garden :) (331 test cases)
Test #27:
score: 39
Accepted
time: 3ms
memory: 3572kb
input:
307 190 2 280 24 44 311 48 42 423 30 38 721 44 18 594 2 2 1 4 4 13 8 8 62 4 4 13 8 8 16 36 36 777 30 22 286 12 10 102 42 46 106 24 24 343 4 4 4 48 44 196 16 2 21 24 24 223 14 36 337 16 42 350 12 44 137 24 4 26 44 44 1204 30 30 820 6 6 15 38 42 386 42 48 1209 4 4 11 22 44 737 24 46 435 12 12 28 20 10...
output:
NO NO YES 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 423 422 422 421 421 420 420 419 419 418 418 417 417 416 416 415 415 414 414 413 413 412 412 411 411 410 410 409 409 408 4...
result:
ok Correct! Azusa and Laika like the garden :) (307 test cases)
Test #28:
score: 39
Accepted
time: 0ms
memory: 3632kb
input:
297 2 2 1 10 20 63 26 2 45 46 48 1272 10 44 104 44 2 71 46 24 184 28 20 313 16 48 638 36 28 221 50 22 101 38 38 1312 36 6 16 40 22 33 8 26 163 24 24 102 2 40 21 38 50 760 4 38 96 12 12 62 30 34 779 4 8 21 26 48 288 4 6 12 30 30 898 24 14 300 14 38 262 44 44 319 48 2 68 22 22 254 10 10 76 38 18 390 1...
output:
YES 1 1 1 1 NO NO NO YES 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 95 94 94 93 93 92 92 91 91 90 90 89 89 88 88 87 87 86 86 85 85 84 84 83 83 104 104 103 103 102 102 101 101 100 100 99 99 98 98 97 97 96 96 95 95 94 94 93 93 92 92 91 91 90 90 89 89 88 88 87 87 86 86 85 85 ...
result:
ok Correct! Azusa and Laika like the garden :) (297 test cases)
Test #29:
score: 39
Accepted
time: 2ms
memory: 3592kb
input:
292 386 2 57 48 38 608 28 18 428 42 38 1343 8 8 4 18 22 60 2 2 3 50 42 1364 2 14 23 38 48 1316 34 20 317 34 40 23 8 40 154 18 18 20 34 32 822 34 22 489 24 4 30 16 16 232 48 8 364 28 12 226 6 6 11 48 28 58 2 24 32 40 38 456 8 38 169 4 24 89 20 42 32 30 10 169 22 22 379 30 30 607 32 24 203 14 14 132 2...
output:
NO NO NO NO YES 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 4 4 3 2 2 2 2 3 4 4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 4 4 3 2 2 2 2 3 4 4 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 YES 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 60 60 59 58 5...
result:
ok Correct! Azusa and Laika like the garden :) (292 test cases)
Test #30:
score: 39
Accepted
time: 3ms
memory: 3740kb
input:
305 2 2 3 22 10 156 18 30 127 36 30 476 8 8 34 48 38 965 6 6 36 12 12 125 32 32 705 10 2 11 16 46 278 50 2 39 42 20 433 8 24 188 4 4 10 12 16 42 12 4 11 18 14 192 16 16 210 8 8 22 40 6 82 14 40 239 26 26 247 4 4 5 24 16 121 46 24 457 34 12 236 2 32 56 8 32 127 8 8 14 48 2 6 30 20 77 50 30 875 22 50 ...
output:
NO NO YES 127 127 126 126 125 125 124 124 123 123 122 122 121 121 120 120 119 119 118 118 117 117 116 116 115 115 114 114 113 113 127 127 126 126 125 125 124 124 123 123 122 122 121 121 120 120 119 119 118 118 117 117 116 116 115 115 114 114 113 113 112 112 111 111 110 110 109 109 108 108 107 107 ...
result:
ok Correct! Azusa and Laika like the garden :) (305 test cases)
Test #31:
score: 39
Accepted
time: 3ms
memory: 3856kb
input:
319 128 2 198 30 30 311 8 12 7 46 4 21 6 42 169 12 12 104 10 10 7 12 16 88 14 4 23 28 42 929 14 14 191 10 10 57 34 18 283 32 32 891 12 36 30 6 6 5 16 40 533 14 38 464 22 22 40 26 8 156 16 16 2 48 30 763 20 12 51 30 38 579 8 8 56 24 38 125 22 34 349 32 44 550 2 2 2 4 34 22 26 44 49 12 2 23 10 8 67 42...
output:
NO NO YES 7 7 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 7 7 6 5 5 3 3 3 3 3 3 6 7 7 6 5 5 3 2 2 1 1 3 6 7 7 6 4 4 3 2 2 1 1 3 6 7 7 6 4 4 3 3 3 3 3 3 6 7 7 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 NO NO NO YES 7 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 7 7 6 5 5 5 5 5 5 6 7 7 6 5 4 4 3 3 ...
result:
ok Correct! Azusa and Laika like the garden :) (319 test cases)
Test #32:
score: 39
Accepted
time: 3ms
memory: 3624kb
input:
302 384 2 427 18 48 633 40 18 669 14 30 348 6 2 8 44 22 687 36 36 65 26 28 725 46 22 914 24 24 1 50 10 355 6 8 35 2 46 16 12 12 98 12 32 301 4 36 118 26 34 264 34 24 267 26 26 493 42 42 1465 16 8 59 24 2 14 18 26 152 8 50 395 8 24 69 2 2 4 40 14 111 46 32 1014 14 40 265 36 20 581 20 32 354 6 22 16 1...
output:
NO NO NO NO NO NO YES 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 65 65 64 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 ...
result:
ok Correct! Azusa and Laika like the garden :) (302 test cases)
Test #33:
score: 39
Accepted
time: 3ms
memory: 3508kb
input:
279 112 2 93 46 14 484 10 32 306 44 34 1223 48 12 46 18 18 242 48 48 1139 10 20 167 36 36 808 8 8 36 4 4 1 46 30 434 48 32 811 34 18 28 4 4 3 8 16 2 18 8 103 4 2 1 36 8 70 16 16 254 30 40 963 26 26 113 20 8 31 22 22 135 36 24 298 20 20 340 24 36 140 16 16 218 36 36 1169 2 48 39 34 40 1085 40 22 347 ...
output:
NO NO NO NO YES 46 46 46 46 46 46 46 46 46 46 46 46 46 45 45 45 45 45 45 45 45 45 45 46 46 45 44 44 44 44 44 44 44 44 45 46 46 45 44 43 43 42 42 41 41 44 45 46 46 45 44 43 43 42 42 41 41 44 45 46 46 45 44 40 40 39 39 38 38 44 45 46 46 45 44 40 40 39 39 38 38 44 45 46 46 45 44 37 37 37 37 37 3...
result:
ok Correct! Azusa and Laika like the garden :) (279 test cases)
Test #34:
score: 39
Accepted
time: 0ms
memory: 3504kb
input:
312 18 2 4 22 22 50 46 38 443 22 10 166 2 38 67 44 30 516 42 46 1617 14 14 80 36 16 321 18 20 154 4 50 32 2 2 1 10 44 393 44 46 1909 26 32 778 50 40 1388 18 22 390 8 8 30 36 2 17 6 40 194 4 38 87 8 8 2 2 12 21 26 10 74 4 4 14 30 16 212 10 36 15 12 42 330 48 46 2127 6 6 8 38 10 356 14 32 429 24 30 67...
output:
NO YES 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 50 50 49 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 49 50 50 49 48 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 48 49 50 50 49 48 47 46 46 45 45 4...
result:
ok Correct! Azusa and Laika like the garden :) (312 test cases)
Test #35:
score: 39
Accepted
time: 3ms
memory: 3620kb
input:
288 206 2 96 14 14 137 6 26 44 14 34 474 40 40 1461 48 12 411 50 20 989 2 2 3 8 28 89 38 4 65 2 2 4 28 28 358 42 12 445 4 10 40 42 8 209 4 4 2 32 48 377 28 28 109 16 16 213 18 18 77 40 10 198 36 46 880 34 24 99 8 8 39 26 24 470 44 44 194 48 18 856 22 22 342 34 46 897 34 6 13 2 2 2 20 24 219 2 2 2 38...
output:
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 2 2 2 2 2 1 1 2 2 1 1 2 2 2 2 2 YES 377 377 376 376 375 375 374 374 373 373 372 372 371 371 370 370 369 369 368 368 367 367 366 366 365 365 364 364 363 363 362 362 361 361 360 360 359 359 358 358 357 357 356 356 355 355 354 354 377 377 376 376 37...
result:
ok Correct! Azusa and Laika like the garden :) (288 test cases)
Subtask #6:
score: 22
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #36:
score: 22
Accepted
time: 9ms
memory: 3688kb
input:
309 326 2 83 10 10 6 46 48 269 2 40 20 6 12 11 12 2 6 42 12 92 12 28 59 22 22 34 2 2 2 8 8 13 34 14 33 34 34 120 34 34 140 38 40 181 18 30 30 38 20 183 32 32 134 34 46 30 6 6 5 42 42 182 26 46 276 22 22 84 4 4 2 18 26 13 30 42 251 2 20 10 20 20 82 6 18 12 12 34 89 28 16 26 46 26 277 24 6 33 18 2 9 4...
output:
NO NO YES 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 269 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 268 2...
result:
ok Correct! Azusa and Laika like the garden :) (309 test cases)
Test #37:
score: 22
Accepted
time: 10ms
memory: 3796kb
input:
324 422 2 211 4 6 5 30 30 140 6 30 41 6 10 10 28 10 48 30 18 112 20 20 79 46 42 40 10 34 62 30 14 55 32 36 192 22 22 118 10 42 35 4 28 18 16 8 11 6 6 6 24 16 72 18 44 157 18 14 48 10 10 5 26 26 14 12 12 25 30 36 124 4 6 4 10 10 20 8 8 13 18 18 80 34 8 47 4 4 4 16 32 62 38 32 222 38 32 45 10 20 24 20...
output:
YES 211 211 211 211 210 210 210 210 209 209 209 209 208 208 208 208 207 207 207 207 206 206 206 206 205 205 205 205 204 204 204 204 203 203 203 203 202 202 202 202 201 201 201 201 200 200 200 200 199 199 199 199 198 198 198 198 197 197 197 197 196 196 196 196 195 195 ...
result:
ok Correct! Azusa and Laika like the garden :) (324 test cases)
Test #38:
score: 22
Accepted
time: 8ms
memory: 3512kb
input:
304 172 2 86 26 10 55 22 32 91 2 34 17 12 12 7 48 22 215 24 46 106 36 46 734 30 30 111 6 44 40 6 16 14 30 22 119 48 46 371 20 46 132 10 24 15 24 24 19 8 2 4 42 32 226 34 48 397 20 12 40 42 30 302 2 46 23 40 6 49 22 10 45 30 4 17 28 40 99 46 36 163 38 38 92 12 4 11 14 38 123 36 36 109 20 18 25 24 24 ...
output:
YES 86 86 86 86 85 85 85 85 84 84 84 84 83 83 83 83 82 82 82 82 81 81 81 81 80 80 80 80 79 79 79 79 78 78 78 78 77 77 77 77 76 76 76 76 75 75 75 75 74 74 74 74 73 73 73 73 72 72 72 72 71 71 71 71 70 70 70 70 69 69 69 69 68 68 68 68 67 67 67 67 66 66 66 66 65...
result:
ok Correct! Azusa and Laika like the garden :) (304 test cases)
Test #39:
score: 22
Accepted
time: 9ms
memory: 3668kb
input:
319 244 2 122 22 24 76 48 12 99 18 14 59 6 6 4 26 26 82 26 26 15 14 42 36 6 6 5 22 8 27 18 50 99 28 48 242 12 12 31 12 12 31 16 16 55 16 36 118 16 42 80 26 26 402 28 24 67 30 18 43 2 2 1 2 8 9 20 6 48 48 40 164 20 20 49 34 46 385 6 36 41 6 6 7 32 32 248 22 14 21 14 48 162 24 22 58 24 20 74 20 40 169...
output:
YES 122 122 122 122 121 121 121 121 120 120 120 120 119 119 119 119 118 118 118 118 117 117 117 117 116 116 116 116 115 115 115 115 114 114 114 114 113 113 113 113 112 112 112 112 111 111 111 111 110 110 110 110 109 109 109 109 108 108 108 108 107 107 107 107 106 106 ...
result:
ok Correct! Azusa and Laika like the garden :) (319 test cases)
Test #40:
score: 22
Accepted
time: 6ms
memory: 3572kb
input:
305 2 2 1 8 26 33 30 42 153 48 6 52 34 34 244 18 22 45 28 34 105 12 12 21 36 12 252 26 36 79 26 10 34 10 10 11 4 4 4 16 24 33 6 46 47 50 8 29 20 2 10 44 44 273 34 26 17 8 12 13 28 28 194 18 38 59 4 18 28 4 4 10 12 14 17 6 34 35 26 18 109 14 14 8 22 16 17 8 12 11 18 18 14 44 44 141 4 4 3 26 40 75 2 2...
output:
YES 1 1 1 1 YES 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 33 33 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 33 33 20 20 18 18 16 16 14 14 12 12 10 10 8 8 6 ...
result:
ok Correct! Azusa and Laika like the garden :) (305 test cases)
Test #41:
score: 22
Accepted
time: 8ms
memory: 3560kb
input:
311 112 2 56 40 10 34 14 24 63 2 16 8 22 28 96 36 6 71 8 4 6 24 44 234 18 6 22 8 8 8 34 34 274 28 34 48 2 24 12 38 22 204 10 34 23 22 10 53 32 32 134 24 24 70 8 12 18 16 16 17 40 12 159 40 14 64 14 24 41 8 8 6 38 18 35 28 8 130 28 20 60 22 22 31 26 20 86 44 44 77 44 18 129 28 6 64 2 22 11 40 28 125 ...
output:
YES 56 56 56 56 55 55 55 55 54 54 54 54 53 53 53 53 52 52 52 52 51 51 51 51 50 50 50 50 49 49 49 49 48 48 48 48 47 47 47 47 46 46 46 46 45 45 45 45 44 44 44 44 43 43 43 43 42 42 42 42 41 41 41 41 40 40 40 40 39 39 39 39 38 38 38 38 37 37 37 37 36 36 36 36 35...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #42:
score: 22
Accepted
time: 9ms
memory: 3516kb
input:
287 2 2 1 6 4 5 48 36 315 50 10 78 20 20 47 32 10 60 10 10 11 2 6 3 2 10 5 12 12 18 44 46 44 48 16 187 14 14 24 22 22 7 40 10 49 32 6 39 16 34 73 20 6 15 26 2 13 44 32 222 22 22 28 44 46 128 10 22 25 6 6 5 2 10 5 12 48 31 14 14 19 50 2 25 46 32 106 30 34 129 32 50 145 10 10 14 26 40 182 48 34 307 6 ...
output:
YES 1 1 1 1 NO YES 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 314 31...
result:
ok Correct! Azusa and Laika like the garden :) (287 test cases)
Test #43:
score: 22
Accepted
time: 9ms
memory: 3572kb
input:
326 2 2 1 4 34 81 14 14 50 24 4 14 4 22 22 28 22 142 44 10 64 42 32 272 6 6 7 14 14 46 50 28 261 28 20 118 12 40 50 46 8 53 14 50 167 38 26 116 50 26 196 32 2 16 38 46 206 32 32 17 16 16 8 12 14 142 44 46 95 36 24 166 6 6 5 22 30 17 16 30 102 30 22 42 30 4 23 42 40 390 16 34 107 10 20 46 16 16 9 48 ...
output:
YES 1 1 1 1 NO NO YES 14 14 13 13 14 14 13 13 12 12 11 11 12 12 11 11 10 10 10 10 10 9 9 10 10 9 9 10 10 8 8 10 10 8 8 10 10 7 7 10 10 7 7 10 10 6 6 10 10 6 6 10 10 5 5 10 10 5 5 10 10 4 4 10 10 4 4 10 10 3 3 10 10 3 3 10 10 2 2 10 10 2 2 10 10 1 1 10 10 1 1 10 10 10 10 10 ...
result:
ok Correct! Azusa and Laika like the garden :) (326 test cases)
Test #44:
score: 22
Accepted
time: 9ms
memory: 3564kb
input:
327 2 2 1 14 20 48 24 40 228 20 44 181 8 8 5 28 28 134 24 12 232 34 20 278 36 20 133 38 36 330 26 26 666 34 14 86 16 16 53 2 14 7 32 32 180 40 32 83 26 38 181 42 6 193 26 26 59 12 12 7 6 12 9 2 36 18 12 12 29 4 40 124 22 22 23 6 32 40 20 20 46 6 36 24 42 10 60 36 18 64 12 12 23 8 20 36 28 8 36 4 36 ...
output:
YES 1 1 1 1 YES 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40 39 39 48 48 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40 39 39 48 48 38 38 37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 48 48 38 38 37 37 36 36 35 35 34 34 33 33...
result:
ok Correct! Azusa and Laika like the garden :) (327 test cases)
Test #45:
score: 22
Accepted
time: 2ms
memory: 3864kb
input:
311 442 2 221 4 4 2 32 46 360 28 34 221 10 10 6 42 48 77 20 30 46 28 44 258 8 8 16 42 14 105 14 14 30 4 38 33 24 24 109 26 32 132 48 48 880 4 4 4 2 38 19 34 26 219 40 42 215 16 16 64 4 12 18 48 42 203 10 10 14 18 16 68 18 6 13 40 2 20 10 16 24 46 48 467 40 32 164 12 18 32 10 42 84 50 46 327 40 38 21...
output:
YES 221 221 221 221 220 220 220 220 219 219 219 219 218 218 218 218 217 217 217 217 216 216 216 216 215 215 215 215 214 214 214 214 213 213 213 213 212 212 212 212 211 211 211 211 210 210 210 210 209 209 209 209 208 208 208 208 207 207 207 207 206 206 206 206 205 205 ...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #46:
score: 22
Accepted
time: 8ms
memory: 3604kb
input:
288 350 2 175 36 4 21 6 6 32 16 16 37 2 2 1 48 20 181 16 14 12 22 8 36 4 38 22 22 6 3 40 40 161 2 2 1 14 14 21 20 20 77 34 48 941 46 16 64 18 12 34 18 18 25 10 10 20 32 26 141 36 36 582 30 16 94 22 22 107 16 2 8 18 36 139 30 30 175 2 2 2 28 26 73 50 24 251 6 6 21 32 32 35 50 24 120 26 26 372 38 42 2...
output:
YES 175 175 175 175 174 174 174 174 173 173 173 173 172 172 172 172 171 171 171 171 170 170 170 170 169 169 169 169 168 168 168 168 167 167 167 167 166 166 166 166 165 165 165 165 164 164 164 164 163 163 163 163 162 162 162 162 161 161 161 161 160 160 160 160 159 159 ...
result:
ok Correct! Azusa and Laika like the garden :) (288 test cases)
Test #47:
score: 22
Accepted
time: 9ms
memory: 3800kb
input:
304 52 2 26 46 32 200 2 20 10 38 38 335 38 18 162 26 26 111 44 18 86 16 26 33 8 8 63 22 8 44 30 42 186 34 32 189 44 10 87 8 44 68 16 8 32 30 30 64 24 34 177 12 20 44 30 10 67 46 34 200 40 32 306 18 18 212 30 18 54 2 48 2 10 10 8 32 26 75 42 48 409 6 6 9 44 28 62 22 30 33 18 18 27 12 38 92 34 20 41 1...
output:
YES 26 26 26 26 25 25 25 25 24 24 24 24 23 23 23 23 22 22 22 22 21 21 21 21 20 20 20 20 19 19 19 19 18 18 18 18 17 17 17 17 16 16 16 16 15 15 15 15 14 14 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4...
result:
ok Correct! Azusa and Laika like the garden :) (304 test cases)
Test #48:
score: 22
Accepted
time: 9ms
memory: 3604kb
input:
287 2 2 1 20 44 196 8 36 36 24 24 124 6 6 24 48 30 72 28 28 41 2 2 1 48 10 91 40 34 197 20 26 98 22 20 21 4 14 10 4 36 19 30 4 26 4 18 12 50 10 27 22 40 135 50 26 83 44 38 126 36 36 299 14 14 13 10 10 6 10 10 12 22 22 47 20 36 123 46 32 248 46 26 172 22 36 120 20 20 364 22 22 117 32 18 141 10 48 91 ...
output:
YES 1 1 1 1 YES 196 196 195 195 194 194 193 193 192 192 191 191 190 190 189 189 188 188 187 187 186 186 185 185 184 184 183 183 182 182 181 181 180 180 179 179 178 178 177 177 176 176 175 175 196 196 195 195 194 194 193 193 192 192 191 191 190 190 189 189 188 188 187 187 186 186 185 185 184 184 1...
result:
ok Correct! Azusa and Laika like the garden :) (287 test cases)
Test #49:
score: 22
Accepted
time: 9ms
memory: 3632kb
input:
311 136 2 68 2 2 1 18 18 79 4 4 3 48 26 96 16 16 17 32 40 176 48 20 52 10 10 5 6 32 33 14 14 12 16 46 166 26 8 37 14 34 420 44 4 94 28 2 14 14 14 26 18 26 102 6 6 14 40 18 35 44 20 132 30 46 316 4 4 3 10 10 7 24 24 88 18 18 79 34 34 1097 38 28 137 6 38 32 46 14 214 30 40 53 18 46 50 32 36 289 24 2 1...
output:
YES 68 68 68 68 67 67 67 67 66 66 66 66 65 65 65 65 64 64 64 64 63 63 63 63 62 62 62 62 61 61 61 61 60 60 60 60 59 59 59 59 58 58 58 58 57 57 57 57 56 56 56 56 55 55 55 55 54 54 54 54 53 53 53 53 52 52 52 52 51 51 51 51 50 50 50 50 49 49 49 49 48 48 48 48 47...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #50:
score: 22
Accepted
time: 9ms
memory: 3516kb
input:
311 2 2 2 20 8 19 22 18 37 28 12 227 14 20 20 34 2 17 34 46 140 20 20 72 46 44 457 24 24 94 14 14 49 34 18 110 28 28 145 10 10 97 40 12 93 22 22 53 12 6 9 20 50 161 4 22 14 14 30 21 28 30 141 36 38 309 24 16 72 2 12 6 6 44 60 42 28 184 18 22 98 32 10 31 34 50 356 22 22 442 44 36 270 14 16 35 24 24 8...
output:
NO YES 19 19 19 19 19 19 19 19 19 18 18 17 17 16 16 19 19 18 18 17 17 16 16 19 19 15 15 15 15 15 15 19 19 15 14 14 13 13 15 19 19 15 14 14 13 13 15 19 19 15 12 12 11 11 15 19 19 15 12 12 11 11 15 19 19 15 10 10 9 9 15 19 19 15 10 10 9 9 15 19 19 15 8 8 7 7 15 19 19 15 8 8 7 7 15 19 19 15...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #51:
score: 22
Accepted
time: 9ms
memory: 3632kb
input:
318 302 2 151 26 8 19 12 32 42 10 16 75 22 22 346 12 30 45 16 42 581 32 36 251 10 10 8 6 14 19 10 6 6 48 18 253 8 8 4 10 10 18 32 32 42 4 34 22 44 44 23 2 8 4 44 32 204 26 14 60 26 8 52 4 8 8 20 14 60 12 12 19 42 20 165 30 6 33 6 6 6 6 22 23 42 18 90 16 6 18 14 6 15 26 6 37 12 32 42 22 22 55 20 4 19...
output:
YES 151 151 151 151 150 150 150 150 149 149 149 149 148 148 148 148 147 147 147 147 146 146 146 146 145 145 145 145 144 144 144 144 143 143 143 143 142 142 142 142 141 141 141 141 140 140 140 140 139 139 139 139 138 138 138 138 137 137 137 137 136 136 136 136 135 135 ...
result:
ok Correct! Azusa and Laika like the garden :) (318 test cases)
Test #52:
score: 22
Accepted
time: 8ms
memory: 3624kb
input:
294 2 2 1 24 4 21 38 4 37 14 34 81 16 22 74 42 40 261 38 24 199 28 2 26 26 36 52 42 40 39 46 20 155 4 30 23 44 44 356 26 26 14 18 18 64 22 40 127 14 40 133 10 22 34 20 20 45 42 4 25 12 12 16 12 12 21 22 10 21 30 34 107 34 22 92 42 42 119 26 20 47 36 30 208 34 6 46 4 26 19 2 8 4 32 26 19 50 32 331 20...
output:
YES 1 1 1 1 YES 21 21 20 20 21 21 20 20 19 19 18 18 19 19 18 18 17 17 16 16 17 17 16 16 15 15 14 14 15 15 14 14 13 13 12 12 13 13 12 12 11 11 10 10 11 11 10 10 9 9 8 8 9 9 8 8 7 7 6 6 7 7 6 6 5 5 4 4 5 5 4 4 3 3 3 3 3 2 2 3 3 2 2 3 3 1 1 3 3 1 1 3 3 3 3 3 NO YES 81 81 81 81...
result:
ok Correct! Azusa and Laika like the garden :) (294 test cases)
Test #53:
score: 22
Accepted
time: 9ms
memory: 3864kb
input:
311 378 2 267 38 30 215 18 30 59 50 28 345 28 32 55 36 22 43 24 40 185 24 8 22 14 36 72 44 36 323 4 16 12 32 8 20 36 12 76 4 34 29 4 4 2 30 34 189 44 6 54 40 18 84 24 22 44 30 30 42 14 14 8 50 46 502 24 24 76 10 42 83 20 42 65 32 12 70 44 26 195 4 4 4 42 30 243 24 10 24 44 12 108 22 22 83 18 42 597 ...
output:
NO YES 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 215 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 214 215 215 214 213 213 212 212 211 211 210 210 209 209 208...
result:
ok Correct! Azusa and Laika like the garden :) (311 test cases)
Test #54:
score: 22
Accepted
time: 9ms
memory: 3520kb
input:
279 2 2 1 12 40 23 20 12 26 10 14 26 10 28 27 38 42 257 28 28 61 8 8 13 12 40 77 4 4 3 28 40 173 32 32 63 10 10 14 4 16 50 22 18 43 20 16 43 14 14 41 10 2 5 12 40 39 8 50 74 26 26 160 12 46 89 46 32 340 50 20 165 10 10 10 16 12 24 38 48 197 12 18 23 24 24 140 38 6 57 18 24 85 38 20 153 44 28 236 2 2...
output:
YES 1 1 1 1 YES 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 23 23 22 21 21 21 21 21 21 21 21 21 21 21 2...
result:
ok Correct! Azusa and Laika like the garden :) (279 test cases)
Test #55:
score: 22
Accepted
time: 9ms
memory: 3512kb
input:
298 42 2 21 26 26 107 20 20 328 28 46 305 20 10 32 12 40 117 32 32 237 14 14 31 46 26 199 18 32 112 18 36 47 2 38 19 10 44 86 10 46 444 14 20 59 32 2 16 4 2 2 4 38 27 32 32 59 14 14 49 4 16 9 36 48 264 50 32 467 50 36 179 26 26 148 42 4 106 36 10 62 50 24 756 4 42 33 28 28 15 14 42 128 6 6 6 42 36 3...
output:
YES 21 21 21 21 20 20 20 20 19 19 19 19 18 18 18 18 17 17 17 17 16 16 16 16 15 15 15 15 14 14 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1 1 YES 107 107 107 107 107 107 107 107 10...
result:
ok Correct! Azusa and Laika like the garden :) (298 test cases)
Test #56:
score: 22
Accepted
time: 9ms
memory: 3580kb
input:
295 440 2 220 14 14 37 2 2 3 36 28 174 38 8 51 18 38 143 50 10 65 12 12 36 40 28 53 2 2 1 20 20 69 2 2 1 38 38 142 8 8 8 2 30 15 48 6 53 6 6 4 12 26 33 24 24 131 36 36 82 6 40 140 48 28 152 50 2 25 18 10 98 32 34 272 36 36 262 34 14 106 42 20 139 18 30 118 40 40 204 10 6 8 48 40 76 4 2 3 36 28 113 3...
output:
YES 220 220 220 220 219 219 219 219 218 218 218 218 217 217 217 217 216 216 216 216 215 215 215 215 214 214 214 214 213 213 213 213 212 212 212 212 211 211 211 211 210 210 210 210 209 209 209 209 208 208 208 208 207 207 207 207 206 206 206 206 205 205 205 205 204 204 ...
result:
ok Correct! Azusa and Laika like the garden :) (295 test cases)
Test #57:
score: 22
Accepted
time: 9ms
memory: 3820kb
input:
297 40 2 20 46 40 251 46 40 227 42 6 52 50 22 206 4 4 15 2 2 1 28 28 101 6 6 4 26 34 218 34 34 228 4 4 2 32 50 284 18 36 35 8 8 12 50 16 133 8 8 9 10 10 12 28 32 156 30 30 41 22 12 37 14 14 19 26 40 131 32 4 101 20 22 55 26 26 56 30 30 57 18 18 74 24 8 43 30 40 141 2 2 1 12 28 81 18 22 84 16 16 35 4...
output:
YES 20 20 20 20 19 19 19 19 18 18 18 18 17 17 17 17 16 16 16 16 15 15 15 15 14 14 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1 1 1 1 YES 251 251 251 251 251 251 251 251 251 251 251 251 ...
result:
ok Correct! Azusa and Laika like the garden :) (297 test cases)
Test #58:
score: 22
Accepted
time: 9ms
memory: 3564kb
input:
292 164 2 82 12 16 44 20 46 158 16 16 61 30 14 26 20 20 46 20 26 76 12 12 72 34 20 156 8 34 60 14 36 20 16 16 45 38 38 162 12 12 31 6 6 8 38 38 1335 4 4 3 8 8 11 8 8 9 42 4 31 22 22 25 22 42 118 32 22 104 26 2 13 4 16 10 38 38 132 14 30 46 48 24 199 20 20 91 18 34 107 46 14 143 12 44 23 16 40 93 24 ...
output:
YES 82 82 82 82 81 81 81 81 80 80 80 80 79 79 79 79 78 78 78 78 77 77 77 77 76 76 76 76 75 75 75 75 74 74 74 74 73 73 73 73 72 72 72 72 71 71 71 71 70 70 70 70 69 69 69 69 68 68 68 68 67 67 67 67 66 66 66 66 65 65 65 65 64 64 64 64 63 63 63 63 62 62 62 62 61...
result:
ok Correct! Azusa and Laika like the garden :) (292 test cases)
Test #59:
score: 22
Accepted
time: 9ms
memory: 3560kb
input:
320 414 2 207 48 14 128 22 32 32 24 24 47 4 4 3 18 18 18 22 22 70 22 22 95 24 36 79 16 16 16 18 34 19 32 32 205 10 10 22 14 10 27 46 24 114 36 14 77 10 10 6 12 40 283 10 8 14 28 38 238 20 2 19 12 42 46 24 24 98 32 12 59 32 34 71 40 6 22 40 20 194 38 6 32 36 28 144 44 24 133 6 44 66 14 36 39 10 10 23...
output:
YES 207 207 207 207 206 206 206 206 205 205 205 205 204 204 204 204 203 203 203 203 202 202 202 202 201 201 201 201 200 200 200 200 199 199 199 199 198 198 198 198 197 197 197 197 196 196 196 196 195 195 195 195 194 194 194 194 193 193 193 193 192 192 192 192 191 191 ...
result:
ok Correct! Azusa and Laika like the garden :) (320 test cases)
Test #60:
score: 22
Accepted
time: 9ms
memory: 3600kb
input:
282 136 2 68 20 20 26 44 26 97 10 12 23 30 8 238 48 28 88 12 38 20 26 22 142 48 44 187 28 10 62 42 46 57 20 8 40 50 48 282 22 22 29 40 40 125 38 40 299 26 42 212 40 2 20 42 10 77 28 28 54 2 22 11 40 34 97 48 46 539 46 30 236 18 18 10 46 30 216 18 18 68 28 24 93 12 12 7 30 42 264 12 4 9 18 18 62 40 2...
output:
YES 68 68 68 68 67 67 67 67 66 66 66 66 65 65 65 65 64 64 64 64 63 63 63 63 62 62 62 62 61 61 61 61 60 60 60 60 59 59 59 59 58 58 58 58 57 57 57 57 56 56 56 56 55 55 55 55 54 54 54 54 53 53 53 53 52 52 52 52 51 51 51 51 50 50 50 50 49 49 49 49 48 48 48 48 47...
result:
ok Correct! Azusa and Laika like the garden :) (282 test cases)
Extra Test:
score: 0
Extra Test Passed