QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#199919 | #7346. Frogs | BoulevardDust# | AC ✓ | 21ms | 8632kb | C++20 | 1.2kb | 2023-10-04 14:39:28 | 2023-10-04 14:39:29 |
Judging History
answer
#include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <utility>
#define mn 200005
using namespace std;
int n, m, tp, b[mn], p[mn], st[mn];
struct P {
int v, l, r;
}a[mn];
void add(int l, int r) {
p[l] = r, p[r] = l;
}
int main() {
scanf("%d", &n);
int fl = 0;
for(int i = 1; i < n; ++i) {
scanf("%d", &b[i]);
if(b[i] & 1) fl = 1;
}
if(fl) {
return puts("No"), 0;
}
b[n] = 0;
int t = 1;
for(int i = 1; i <= n; ++i) {
if(i == n || b[i] != b[i + 1]) {
for(int j = t + 1; j <= i; ++j) {
p[j] = j;
}
a[++m] = (P){b[i], t, i + 1};
t = i + 1;
}
}
// for(int i = 1; i <= m; ++i) {
// printf("%d %d %d\n", a[i].v, a[i].l, a[i].r);
// }
if(a[1].v == 0) {
p[1] = 1;
}
else if(a[1].v == 2) {
st[tp = 1] = 1;
}
else {
return puts("No"), 0;
}
// st[tp = 1] = 0;
// a[++m] = (P){0, n, n + 1};
for(int i = 2; i <= m; ++i) {
if(a[i].v == a[i - 1].v + 2) {
st[++tp] = a[i].l;
}
else if(a[i].v == a[i - 1].v - 2) {
add(st[tp--], a[i].l);
}
else {
return puts("No"), 0;
}
}
puts("Yes");
for(int i = 1; i <= n; ++i) {
printf("%d ", p[i]);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5944kb
input:
5 2 4 2 2
output:
Yes 5 3 2 4 1
result:
ok Correct answer.
Test #2:
score: 0
Accepted
time: 1ms
memory: 5880kb
input:
4 1 2 3
output:
No
result:
ok Correct answer.
Test #3:
score: 0
Accepted
time: 1ms
memory: 6004kb
input:
2 0
output:
Yes 1 2
result:
ok Correct answer.
Test #4:
score: 0
Accepted
time: 1ms
memory: 5964kb
input:
2 2
output:
Yes 2 1
result:
ok Correct answer.
Test #5:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
2 1
output:
No
result:
ok Correct answer.
Test #6:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
3 0 0
output:
Yes 1 2 3
result:
ok Correct answer.
Test #7:
score: 0
Accepted
time: 1ms
memory: 5944kb
input:
3 2 0
output:
Yes 2 1 3
result:
ok Correct answer.
Test #8:
score: 0
Accepted
time: 1ms
memory: 5820kb
input:
3 0 2
output:
Yes 1 3 2
result:
ok Correct answer.
Test #9:
score: 0
Accepted
time: 1ms
memory: 5904kb
input:
3 2 2
output:
Yes 3 2 1
result:
ok Correct answer.
Test #10:
score: 0
Accepted
time: 1ms
memory: 5772kb
input:
3 2 4
output:
No
result:
ok Correct answer.
Test #11:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
3 1 0
output:
No
result:
ok Correct answer.
Test #12:
score: 0
Accepted
time: 1ms
memory: 5628kb
input:
3 1 1
output:
No
result:
ok Correct answer.
Test #13:
score: 0
Accepted
time: 18ms
memory: 6920kb
input:
200000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
Yes 200000 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...
result:
ok Correct answer.
Test #14:
score: 0
Accepted
time: 21ms
memory: 8584kb
input:
200000 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 17...
output:
Yes 200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959 19...
result:
ok Correct answer.
Test #15:
score: 0
Accepted
time: 21ms
memory: 8632kb
input:
199999 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 17...
output:
Yes 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959 199958 19...
result:
ok Correct answer.
Test #16:
score: 0
Accepted
time: 11ms
memory: 8456kb
input:
200000 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2...
output:
Yes 2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 52 51 54 53 56 55 58 57 60 59 62 61 64 63 66 65 68 67 70 69 72 71 74 73 76 75 78 77 80 79 82 81 84 83 86 85 88 87 90 89 92 91 94 93 96 95 98 97 100 99 102 ...
result:
ok Correct answer.
Test #17:
score: 0
Accepted
time: 1ms
memory: 6000kb
input:
14 2 4 2 2 2 4 6 6 6 4 4 2 0
output:
Yes 13 3 2 4 5 12 10 8 9 7 11 6 1 14
result:
ok Correct answer.
Test #18:
score: 0
Accepted
time: 0ms
memory: 5944kb
input:
7 2 4 4 4 2 0
output:
Yes 6 5 3 4 2 1 7
result:
ok Correct answer.
Test #19:
score: 0
Accepted
time: 1ms
memory: 5900kb
input:
3 0 0
output:
Yes 1 2 3
result:
ok Correct answer.
Test #20:
score: 0
Accepted
time: 1ms
memory: 5868kb
input:
7 0 2 2 2 2 0
output:
Yes 1 6 3 4 5 2 7
result:
ok Correct answer.
Test #21:
score: 0
Accepted
time: 0ms
memory: 5876kb
input:
20 0 2 4 6 8 6 8 6 6 4 4 4 2 2 4 6 4 2 0
output:
Yes 1 19 13 10 6 5 8 7 9 4 11 12 3 14 18 17 16 15 2 20
result:
ok Correct answer.
Test #22:
score: 0
Accepted
time: 0ms
memory: 5940kb
input:
9 0 2 4 6 4 4 2 0
output:
Yes 1 8 7 5 4 6 3 2 9
result:
ok Correct answer.
Test #23:
score: 0
Accepted
time: 0ms
memory: 5900kb
input:
21 2 4 4 6 8 10 8 8 10 10 12 10 10 10 10 8 6 4 2 0
output:
Yes 20 19 3 18 17 7 6 8 16 10 12 11 13 14 15 9 5 4 2 1 21
result:
ok Correct answer.
Test #24:
score: 0
Accepted
time: 1ms
memory: 5944kb
input:
42 2 2 4 4 4 6 8 10 12 12 14 12 14 14 12 12 14 12 14 12 14 12 14 12 12 12 10 12 14 16 14 12 14 14 12 10 8 6 4 2 0
output:
Yes 41 2 40 4 5 39 38 37 27 10 12 11 15 14 13 16 18 17 20 19 22 21 24 23 25 26 9 36 32 31 30 29 35 34 33 28 8 7 6 3 1 42
result:
ok Correct answer.
Test #25:
score: 0
Accepted
time: 1ms
memory: 5964kb
input:
87 2 0 2 2 4 6 6 6 8 8 8 10 12 10 10 12 10 12 10 12 14 14 12 12 14 16 14 16 18 16 18 16 18 18 20 20 20 22 20 20 18 18 20 20 20 22 24 26 24 24 26 26 28 28 28 30 28 30 28 30 30 30 30 30 32 30 30 30 28 30 28 26 26 24 22 20 18 16 14 12 10 8 6 4 2 0
output:
Yes 2 1 86 4 85 84 7 8 83 10 11 82 14 13 15 17 16 19 18 81 23 22 21 24 80 27 26 79 30 29 32 31 78 34 41 36 37 39 38 40 35 42 77 44 45 76 75 49 48 50 74 52 72 54 55 57 56 59 58 69 61 62 63 64 66 65 67 68 60 71 70 53 73 51 47 46 43 33 28 25 20 12 9 6 5 3 87
result:
ok Correct answer.
Test #26:
score: 0
Accepted
time: 1ms
memory: 5968kb
input:
89 0 2 4 2 2 4 6 4 6 8 8 6 6 8 8 8 10 12 12 14 12 14 16 14 14 14 16 14 16 18 16 16 16 14 14 12 14 16 14 14 16 16 16 18 20 18 18 18 20 22 24 24 26 28 30 30 32 30 30 32 30 28 30 32 34 32 34 32 34 32 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 0
output:
Yes 1 88 4 3 5 87 8 7 86 12 11 10 13 85 15 16 84 83 19 21 20 36 24 23 25 26 28 27 34 31 30 32 33 29 35 22 82 39 38 40 81 42 43 80 46 45 47 48 79 78 77 52 76 75 62 56 58 57 59 61 60 55 74 73 66 65 68 67 70 69 72 71 64 63 54 53 51 50 49 44 41 37 18 17 14 9 6 2 89
result:
ok Correct answer.
Test #27:
score: 0
Accepted
time: 1ms
memory: 7984kb
input:
87 2 2 2 2 4 6 8 10 8 8 10 10 8 10 8 10 8 8 8 10 8 10 10 8 6 4 2 0 2 2 4 2 0 0 2 0 0 0 2 0 2 4 2 2 2 2 0 2 4 2 4 6 8 6 4 2 4 4 6 8 10 8 6 6 6 4 6 4 6 6 6 8 8 6 8 6 4 6 6 4 4 4 6 4 2 0
output:
Yes 28 2 3 4 27 26 25 9 8 10 13 12 11 15 14 17 16 18 19 21 20 24 23 22 7 6 5 1 33 30 32 31 29 34 36 35 37 38 40 39 47 43 42 44 45 46 41 86 50 49 56 55 54 53 52 51 85 58 66 63 62 61 60 64 65 59 68 67 77 70 71 74 73 72 76 75 69 80 79 78 81 82 84 83 57 48 87
result:
ok Correct answer.
Test #28:
score: 0
Accepted
time: 1ms
memory: 5968kb
input:
449 0 0 2 2 2 0 2 2 0 0 2 2 0 2 4 4 2 0 2 4 6 4 6 4 4 4 4 2 0 2 4 4 6 4 4 2 0 0 0 0 0 0 2 0 0 2 0 0 2 2 4 2 2 4 4 2 0 2 0 0 0 2 4 2 2 4 6 8 10 10 8 8 6 8 8 6 6 6 8 6 6 6 6 8 8 6 4 4 6 6 8 6 4 4 6 6 4 6 6 4 2 4 6 4 6 8 10 8 10 8 8 6 4 2 4 4 2 2 4 2 2 4 2 4 2 4 2 2 0 2 0 0 0 0 0 0 2 2 2 0 0 2 0 2 0 0 ...
output:
Yes 1 2 6 4 5 3 9 8 7 10 13 12 11 18 17 16 15 14 29 28 22 21 24 23 25 26 27 20 19 37 36 32 34 33 35 31 30 38 39 40 41 42 44 43 45 47 46 48 57 50 52 51 53 56 55 54 49 59 58 60 61 129 64 63 65 101 87 73 71 70 69 72 68 76 75 74 77 78 80 79 81 82 83 86 85 84 67 88 93 90 92 91 89 94 97 96 95 100 99 98 66...
result:
ok Correct answer.
Test #29:
score: 0
Accepted
time: 1ms
memory: 5984kb
input:
3639 0 2 4 6 8 8 6 8 10 10 10 8 8 8 10 8 8 6 6 6 8 10 12 10 8 8 10 8 8 6 8 10 12 12 12 14 12 12 14 16 16 18 18 16 18 18 18 18 16 16 18 18 18 18 20 20 18 20 18 20 20 18 20 20 18 16 14 12 12 12 10 12 10 12 14 16 14 16 16 14 14 14 12 10 8 8 8 8 10 12 10 12 12 10 12 10 12 14 16 14 16 18 20 18 16 16 18 2...
output:
Yes 1 183 182 178 7 6 5 18 12 10 11 9 13 14 16 15 17 8 19 20 30 25 24 23 22 26 28 27 29 21 177 85 71 34 35 37 36 38 68 67 41 44 43 42 49 46 47 48 45 50 66 52 53 54 57 56 55 59 58 62 61 60 65 64 63 51 40 39 69 70 33 73 72 84 83 77 76 80 79 78 81 82 75 74 32 86 87 88 173 91 90 94 93 92 96 95 171 118 1...
result:
ok Correct answer.
Test #30:
score: 0
Accepted
time: 1ms
memory: 5860kb
input:
143 0 2 0 2 4 4 2 4 2 4 2 4 2 0 2 2 0 0 2 4 2 2 0 2 0 0 0 0 2 2 2 2 4 4 6 4 4 4 4 6 8 8 6 4 6 4 4 6 8 6 4 6 8 6 6 6 4 4 2 4 2 4 2 2 4 4 6 6 6 6 4 4 4 2 4 2 0 2 0 2 0 2 4 6 8 6 8 6 4 2 0 2 2 0 0 2 0 0 0 0 0 0 0 0 2 2 2 0 0 0 0 2 4 4 2 2 2 4 4 2 2 4 2 4 6 6 8 6 6 6 8 10 10 8 6 6 6 4 4 2 0 0
output:
Yes 1 3 2 14 7 6 5 9 8 11 10 13 12 4 17 16 15 18 23 21 20 22 19 25 24 26 27 28 77 30 31 32 59 34 36 35 37 38 39 44 43 42 41 40 46 45 47 51 50 49 48 57 54 53 55 56 52 58 33 61 60 63 62 64 74 66 71 68 69 70 67 72 73 65 76 75 29 79 78 81 80 91 90 89 86 85 88 87 84 83 82 94 93 92 95 97 96 98 99 100 101 ...
result:
ok Correct answer.
Test #31:
score: 0
Accepted
time: 7ms
memory: 8392kb
input:
69995 2 2 0 2 4 4 4 4 6 6 8 10 8 8 6 6 8 8 8 8 10 12 14 12 12 10 10 10 12 10 12 12 14 16 14 14 14 14 14 14 12 14 14 16 16 14 14 16 18 18 18 20 18 18 18 18 18 20 18 16 14 14 12 14 16 18 20 20 18 16 16 16 18 20 22 20 20 18 16 18 18 16 14 16 16 14 12 10 10 10 10 8 6 6 6 8 8 6 4 6 8 8 10 12 12 12 14 12 ...
output:
Yes 3 2 1 118 117 6 7 8 99 10 15 13 12 14 11 16 93 18 19 20 92 26 24 23 25 22 27 28 30 29 88 32 41 35 34 36 37 38 39 40 33 63 43 46 45 44 47 61 60 50 51 53 52 54 55 56 57 59 58 49 48 62 42 87 83 70 69 68 67 66 71 72 79 78 76 75 77 74 73 82 81 80 65 86 85 84 64 31 89 90 91 21 17 94 95 98 97 96 9 116 ...
result:
ok Correct answer.
Test #32:
score: 0
Accepted
time: 16ms
memory: 8504kb
input:
199949 0 0 0 0 2 2 0 2 4 6 6 8 8 6 8 8 8 6 6 6 6 8 8 8 10 12 14 16 16 14 12 12 12 12 14 16 14 14 14 16 18 20 20 18 16 16 14 14 12 10 10 12 12 14 12 14 12 10 8 8 8 6 6 4 2 2 0 0 0 0 2 2 4 2 0 2 4 2 4 4 2 4 2 4 6 8 10 12 10 10 12 12 12 10 10 12 14 12 10 12 12 12 14 12 14 12 14 14 16 18 16 16 18 16 14 ...
output:
Yes 1 2 3 4 7 6 5 67 65 64 11 14 13 12 18 16 17 15 19 20 21 62 23 24 59 50 31 30 29 28 27 32 33 34 49 37 36 38 39 47 45 44 43 42 41 46 40 48 35 26 51 58 53 55 54 57 56 52 25 60 61 22 63 10 9 66 8 68 69 70 75 72 74 73 71 401 78 77 81 80 79 83 82 335 333 130 128 89 88 90 94 92 93 91 95 99 98 97 96 127...
result:
ok Correct answer.
Test #33:
score: 0
Accepted
time: 20ms
memory: 8200kb
input:
199815 0 2 2 2 4 2 0 2 0 2 4 2 0 0 2 2 0 0 0 0 0 0 0 0 2 0 0 0 0 0 2 4 2 2 4 2 0 2 2 2 2 2 4 2 4 6 6 4 2 2 2 2 4 4 2 2 0 2 0 0 0 2 0 0 2 2 0 2 0 2 4 4 4 6 4 6 4 4 2 0 2 2 2 2 2 0 2 4 2 2 2 4 2 0 0 0 2 4 6 8 6 6 6 4 4 4 2 2 4 4 6 6 4 4 2 4 4 2 2 2 4 2 2 2 2 2 4 2 4 6 4 2 0 2 2 0 0 2 2 4 2 2 4 2 2 2 4...
output:
Yes 1 7 3 4 6 5 2 9 8 13 12 11 10 14 17 16 15 18 19 20 21 22 23 24 26 25 27 28 29 30 37 33 32 34 36 35 31 57 39 40 41 42 44 43 49 48 47 46 45 50 51 52 55 54 53 56 38 59 58 60 61 63 62 64 67 66 65 69 68 80 79 72 73 75 74 77 76 78 71 70 86 82 83 84 85 81 94 89 88 90 91 93 92 87 95 96 133 107 104 101 1...
result:
ok Correct answer.
Test #34:
score: 0
Accepted
time: 21ms
memory: 8256kb
input:
199840 2 4 2 0 2 2 4 6 6 6 8 8 10 12 14 14 14 12 10 12 10 8 6 8 6 6 6 4 6 6 8 6 6 4 2 4 6 4 6 4 2 4 6 6 6 8 8 8 8 10 8 8 6 8 6 6 8 8 8 8 8 10 8 8 6 6 8 10 8 6 4 4 2 4 6 8 6 8 8 10 12 12 10 8 10 8 10 12 10 10 10 10 10 12 12 12 10 10 10 10 12 14 12 14 12 12 10 10 8 6 8 10 12 14 16 16 18 16 16 16 18 20...
output:
Yes 4 3 2 1 12036 6 35 28 9 10 23 12 22 19 18 16 17 15 14 21 20 13 11 25 24 26 27 8 34 30 32 31 33 29 7 41 38 37 40 39 36 73 71 44 45 53 47 48 49 51 50 52 46 55 54 56 65 58 59 60 61 63 62 64 57 66 70 69 68 67 43 72 42 12023 11865 77 76 110 79 84 83 82 81 80 86 85 109 89 88 90 91 92 93 97 95 96 94 98...
result:
ok Correct answer.
Test #35:
score: 0
Accepted
time: 16ms
memory: 8532kb
input:
200000 0 2 0 2 0 0 2 2 2 0 0 0 0 0 2 0 0 2 4 6 6 4 4 6 4 6 4 2 0 0 2 0 2 0 0 2 2 4 6 4 6 6 8 6 4 6 8 6 4 2 2 4 4 2 2 4 2 0 2 0 2 2 2 2 0 0 2 0 0 0 0 2 2 4 4 6 8 8 8 10 12 12 10 8 8 10 12 14 12 10 10 8 6 8 8 8 8 8 10 10 8 10 8 10 12 10 12 10 8 10 10 8 6 4 4 2 4 6 6 4 2 4 6 4 4 6 4 2 2 4 6 6 4 6 4 6 8...
output:
Yes 1 3 2 5 4 6 10 8 9 7 11 12 13 14 16 15 17 29 28 22 21 20 23 25 24 27 26 19 18 30 32 31 34 33 35 58 37 50 40 39 45 42 44 43 41 49 48 47 46 38 51 54 53 52 55 57 56 36 60 59 65 62 63 64 61 66 68 67 69 70 71 155 73 116 75 114 93 78 79 84 83 82 81 80 85 92 90 89 88 87 91 86 77 113 95 96 97 98 101 100...
result:
ok Correct answer.
Test #36:
score: 0
Accepted
time: 20ms
memory: 8600kb
input:
199999 0 2 2 2 0 0 2 2 2 4 2 4 2 2 2 4 2 4 4 4 6 8 6 6 8 8 6 6 8 10 8 6 4 2 2 0 0 2 2 0 2 0 0 0 0 0 2 4 4 2 0 2 2 4 4 4 4 4 6 8 6 8 8 10 8 6 8 8 6 4 6 6 8 8 8 6 8 6 6 6 6 6 8 6 8 6 4 6 6 6 4 2 4 4 6 4 2 0 0 0 2 4 6 8 10 12 12 14 14 12 10 8 10 12 12 12 12 14 12 12 14 12 10 12 12 14 16 14 16 16 14 12 ...
output:
Yes 1 5 3 4 2 6 36 8 9 11 10 13 12 14 15 17 16 34 19 20 33 23 22 24 27 26 25 28 32 31 30 29 21 18 35 7 37 40 39 38 42 41 43 44 45 46 51 50 49 48 47 98 53 92 55 56 57 58 70 61 60 66 63 65 64 62 69 68 67 59 87 72 76 74 75 73 78 77 79 80 81 82 84 83 86 85 71 91 89 90 88 54 97 94 96 95 93 52 99 100 726 ...
result:
ok Correct answer.
Test #37:
score: 0
Accepted
time: 1ms
memory: 5632kb
input:
31 2 2 0 2 2 4 2 0 0 0 2 2 4 6 6 8 6 8 6 8 8 6 4 6 6 6 4 6 4 4
output:
No
result:
ok Correct answer.
Test #38:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
25 0 2 4 4 6 4 2 0 2 2 0 0 2 0 0 2 4 4 4 4 4 6 6 6
output:
No
result:
ok Correct answer.
Test #39:
score: 0
Accepted
time: 1ms
memory: 5676kb
input:
123 2 0 2 4 4 2 4 2 0 0 0 2 0 0 2 4 6 4 6 8 8 6 6 4 4 6 4 6 8 6 6 4 4 4 6 6 4 6 4 2 4 4 4 6 6 4 4 2 0 0 2 2 2 0 0 2 2 4 2 2 2 2 0 2 4 4 2 2 0 2 2 2 0 2 4 2 0 0 2 2 4 2 2 2 2 0 2 0 0 0 0 2 0 0 0 0 0 0 2 4 6 4 6 6 8 6 6 6 4 4 2 2 4 4 2 2 0 0 0 2 4 6
output:
No
result:
ok Correct answer.
Test #40:
score: 0
Accepted
time: 1ms
memory: 5632kb
input:
117 0 2 0 2 0 0 0 0 2 0 0 2 0 0 2 2 0 0 2 0 0 0 0 0 2 4 4 2 0 2 0 2 0 0 2 4 4 4 4 6 6 8 10 8 10 12 10 12 14 14 12 10 12 14 16 18 20 20 22 20 20 18 18 20 18 20 18 16 18 16 16 18 20 22 24 24 22 22 22 24 26 24 24 26 26 24 26 26 28 30 32 30 30 28 26 26 26 26 26 24 22 24 22 22 22 20 22 24 24 24 22 22 22 ...
output:
No
result:
ok Correct answer.
Test #41:
score: 0
Accepted
time: 1ms
memory: 5820kb
input:
316 0 0 0 2 0 0 0 2 4 6 8 8 6 4 6 4 4 2 2 2 4 2 4 6 6 8 8 6 4 2 4 2 2 4 2 0 2 0 0 0 2 4 2 4 2 0 2 0 0 2 4 4 4 2 2 0 0 0 2 4 4 2 2 4 6 8 10 8 8 10 12 12 12 14 14 14 12 12 14 14 12 10 8 8 6 6 4 6 6 4 6 4 6 4 2 2 2 4 2 4 6 8 6 4 4 2 0 2 2 4 6 8 6 8 8 6 4 6 6 6 6 8 6 8 10 10 12 14 12 12 10 8 8 8 10 10 1...
output:
No
result:
ok Correct answer.
Test #42:
score: 0
Accepted
time: 1ms
memory: 5884kb
input:
1013 2 0 2 0 0 2 0 2 2 2 0 2 0 2 0 0 0 2 0 2 0 0 0 0 2 4 2 2 0 2 2 0 0 2 2 4 6 8 8 10 10 10 12 10 10 10 8 10 8 8 6 4 4 2 2 4 2 2 2 4 4 6 8 6 8 10 8 10 10 8 8 8 10 8 8 10 12 14 16 18 16 16 14 16 18 18 16 16 16 16 16 14 12 14 16 16 18 16 16 18 16 18 20 22 20 18 16 16 18 18 18 16 16 16 14 14 12 12 10 8...
output:
No
result:
ok Correct answer.
Test #43:
score: 0
Accepted
time: 1ms
memory: 7956kb
input:
11897 2 0 0 2 2 2 2 2 4 4 6 8 8 10 10 10 10 12 14 12 12 10 8 10 10 8 6 8 6 6 6 8 6 4 2 0 0 2 0 2 2 2 4 4 6 8 10 12 12 12 10 12 10 8 10 8 6 6 8 6 8 8 8 10 8 6 6 6 8 6 4 6 8 6 6 4 6 6 8 6 4 2 4 6 6 6 4 6 8 6 8 10 12 14 14 14 14 12 14 14 16 18 18 16 16 16 18 16 18 16 14 12 14 14 12 10 10 8 10 8 10 10 1...
output:
No
result:
ok Correct answer.
Test #44:
score: 0
Accepted
time: 11ms
memory: 8472kb
input:
199073 0 0 2 0 2 0 2 0 2 0 2 4 6 8 8 6 6 8 6 8 10 12 12 12 14 12 10 10 12 10 8 8 10 8 6 6 8 8 8 10 12 10 12 12 14 14 14 12 14 14 14 12 10 12 10 10 8 8 8 10 10 8 8 6 8 6 4 6 4 6 8 8 10 10 12 12 14 12 14 16 16 16 16 14 14 16 16 16 14 12 10 12 14 16 16 14 12 14 12 12 10 8 6 8 6 4 4 4 4 6 8 6 8 8 10 10 ...
output:
No
result:
ok Correct answer.
Test #45:
score: 0
Accepted
time: 11ms
memory: 8464kb
input:
199036 0 0 0 0 0 2 4 4 2 4 4 4 4 4 2 2 0 2 2 0 0 2 2 2 0 2 0 2 0 0 2 4 6 8 8 10 10 8 8 10 12 12 14 12 12 14 16 16 14 14 14 12 12 10 10 10 12 14 16 18 20 18 20 20 22 24 24 26 26 28 28 26 28 26 26 28 30 28 28 30 30 30 30 28 28 26 26 24 22 22 20 22 24 26 24 26 24 24 22 20 22 22 24 26 28 26 26 28 26 26 ...
output:
No
result:
ok Correct answer.
Test #46:
score: 0
Accepted
time: 7ms
memory: 8260kb
input:
200000 0 0 0 2 0 0 0 0 0 2 0 2 4 2 0 0 2 4 2 4 2 4 4 4 2 4 4 6 6 6 4 6 8 6 8 6 4 4 6 6 4 4 2 2 0 0 2 2 0 0 0 0 0 2 0 0 2 2 2 4 4 6 8 10 12 14 12 10 10 12 14 12 14 12 14 14 12 10 8 10 8 10 10 10 10 8 8 10 10 10 10 8 8 10 12 10 10 10 8 6 4 6 4 6 8 8 10 10 12 10 10 10 8 6 8 6 6 6 6 8 10 10 12 12 10 8 8...
output:
No
result:
ok Correct answer.
Test #47:
score: 0
Accepted
time: 11ms
memory: 7796kb
input:
200000 2 4 2 2 0 2 2 4 6 4 4 4 2 4 2 2 4 6 8 10 8 6 4 4 2 2 4 4 6 4 2 4 6 8 6 4 4 2 2 4 4 4 6 8 8 6 4 6 8 10 10 8 6 6 4 6 8 6 6 8 6 8 8 8 6 8 10 12 14 12 10 10 10 8 10 8 10 10 8 10 8 10 8 10 10 10 8 10 8 10 8 10 10 12 12 14 12 12 12 14 16 14 16 14 16 18 18 20 18 18 20 22 20 20 22 22 24 22 24 26 28 2...
output:
No
result:
ok Correct answer.
Test #48:
score: 0
Accepted
time: 1ms
memory: 5812kb
input:
111 164 164 164 164 162 160 162 160 162 162 164 162 164 166 164 164 162 162 164 166 168 168 166 164 164 164 164 162 162 162 160 158 160 160 160 160 162 164 166 164 166 166 168 170 172 170 172 172 172 174 174 176 176 176 174 172 172 170 170 172 170 170 170 168 166 168 170 170 170 172 174 172 172 172 ...
output:
No
result:
ok Correct answer.
Test #49:
score: 0
Accepted
time: 1ms
memory: 5880kb
input:
6 6 6 6 4 6
output:
No
result:
ok Correct answer.
Test #50:
score: 0
Accepted
time: 1ms
memory: 5816kb
input:
8 14 14 12 12 14 14 12
output:
No
result:
ok Correct answer.
Test #51:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
1728 2848 2846 2846 2844 2844 2844 2846 2848 2850 2850 2850 2848 2848 2846 2846 2848 2848 2850 2850 2852 2852 2854 2854 2852 2852 2854 2856 2854 2854 2856 2856 2858 2858 2858 2858 2860 2858 2858 2856 2854 2852 2852 2854 2854 2854 2854 2854 2854 2852 2850 2848 2848 2848 2848 2846 2844 2842 2844 2842 ...
output:
No
result:
ok Correct answer.
Test #52:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
6650 756 754 752 750 750 752 752 750 748 750 750 748 748 748 750 750 752 752 752 754 754 754 752 752 752 754 752 754 752 750 748 748 746 746 748 746 748 750 750 748 748 750 748 746 748 748 750 752 754 756 754 756 758 760 758 760 762 762 760 760 760 762 764 762 760 762 764 762 760 760 758 756 756 758...
output:
No
result:
ok Correct answer.
Test #53:
score: 0
Accepted
time: 11ms
memory: 7836kb
input:
183432 43522 43520 43520 43518 43520 43520 43522 43522 43524 43524 43524 43524 43524 43522 43522 43520 43522 43522 43522 43524 43524 43524 43522 43520 43522 43520 43520 43518 43518 43518 43516 43514 43512 43512 43514 43514 43516 43518 43518 43520 43522 43522 43522 43524 43524 43526 43528 43530 43532...
output:
No
result:
ok Correct answer.
Test #54:
score: 0
Accepted
time: 8ms
memory: 8476kb
input:
197109 112716 112714 112712 112710 112708 112710 112710 112708 112708 112708 112708 112708 112708 112708 112706 112708 112706 112704 112702 112704 112702 112702 112704 112704 112706 112704 112706 112704 112702 112704 112702 112702 112704 112704 112702 112700 112702 112702 112704 112706 112704 112706...
output:
No
result:
ok Correct answer.
Test #55:
score: 0
Accepted
time: 8ms
memory: 8216kb
input:
200000 79584 79582 79580 79578 79576 79578 79576 79578 79576 79576 79576 79578 79578 79578 79578 79580 79578 79578 79576 79576 79576 79576 79574 79576 79578 79576 79578 79576 79576 79576 79574 79572 79572 79574 79572 79570 79572 79570 79572 79572 79570 79572 79572 79572 79570 79568 79566 79566 79564...
output:
No
result:
ok Correct answer.
Test #56:
score: 0
Accepted
time: 12ms
memory: 8112kb
input:
200000 99970 99968 99970 99970 99972 99972 99972 99970 99972 99974 99972 99970 99972 99970 99970 99972 99970 99968 99968 99968 99966 99968 99966 99966 99964 99964 99962 99960 99960 99960 99958 99956 99958 99958 99960 99962 99960 99960 99962 99964 99966 99964 99962 99964 99966 99968 99966 99966 99968...
output:
No
result:
ok Correct answer.
Test #57:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
111 42 90 4 4 105 110 6 81 62 51 19 96 29 48 32 95 99 36 87 46 51 36 55 79 27 53 100 11 85 24 95 43 25 29 16 105 96 69 47 83 67 88 19 24 98 79 18 83 64 80 55 82 76 20 97 2 106 86 7 72 32 26 74 30 93 55 3 72 51 66 60 34 37 73 75 72 92 105 56 17 100 45 15 9 19 3 1 26 89 28 69 54 18 48 92 68 9 76 98 20...
output:
No
result:
ok Correct answer.
Test #58:
score: 0
Accepted
time: 0ms
memory: 5632kb
input:
6 6 1 5 1 0
output:
No
result:
ok Correct answer.
Test #59:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
8 7 5 1 0 0 7 2
output:
No
result:
ok Correct answer.
Test #60:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
1727 676 1386 726 1451 30 1539 449 1010 631 359 1485 574 203 93 831 1416 616 976 562 193 187 1400 720 831 858 88 1645 1490 877 1056 64 629 1018 434 638 1376 971 1473 1429 1722 61 726 194 44 680 109 719 1425 1382 124 236 393 322 1363 937 749 1087 1630 974 1565 322 1672 856 1588 988 762 16 349 1016 76...
output:
No
result:
ok Correct answer.
Test #61:
score: 0
Accepted
time: 2ms
memory: 5676kb
input:
25178 21930 6736 1644 12759 9883 21407 8842 21751 21705 18611 22321 14249 20919 512 10428 4903 24312 20965 7411 1776 13158 4956 20999 10790 2897 23373 7266 14739 4513 17843 5473 11142 23083 3599 9117 646 7439 23537 21538 11029 23418 4707 7446 22983 19568 21081 19745 4334 5804 18387 21135 15220 5463 ...
output:
No
result:
ok Correct answer.
Test #62:
score: 0
Accepted
time: 11ms
memory: 6220kb
input:
182116 117381 26649 35793 135916 15929 68711 71141 11874 144083 139151 86340 19594 70577 122291 81677 58659 151571 150483 136897 119540 168 168295 134203 117123 123755 18692 51838 143601 57441 79353 180139 164591 114199 91804 181774 114389 65434 3729 92348 145879 126675 125237 177666 90600 92408 308...
output:
No
result:
ok Correct answer.
Test #63:
score: 0
Accepted
time: 12ms
memory: 4604kb
input:
197110 101556 144475 34194 80082 109743 163725 102319 58398 73221 123939 58876 73183 145678 1656 173494 1485 76530 21457 128545 168224 165969 42702 26481 48236 8040 171148 58121 46353 9097 177262 84030 57534 69640 166978 58740 170905 186139 189424 108073 158971 28173 176379 182876 31922 186804 5434 ...
output:
No
result:
ok Correct answer.
Test #64:
score: 0
Accepted
time: 12ms
memory: 6508kb
input:
200000 121792 132858 181367 55957 86656 78755 74826 93569 131108 73414 96357 117863 62319 31627 107695 186152 109208 181797 102371 85017 191980 14982 39710 18780 177860 74388 58506 179097 26637 4733 59658 79980 103270 149770 170863 1071 91973 113274 92542 108130 100842 14768 107028 44984 104763 9643...
output:
No
result:
ok Correct answer.
Test #65:
score: 0
Accepted
time: 12ms
memory: 6044kb
input:
200000 6943 64617 131553 140808 159796 5209 144636 178444 109829 130098 91439 52118 83555 80752 236 174204 21212 4415 96727 65280 85651 49749 198117 141914 154997 81077 174823 170296 70872 120432 139969 5597 103859 194562 26014 60569 117612 70945 192158 130545 36950 43308 105994 82124 82132 24077 99...
output:
No
result:
ok Correct answer.
Test #66:
score: 0
Accepted
time: 0ms
memory: 5816kb
input:
17 17 16 16 4 12 0 15 1 14 16 0 12 3 4 9 10
output:
No
result:
ok Correct answer.
Test #67:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
29 28 1 0 8 16 29 23 29 20 13 23 25 18 14 13 14 4 29 17 6 12 19 2 6 9 20 21 20
output:
No
result:
ok Correct answer.
Test #68:
score: 0
Accepted
time: 0ms
memory: 5832kb
input:
251 48 135 25 150 77 162 238 171 204 217 223 86 23 228 162 175 106 242 20 226 231 59 9 58 118 210 225 217 139 212 25 148 96 72 6 105 50 172 205 165 205 111 40 25 122 197 233 200 113 103 233 174 115 163 35 217 168 32 191 133 118 64 158 23 208 203 42 155 34 200 16 134 39 23 93 107 75 169 57 242 50 249...
output:
No
result:
ok Correct answer.
Test #69:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
output:
Yes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
result:
ok Correct answer.
Test #70:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
134 0 0 0 0 4 1 1 0 1 0 1 0 1 1 1 0 0 1 0 2 0 0 0 0 0 0 0 1 0 0 0 2 0 1 1 0 0 2 0 0 0 0 3 0 3 0 1 0 0 0 1 4 0 0 1 0 1 2 0 0 0 4 2 0 0 1 0 1 0 0 4 0 0 0 0 3 1 0 0 0 1 0 0 0 0 0 0 2 0 0 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 3 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 0 0
output:
No
result:
ok Correct answer.
Test #71:
score: 0
Accepted
time: 1ms
memory: 3908kb
input:
17211 2 0 2 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 3 0 0 1 1 1 1 2 0 2 0 0 0 0 0 0 0 0 0 0 0 2 0 2 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 3 1 0 0 1 0 0 1 0 0 2 0 2 0 0 0 0 0 0 0 0 1 0 2 0 1 0 1 0 0 0 0 0 0 1 1 3 1 0 0 1 2 0 0 0 0 0 1 0 0 2 1 0 0 0 0 0 2 0 3 0 0 0 0 2 0 1 0 1 ...
output:
No
result:
ok Correct answer.
Test #72:
score: 0
Accepted
time: 4ms
memory: 5668kb
input:
68446 249 56 230 80 153 4 298 690 260 410 46 172 305 92 106 1535 12 81 415 77 81 446 33 1 386 473 70 78 51 162 35 23 214 233 245 497 374 447 520 259 52 106 228 510 88 124 122 293 341 80 717 700 71 138 810 213 79 187 249 487 396 72 722 199 385 70 12 688 101 243 685 885 594 48 226 165 497 379 143 149 ...
output:
No
result:
ok Correct answer.
Test #73:
score: 0
Accepted
time: 11ms
memory: 4612kb
input:
198243 103 562 450 1383 1318 337 164 415 1447 600 52 182 438 2935 990 77 156 1034 979 208 223 1454 110 20 627 822 925 1667 2682 571 1616 3446 1486 2885 3854 791 182 333 338 2506 1479 159 3818 974 3178 2032 1091 842 529 29 948 1046 473 825 224 1353 1700 1629 70 144 1082 671 212 40 7 160 1367 43 283 4...
output:
No
result:
ok Correct answer.
Test #74:
score: 0
Accepted
time: 7ms
memory: 4404kb
input:
198271 328 167 159 77 390 625 654 1872 444 71 767 208 816 2334 420 261 3293 613 1909 4360 429 117 722 477 957 665 3391 537 397 871 13 72 1311 2016 1557 1024 84 208 88 1323 635 201 395 441 65 1635 80 1275 1228 53 4 110 1400 146 1248 461 1474 773 51 436 1017 1261 530 1212 661 2139 379 2281 446 350 214...
output:
No
result:
ok Correct answer.
Test #75:
score: 0
Accepted
time: 11ms
memory: 4600kb
input:
200000 377 682 425 34 1086 1914 245 481 625 1963 757 68 2853 4 574 868 910 333 1091 652 1751 1450 1518 451 2474 22 713 1256 2784 1737 600 3182 628 1525 2039 218 40 123 1046 78 2303 1991 32 2315 1598 94 496 1771 355 284 31 391 893 6311 1162 607 1053 4293 771 1308 265 2074 268 81 372 2341 1805 740 516...
output:
No
result:
ok Correct answer.
Test #76:
score: 0
Accepted
time: 11ms
memory: 4608kb
input:
200000 1532 256 1401 9 505 181 108 331 2118 1190 1990 294 1369 203 1084 670 165 25 256 355 814 1013 581 100 1532 1578 335 1727 260 42 2002 416 1611 2698 1001 510 1205 317 2281 2095 823 979 368 2004 1506 188 1273 518 3185 126 101 1709 413 2565 669 3182 2219 2706 159 5436 526 220 1656 6165 488 1881 27...
output:
No
result:
ok Correct answer.