QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#199592#7346. Frogssalvator_noster#AC ✓22ms7072kbC++20729b2023-10-04 13:13:212023-10-04 13:13:21

Judging History

你现在查看的是最新测评结果

  • [2023-10-04 13:13:21]
  • 评测
  • 测评结果:AC
  • 用时:22ms
  • 内存:7072kb
  • [2023-10-04 13:13:21]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int M=2e5+10;
int A[M],que[M*2],ans[M];
int  main(){
	int n;
	scanf("%d",&n);
	int L=1,R=0;
	for(int i=1;i<n;++i)
		scanf("%d",&A[i]);
	for(int i=1;i<=n;++i){
		if(A[i]==A[i-1]){
			ans[i]=i;
		}else if(A[i]-A[i-1]==2){
			que[++R]=i;
			que[++R]=i;
		}else if(A[i-1]-A[i]==2){
			if(R-L+1>=2){
				if(ans[que[L]]){
					ans[i]=que[L++];
				}else ans[que[L++]]=i;
				if(ans[que[L]]&&ans[i]){
					puts("No");
					return 0;
				}
				if(ans[que[L]]){
					ans[i]=que[L++];
				}else ans[que[L++]]=i;
			}
		} else {
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	for(int i=1;i<=n;++i)
		printf("%d ",ans[i]);
	puts("");
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3800kb

input:

5
2 4 2 2

output:

Yes
3 5 1 4 2 

result:

ok Correct answer.

Test #2:

score: 0
Accepted
time: 0ms
memory: 5868kb

input:

4
1 2 3

output:

No

result:

ok Correct answer.

Test #3:

score: 0
Accepted
time: 0ms
memory: 5836kb

input:

2
0

output:

Yes
1 2 

result:

ok Correct answer.

Test #4:

score: 0
Accepted
time: 0ms
memory: 5804kb

input:

2
2

output:

Yes
2 1 

result:

ok Correct answer.

Test #5:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

2
1

output:

No

result:

ok Correct answer.

Test #6:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

3
0 0

output:

Yes
1 2 3 

result:

ok Correct answer.

Test #7:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

3
2 0

output:

Yes
2 1 3 

result:

ok Correct answer.

Test #8:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

3
0 2

output:

Yes
1 3 2 

result:

ok Correct answer.

Test #9:

score: 0
Accepted
time: 0ms
memory: 5856kb

input:

3
2 2

output:

Yes
3 2 1 

result:

ok Correct answer.

Test #10:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

3
2 4

output:

No

result:

ok Correct answer.

Test #11:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

3
1 0

output:

No

result:

ok Correct answer.

Test #12:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

3
1 1

output:

No

result:

ok Correct answer.

Test #13:

score: 0
Accepted
time: 14ms
memory: 6912kb

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: 6648kb

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
100001 100002 100003 100004 100005 100006 100007 100008 100009 100010 100011 100012 100013 100014 100015 100016 100017 100018 100019 100020 100021 100022 100023 100024 100025 100026 100027 100028 100029 100030 100031 100032 100033 100034 100035 100036 100037 100038 100039 100040 100041 100042 10...

result:

ok Correct answer.

Test #15:

score: 0
Accepted
time: 22ms
memory: 6292kb

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
100001 100002 100003 100004 100005 100006 100007 100008 100009 100010 100011 100012 100013 100014 100015 100016 100017 100018 100019 100020 100021 100022 100023 100024 100025 100026 100027 100028 100029 100030 100031 100032 100033 100034 100035 100036 100037 100038 100039 100040 100041 100042 10...

result:

ok Correct answer.

Test #16:

score: 0
Accepted
time: 18ms
memory: 6988kb

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: 0ms
memory: 3764kb

input:

14
2 4 2 2 2 4 6 6 6 4 4 2 0

output:

Yes
3 10 1 4 5 12 13 8 9 2 11 6 7 14 

result:

ok Correct answer.

Test #18:

score: 0
Accepted
time: 1ms
memory: 5904kb

input:

7
2 4 4 4 2 0

output:

Yes
5 6 3 4 1 2 7 

result:

ok Correct answer.

Test #19:

score: 0
Accepted
time: 1ms
memory: 5992kb

input:

3
0 0

output:

Yes
1 2 3 

result:

ok Correct answer.

Test #20:

score: 0
Accepted
time: 0ms
memory: 3800kb

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: 3868kb

input:

20
0 2 4 6 8 6 8 6 6 4 4 4 2 2 4 6 4 2 0

output:

Yes
1 6 8 10 13 2 17 3 9 4 11 12 5 14 18 19 7 15 16 20 

result:

ok Correct answer.

Test #22:

score: 0
Accepted
time: 1ms
memory: 5916kb

input:

9
0 2 4 6 4 4 2 0

output:

Yes
1 5 7 8 2 6 3 4 9 

result:

ok Correct answer.

Test #23:

score: 0
Accepted
time: 1ms
memory: 5840kb

input:

21
2 4 4 6 8 10 8 8 10 10 12 10 10 10 10 8 6 4 2 0

output:

Yes
7 12 3 16 17 18 1 8 19 10 20 2 13 14 15 4 5 6 9 11 21 

result:

ok Correct answer.

Test #24:

score: 0
Accepted
time: 0ms
memory: 3884kb

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
12 2 15 4 5 18 20 22 24 10 27 1 31 14 3 16 32 6 35 7 36 8 37 9 25 26 11 38 39 40 13 17 41 34 19 21 23 28 29 30 33 42 

result:

ok Correct answer.

Test #25:

score: 0
Accepted
time: 1ms
memory: 5996kb

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 14 4 17 19 7 8 23 10 11 27 30 3 15 32 5 39 6 41 49 22 9 24 57 59 12 66 69 13 71 16 72 34 74 36 37 75 18 40 20 42 76 44 45 77 78 79 21 50 80 52 81 54 55 82 25 83 26 84 61 62 63 64 85 28 67 68 29 86 31 33 73 35 38 43 46 47 48 51 53 56 58 60 65 70 87 

result:

ok Correct answer.

Test #26:

score: 0
Accepted
time: 0ms
memory: 3960kb

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 4 8 2 5 12 21 3 24 28 11 6 13 31 15 16 34 36 19 39 7 46 58 9 25 26 61 10 62 66 14 32 33 17 35 18 68 70 20 40 72 42 43 73 74 22 47 48 75 76 77 52 78 79 80 56 81 23 59 82 27 29 83 84 85 30 86 37 87 38 88 41 44 45 49 50 51 53 54 55 57 60 63 64 65 67 69 71 89 

result:

ok Correct answer.

Test #27:

score: 0
Accepted
time: 1ms
memory: 5864kb

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
9 2 3 4 13 15 17 21 1 10 24 12 5 25 6 26 7 18 19 27 8 28 23 11 14 16 20 22 32 30 33 29 31 34 36 35 37 38 40 39 43 47 41 44 45 46 42 50 54 48 55 56 62 49 51 52 63 58 66 68 74 53 57 64 65 59 76 60 77 70 71 80 73 61 84 67 69 85 79 72 81 82 86 75 78 83 87 

result:

ok Correct answer.

Test #28:

score: 0
Accepted
time: 0ms
memory: 3804kb

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 17 18 16 14 15 22 24 28 19 29 20 25 26 27 21 23 34 36 32 37 30 35 31 33 38 39 40 41 42 44 43 45 47 46 48 52 50 56 49 53 57 55 51 54 59 58 60 61 64 71 62 65 73 76 80 86 70 63 72 66 87 75 67 77 78 92 68 81 82 83 93 85 69 74 88 97 90 100 79 84 94 101 96 89 104 99 91 95...

result:

ok Correct answer.

Test #29:

score: 0
Accepted
time: 0ms
memory: 3796kb

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 7 12 16 18 6 2 24 25 10 11 3 13 14 28 4 17 5 19 20 30 37 44 8 9 26 49 15 29 21 57 59 62 34 35 65 22 38 66 67 41 68 43 23 71 46 47 48 27 50 73 52 53 54 77 56 31 80 32 83 61 33 84 64 36 39 40 42 69 70 45 85 51 91 94 96 55 100 79 58 81 82 60 63 72 86 87 88 104 105 74 110 93 75 112 76 113 116 118 ...

result:

ok Correct answer.

Test #30:

score: 0
Accepted
time: 1ms
memory: 5920kb

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 7 9 6 4 11 5 13 8 14 10 12 17 16 15 18 21 23 19 22 20 25 24 26 27 28 36 30 31 32 43 34 44 29 37 38 39 46 50 42 33 35 51 40 47 54 57 41 45 59 61 48 55 56 49 58 52 63 53 71 60 64 74 66 76 68 69 70 62 72 73 65 77 67 75 79 78 81 80 86 88 89 90 82 91 83 84 85 87 94 93 92 95 97 96 98 99 100 101 ...

result:

ok Correct answer.

Test #31:

score: 0
Accepted
time: 7ms
memory: 6152kb

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 13 15 6 7 8 24 10 26 30 4 14 5 16 35 18 19 20 41 46 53 9 25 11 27 28 59 12 60 32 61 63 17 36 37 38 39 40 21 69 43 70 45 22 47 76 78 50 51 79 23 54 55 56 57 82 29 31 33 62 34 83 86 87 88 68 42 44 71 72 92 93 98 48 77 49 52 99 81 58 64 108 85 65 66 67 89 90 91 73 74 94 95 109 97 75 80 110 11...

result:

ok Correct answer.

Test #32:

score: 0
Accepted
time: 20ms
memory: 6916kb

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 14 18 30 11 31 13 8 37 16 17 9 19 20 21 44 23 24 45 47 49 50 29 10 12 32 33 34 55 57 15 38 39 58 59 62 43 22 25 46 26 48 27 28 51 64 53 65 35 67 36 40 41 60 61 42 63 52 54 66 56 68 69 70 74 72 75 71 73 78 81 76 83 80 77 89 79 94 98 99 104 106 82 90 111 92 93 84 95 114 115 85 86 116...

result:

ok Correct answer.

Test #33:

score: 0
Accepted
time: 20ms
memory: 5960kb

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 6 3 4 7 2 5 9 8 12 13 10 11 14 17 16 15 18 19 20 21 22 23 24 26 25 27 28 29 30 33 36 31 34 37 32 35 44 39 40 41 42 48 38 49 55 47 43 45 50 51 52 57 54 46 56 53 59 58 60 61 63 62 64 67 66 65 69 68 75 77 72 73 79 70 80 71 78 74 76 86 82 83 84 85 81 89 93 87 90 91 94 88 92 95 96 101 104 107 113 9...

result:

ok Correct answer.

Test #34:

score: 0
Accepted
time: 13ms
memory: 7072kb

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
3 4 1 2 18 6 19 21 9 10 22 12 23 25 28 16 17 5 7 32 8 11 13 34 14 26 27 15 35 30 38 20 33 24 29 40 41 31 51 36 37 53 55 44 45 63 47 48 49 65 39 52 42 69 43 56 70 58 59 60 61 71 46 64 50 66 73 77 54 57 62 72 67 83 84 86 68 89 79 97 103 82 74 75 105 76 107 109 78 90 91 92 93 110 95 96 80 98 99 100...

result:

ok Correct answer.

Test #35:

score: 0
Accepted
time: 21ms
memory: 7012kb

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 22 25 27 21 18 23 28 19 29 20 24 26 30 32 31 34 33 35 40 37 44 45 36 48 42 49 38 39 50 54 41 43 46 51 57 53 47 55 58 52 56 60 59 65 62 63 64 61 66 68 67 69 70 71 83 73 84 75 89 90 78 79 92 93 82 72 74 85 101 103 106 76 77 91 80 81 108 95 96 97 98 109 100...

result:

ok Correct answer.

Test #36:

score: 0
Accepted
time: 20ms
memory: 6984kb

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 11 8 9 13 7 17 10 14 15 23 12 27 19 20 31 32 16 24 33 26 18 28 34 36 21 22 25 29 35 30 37 40 39 38 42 41 43 44 45 46 50 51 49 47 48 61 53 65 55 56 57 58 66 69 52 70 63 76 54 59 78 68 60 62 84 72 86 74 75 64 87 67 79 80 81 82 91 71 92 73 77 96 89 90 83 85 97 94 98 88 93 95 99 100 110 ...

result:

ok Correct answer.

Test #37:

score: 0
Accepted
time: 1ms
memory: 5868kb

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: 5800kb

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: 5864kb

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: 5800kb

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: 5712kb

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: 5720kb

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: 5868kb

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: 6932kb

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: 5684kb

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: 6940kb

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: 6592kb

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: 5784kb

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: 5784kb

input:

6
6 6 6 4 6

output:

No

result:

ok Correct answer.

Test #50:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

8
14 14 12 12 14 14 12

output:

No

result:

ok Correct answer.

Test #51:

score: 0
Accepted
time: 0ms
memory: 5804kb

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: 5804kb

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: 10ms
memory: 4404kb

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: 11ms
memory: 4312kb

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: 11ms
memory: 6364kb

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: 10ms
memory: 4512kb

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: 5864kb

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: 1ms
memory: 5856kb

input:

6
6 1 5 1 0

output:

No

result:

ok Correct answer.

Test #59:

score: 0
Accepted
time: 0ms
memory: 5772kb

input:

8
7 5 1 0 0 7 2

output:

No

result:

ok Correct answer.

Test #60:

score: 0
Accepted
time: 0ms
memory: 3720kb

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: 0ms
memory: 5864kb

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: 4276kb

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: 4592kb

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: 4388kb

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: 6572kb

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: 1ms
memory: 5864kb

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: 3820kb

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: 3744kb

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: 3812kb

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: 1ms
memory: 5868kb

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: 3752kb

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: 6112kb

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: 5ms
memory: 4336kb

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: 10ms
memory: 4588kb

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: 4516kb

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: 6280kb

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.