QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#402368#1464. Interactive AlgorithmmonstersqwqWA 658ms4012kbC++202.9kb2024-04-30 14:21:592024-04-30 14:22:00

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3640kb

input:

5
3
1
2
2
2
3
1
4

output:

? 5 1 2 4 3 
? 2 1 4 3 5 
? 1 4 3 2 5 
? 4 3 5 1 2 
? 3 5 1 4 2 
? 2 4 3 1 5 
? 2 4 5 3 1 
? 1 5 2 4 3 
! 1 5 2 4 3 

result:

ok n=5, 8 queries

Test #2:

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

input:

2
1

output:

? 2 1 
! 2 1 

result:

ok n=2, 1 queries

Test #3:

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

input:

3
1
2

output:

? 3 1 2 
? 3 2 1 
! 3 2 1 

result:

ok n=3, 2 queries

Test #4:

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

input:

4
2
1
1
3

output:

? 2 4 3 1 
? 2 3 4 1 
? 1 2 4 3 
? 2 4 1 3 
! 2 4 1 3 

result:

ok n=4, 4 queries

Test #5:

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

input:

5
3
1
1
2
2
4

output:

? 5 1 2 4 3 
? 2 1 4 3 5 
? 1 4 3 2 5 
? 4 3 5 1 2 
? 3 5 1 4 2 
? 2 4 3 1 5 
! 2 4 3 1 5 

result:

ok n=5, 6 queries

Test #6:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

7
3
1
1
1
1
2
2
0
2
0
3
2
2
0
0
2
2
3
3
1
2
2
0
3
1
3
1
0
2
1
2
3
0
3
2
2
1
0
0
1
1
1
1
1
3
2
0
3
1
3
1
1
1
0
1
0
0
0
4
2
1
5
2
2
1
1
0
1
1
1
2
3
1
1
2
1
1
2
0
3
2
1
3
3
4
0
3
0
4
2
1
0
2
3
1
1
1
3
2
2
0
0
4
1
3
1
2
2
0
1
2
3
4
1
1
2
1
1
0
2
3
1
2
1
2
2
2
1
2
2
1
2
3
2
0
3
2
3
2
3
1
0
2
3
0
0
2
2
1
...

output:

? 5 1 2 6 3 7 4 
? 2 3 5 4 7 6 1 
? 3 6 7 2 4 1 5 
? 4 1 6 7 3 5 2 
? 4 2 3 6 7 1 5 
? 3 5 2 7 1 4 6 
? 1 6 2 3 7 4 5 
? 1 2 4 3 7 5 6 
? 1 2 5 3 4 6 7 
? 5 4 3 2 1 7 6 
? 1 3 4 7 2 6 5 
? 7 1 5 6 2 4 3 
? 6 4 5 7 2 3 1 
? 3 5 4 1 2 7 6 
? 6 7 5 3 4 2 1 
? 7 6 4 1 5 3 2 
? 7 5 2 3 4 6 1 
? 3 7 5 2 6...

result:

ok n=7, 955 queries

Test #7:

score: 0
Accepted
time: 17ms
memory: 3716kb

input:

10
3
3
3
2
5
1
1
0
2
2
2
3
2
2
0
1
2
1
1
1
2
3
3
0
0
1
3
2
2
3
3
2
2
3
3
1
0
1
3
3
1
2
2
1
2
3
1
0
1
1
2
1
3
1
2
2
2
3
4
1
2
2
2
4
1
1
2
1
3
2
1
0
0
2
1
1
1
1
3
1
2
1
1
1
0
2
4
1
1
2
4
2
1
3
3
2
3
1
3
2
3
2
1
2
1
2
1
1
1
1
0
4
1
2
3
3
1
1
1
1
2
1
4
0
3
3
1
1
0
2
2
2
2
2
3
2
1
2
1
5
2
2
4
2
3
0
2
1
3...

output:

? 2 6 9 5 8 4 1 7 3 10 
? 7 6 1 8 10 9 3 4 5 2 
? 1 5 6 4 3 8 10 2 7 9 
? 7 9 8 3 6 10 2 1 5 4 
? 7 3 1 4 10 6 9 8 5 2 
? 10 6 3 9 7 4 1 2 5 8 
? 1 6 8 7 3 2 4 9 10 5 
? 9 3 5 8 6 1 10 2 7 4 
? 10 7 3 2 9 6 4 1 8 5 
? 7 10 5 3 4 8 2 1 6 9 
? 8 4 7 10 3 2 6 9 1 5 
? 9 8 5 2 4 1 6 7 3 10 
? 9 1 6 10 2...

result:

ok n=10, 25000 queries

Test #8:

score: 0
Accepted
time: 58ms
memory: 3776kb

input:

20
2
4
4
3
2
5
3
1
1
4
2
3
2
1
3
1
1
4
2
1
4
3
1
0
2
1
2
4
2
0
1
2
3
2
2
0
2
2
2
1
1
3
3
2
2
2
3
0
2
1
1
5
0
1
3
1
2
2
1
2
0
1
6
5
3
0
1
3
2
1
5
1
2
2
2
2
0
2
2
1
3
0
2
2
0
2
4
2
2
3
2
1
2
0
2
1
1
1
3
0
4
2
5
1
0
1
1
1
2
2
3
3
3
1
1
3
7
3
3
1
4
0
1
2
3
1
2
3
2
3
2
2
4
3
2
2
1
4
1
1
2
3
1
4
3
0
5
2
2...

output:

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

result:

ok n=20, 25000 queries

Test #9:

score: 0
Accepted
time: 81ms
memory: 3784kb

input:

30
3
2
4
2
4
4
0
2
5
2
1
3
3
2
3
1
4
3
3
6
3
0
1
2
1
1
2
1
1
5
1
1
2
1
2
4
4
2
0
1
2
0
0
5
2
1
1
0
3
1
3
2
1
1
1
3
3
3
1
1
1
3
1
2
0
2
1
1
0
2
2
0
2
3
4
1
0
3
6
1
1
1
1
2
3
2
0
2
0
0
1
3
3
0
3
1
2
0
0
4
4
4
0
2
1
1
5
1
1
3
2
1
4
1
0
2
2
1
1
2
2
4
2
3
1
0
3
2
2
2
1
1
1
1
2
5
2
2
3
3
1
1
4
3
3
4
0
2
2...

output:

? 18 4 9 14 10 11 15 12 17 25 13 23 29 19 21 24 20 5 3 7 6 30 8 16 2 22 28 27 1 26 
? 3 21 12 7 8 30 6 4 17 24 22 14 10 15 23 25 26 19 11 5 2 29 1 20 13 9 16 18 27 28 
? 16 9 11 14 28 1 25 18 10 29 12 5 19 6 20 23 2 22 17 24 4 7 8 27 15 21 26 13 3 30 
? 5 12 8 24 28 16 18 26 2 17 3 23 21 27 11 15 13...

result:

ok n=30, 25000 queries

Test #10:

score: 0
Accepted
time: 134ms
memory: 3708kb

input:

50
2
1
0
4
3
4
1
1
3
1
1
0
1
5
1
4
2
2
0
4
2
1
2
1
1
3
1
3
4
4
3
0
4
2
2
1
2
4
1
0
1
3
1
3
0
1
3
3
3
1
3
2
3
2
0
3
3
1
1
1
2
1
4
0
2
1
0
3
2
2
1
0
0
2
2
2
2
2
2
1
1
2
3
0
3
3
1
3
1
0
1
2
2
1
2
3
3
2
2
2
0
1
4
3
1
3
2
0
2
1
2
3
2
2
1
3
5
1
1
2
1
1
3
3
2
1
2
2
1
1
1
1
1
3
6
1
3
1
0
1
3
0
1
0
3
1
3
2
0...

output:

? 15 4 14 50 29 40 9 21 26 5 25 6 23 49 47 44 34 22 10 39 32 7 18 2 17 27 38 45 19 13 28 1 35 11 37 31 41 43 36 16 48 20 46 30 12 42 3 33 24 8 
? 44 18 21 20 2 32 25 28 19 36 5 48 13 41 6 10 37 3 1 7 4 39 15 16 33 17 30 50 42 11 8 12 34 24 40 26 43 23 31 35 45 49 22 27 29 9 46 47 38 14 
? 13 9 10 38...

result:

ok n=50, 25000 queries

Test #11:

score: 0
Accepted
time: 169ms
memory: 3896kb

input:

123
1
2
1
1
3
2
1
2
5
4
2
1
1
0
0
6
2
1
0
1
1
2
3
0
2
1
2
4
1
3
2
3
2
4
1
0
1
4
4
2
0
3
1
3
0
2
0
3
2
1
2
3
2
1
0
3
2
3
2
1
6
0
1
2
1
1
2
2
1
2
3
1
0
3
3
1
0
3
1
0
7
2
4
0
3
2
2
1
1
2
1
2
4
2
0
3
2
2
4
3
2
2
3
1
2
1
2
3
3
3
1
1
2
2
7
3
3
2
6
0
2
0
2
0
3
3
4
1
1
3
2
2
3
0
3
1
5
3
2
1
2
3
1
2
2
1
3
1
...

output:

? 31 104 10 37 55 68 97 43 45 35 85 65 112 94 16 103 119 105 113 6 87 117 79 39 73 76 78 46 54 27 3 123 33 60 110 95 82 48 90 63 4 74 21 81 2 11 59 89 107 122 64 93 19 91 15 101 106 83 102 12 67 44 77 98 34 108 116 72 58 92 62 28 111 36 47 53 80 57 121 61 51 22 49 114 52 75 118 41 71 109 14 17 96 13...

result:

ok n=123, 25000 queries

Test #12:

score: 0
Accepted
time: 296ms
memory: 3784kb

input:

185
0
3
2
1
5
0
1
1
2
3
3
2
3
0
1
1
1
1
3
1
4
4
4
2
4
2
1
3
4
2
0
2
2
4
1
5
1
1
1
2
1
3
3
1
2
2
3
2
3
2
3
3
2
2
0
1
1
4
2
1
2
1
3
0
1
0
3
3
2
2
0
1
2
2
3
1
2
5
0
1
2
3
2
2
1
1
2
4
1
2
1
2
3
1
3
0
1
4
1
4
5
1
1
1
2
2
3
3
2
2
4
2
5
1
2
2
5
1
2
2
1
0
1
1
1
0
2
2
4
0
1
5
2
1
6
2
1
5
1
2
1
2
1
0
0
1
2
3
...

output:

? 92 2 74 143 27 168 10 95 49 133 16 115 21 54 76 15 185 99 44 91 81 56 173 181 178 23 97 61 22 94 12 134 179 28 9 41 116 147 45 96 58 6 69 33 107 102 160 57 52 184 59 14 50 129 26 170 103 122 124 120 176 159 153 125 46 182 75 177 167 128 114 93 17 85 161 1 144 118 51 123 72 32 146 8 83 84 71 43 34 ...

result:

ok n=185, 25000 queries

Test #13:

score: 0
Accepted
time: 400ms
memory: 3908kb

input:

277
4
2
2
4
2
3
3
2
1
1
1
1
2
2
2
3
2
3
4
2
4
1
1
0
0
1
3
1
2
2
3
2
1
6
5
2
3
2
2
2
0
1
1
5
4
4
4
3
2
1
1
0
1
2
0
1
1
0
2
2
2
2
2
2
1
0
1
2
2
1
0
0
0
2
1
2
0
0
2
2
4
2
5
2
0
1
0
3
2
2
1
1
0
2
2
1
1
4
1
0
2
2
3
4
2
2
1
1
2
1
6
4
2
1
2
2
1
2
5
3
1
2
0
3
5
2
2
3
1
3
3
2
3
3
2
1
1
4
4
3
3
0
4
1
1
4
5
1
...

output:

? 18 91 69 193 8 3 224 76 52 11 244 12 82 235 83 254 129 29 27 89 184 226 261 26 173 229 114 70 126 85 127 94 148 160 107 200 218 175 250 37 161 260 156 68 62 145 92 172 90 38 67 191 42 93 72 272 207 106 269 32 233 194 220 60 264 43 240 4 65 36 61 164 231 238 177 192 56 103 120 117 96 190 166 267 11...

result:

ok n=277, 25000 queries

Test #14:

score: 0
Accepted
time: 462ms
memory: 3836kb

input:

300
0
4
1
1
1
1
3
4
3
2
2
3
2
1
2
0
2
2
1
0
1
1
3
2
1
5
3
1
5
2
2
2
0
2
2
1
6
1
2
2
1
2
2
1
1
0
1
3
5
3
1
4
1
4
2
2
1
1
1
4
0
1
5
0
1
3
3
1
1
2
1
1
5
5
0
4
1
2
3
3
0
4
0
2
1
2
0
2
0
2
4
3
4
2
3
2
4
2
2
0
2
5
2
0
3
3
1
0
2
2
3
4
2
3
2
1
1
4
2
1
2
1
3
1
0
0
0
3
0
2
4
1
4
0
0
1
1
1
0
3
1
0
3
3
2
5
2
2
...

output:

? 12 241 269 120 138 202 50 90 19 5 52 8 24 25 27 232 114 186 215 1 207 98 199 225 82 22 56 119 182 110 71 95 226 127 220 109 229 73 212 261 88 136 126 41 2 224 279 133 217 249 203 61 287 297 218 106 177 221 125 216 7 62 265 296 178 289 272 156 140 276 290 151 9 164 16 167 171 148 275 76 184 132 196...

result:

ok n=300, 25000 queries

Test #15:

score: 0
Accepted
time: 455ms
memory: 3852kb

input:

347
3
0
2
1
0
1
1
3
0
1
0
1
3
1
1
3
1
2
0
5
3
2
4
1
4
4
1
4
1
0
3
1
1
2
3
3
1
4
2
2
2
4
1
2
2
2
3
5
3
1
1
3
2
0
3
1
1
2
2
0
1
4
2
3
4
2
2
3
0
2
0
2
2
5
0
2
2
1
5
5
3
2
1
2
2
3
0
2
2
2
1
3
3
3
0
0
1
3
2
2
2
3
2
3
4
2
3
3
2
0
1
2
1
2
2
1
1
1
1
1
2
0
1
0
1
5
0
4
2
2
4
5
2
3
2
4
2
2
4
3
1
1
0
4
4
3
0
1
...

output:

? 310 278 269 188 135 338 298 304 206 11 87 114 218 57 330 322 185 160 168 306 203 144 228 131 235 248 75 216 118 222 241 99 91 202 132 40 238 147 268 249 28 262 293 73 94 65 236 64 324 221 301 21 187 273 84 290 5 326 252 183 312 47 150 41 336 212 318 335 38 124 143 106 271 307 67 109 6 125 101 180 ...

result:

ok n=347, 25000 queries

Test #16:

score: 0
Accepted
time: 527ms
memory: 3868kb

input:

366
2
2
4
0
0
1
2
2
1
3
1
0
5
2
2
1
4
3
0
3
3
2
8
3
1
4
0
5
2
0
4
0
2
1
3
2
4
1
1
4
1
1
2
4
4
1
3
1
0
1
3
4
1
0
0
4
1
2
2
2
3
3
2
1
2
0
2
1
1
2
2
1
2
2
1
2
0
0
3
3
4
6
2
1
1
1
0
2
0
1
2
1
1
2
2
2
2
3
0
2
2
1
0
1
3
1
4
1
3
3
1
3
0
4
4
5
1
1
3
1
2
2
0
0
2
2
0
3
2
4
3
2
2
0
1
0
3
2
0
1
7
2
4
1
1
2
1
5
...

output:

? 162 63 352 360 234 110 186 204 185 157 94 148 237 35 269 146 346 147 215 138 180 221 164 27 277 226 131 89 330 130 4 139 202 125 329 156 251 198 337 239 255 252 284 334 53 8 219 366 168 349 112 224 163 220 260 246 249 210 21 85 44 238 11 217 91 353 341 3 82 195 290 236 319 200 78 184 101 303 173 2...

result:

ok n=366, 25000 queries

Test #17:

score: 0
Accepted
time: 544ms
memory: 3880kb

input:

398
2
2
3
2
0
4
2
0
0
2
3
4
0
3
0
1
0
2
1
1
3
4
2
4
1
4
2
1
1
2
3
3
3
0
0
1
2
1
3
1
1
4
5
1
3
2
2
1
0
1
2
1
2
0
3
2
4
0
0
0
2
2
1
3
1
2
2
3
1
0
1
3
0
2
0
3
0
0
2
2
2
2
2
1
0
4
3
5
1
4
1
2
2
2
3
1
2
3
2
1
4
0
3
2
3
2
4
4
0
3
1
1
1
1
2
4
3
4
3
4
1
0
1
0
3
2
2
3
1
1
4
2
0
0
2
1
2
2
1
1
1
1
1
5
2
4
1
0
...

output:

? 264 43 3 86 62 276 321 389 352 278 161 117 283 156 88 319 72 359 23 13 5 298 79 165 89 317 92 103 142 377 209 346 1 46 168 327 304 258 48 236 179 21 233 358 204 149 22 102 80 101 112 316 273 224 205 81 52 398 326 184 248 335 254 173 270 328 121 143 139 337 250 4 129 202 132 122 281 16 192 331 24 1...

result:

ok n=398, 25000 queries

Test #18:

score: 0
Accepted
time: 553ms
memory: 3856kb

input:

399
0
5
3
2
0
1
3
1
2
0
0
3
2
5
0
5
3
2
3
2
1
1
1
5
2
0
3
0
1
4
0
2
1
1
5
0
1
1
3
1
0
2
2
3
3
1
1
2
2
2
5
0
2
2
1
3
1
3
3
0
2
2
2
0
4
1
0
1
3
2
2
3
4
5
2
2
1
2
2
1
3
0
1
2
4
1
4
4
5
0
3
2
2
3
3
2
1
2
5
2
1
2
2
1
2
2
1
2
3
0
0
1
0
0
5
0
4
0
3
2
3
1
2
0
0
2
2
1
1
1
3
3
1
1
2
1
1
2
1
0
1
2
1
1
2
1
6
2
...

output:

? 57 180 136 216 271 4 242 5 388 256 241 141 178 15 197 97 13 292 332 396 147 156 291 368 85 283 200 224 93 128 59 249 172 100 96 18 236 370 359 27 88 82 330 384 138 144 315 252 157 350 391 367 326 318 265 196 58 266 184 135 150 198 64 223 381 390 355 349 145 296 118 167 20 204 66 31 393 398 298 226...

result:

ok n=399, 25000 queries

Test #19:

score: 0
Accepted
time: 532ms
memory: 3944kb

input:

400
1
2
1
1
2
2
2
2
1
3
0
1
1
1
3
5
2
1
3
2
3
1
1
4
0
3
2
2
4
2
5
0
3
0
4
0
5
1
0
2
2
0
3
6
4
3
1
3
0
0
1
3
3
2
2
1
2
0
2
1
5
1
1
2
3
0
1
1
1
4
2
6
3
1
1
1
0
5
3
0
1
2
1
0
3
1
7
2
3
2
1
2
2
4
2
2
2
2
3
2
4
2
1
2
2
2
3
0
2
2
2
1
3
0
6
8
1
0
5
2
2
2
2
1
1
1
1
2
1
3
1
0
2
2
1
2
1
1
4
2
1
3
2
2
3
2
0
6
...

output:

? 252 132 296 183 192 82 43 377 130 294 363 324 103 218 293 214 285 298 247 50 259 20 230 121 365 107 85 212 169 17 81 375 315 138 190 25 168 299 357 323 65 10 286 382 73 60 273 388 102 37 362 229 182 109 316 254 300 80 279 334 129 204 250 211 392 18 159 69 166 281 170 98 72 387 146 71 309 184 241 3...

result:

ok n=400, 25000 queries

Test #20:

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

input:

3
2

output:

? 2 3 1 
! 2 3 1 

result:

ok n=3, 1 queries

Test #21:

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

input:

4
1
1
2
1
2
1
2
1
2
2
1
1
1
1
1
1
1
0
0
1
1
2
1
3

output:

? 3 4 2 1 
? 2 1 4 3 
? 2 3 1 4 
? 2 3 4 1 
? 2 4 3 1 
? 3 4 2 1 
? 4 1 3 2 
? 2 1 4 3 
? 4 2 1 3 
? 3 2 4 1 
? 2 1 4 3 
? 3 2 1 4 
? 2 1 3 4 
? 1 4 3 2 
? 4 3 1 2 
? 4 3 1 2 
? 2 1 4 3 
? 4 3 2 1 
? 1 2 3 4 
? 4 3 1 2 
? 3 2 1 4 
? 1 3 4 2 
? 2 3 4 1 
? 2 4 1 3 
! 2 4 1 3 

result:

ok n=4, 24 queries

Test #22:

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

input:

5
2
3
1
1
2
0
2
2
2
1
2
2
1
2
1
1
0
3
2
1
2
2
2
1
2
2
2
2
3
1
2
1
2
2
1
1
3
1
4

output:

? 4 3 5 2 1 
? 2 1 3 5 4 
? 2 5 3 1 4 
? 2 5 3 4 1 
? 2 3 1 5 4 
? 1 4 2 3 5 
? 2 3 4 5 1 
? 1 3 4 2 5 
? 5 2 1 4 3 
? 4 3 2 5 1 
? 3 1 4 5 2 
? 2 4 3 1 5 
? 4 2 5 3 1 
? 1 5 4 3 2 
? 5 2 3 1 4 
? 5 2 3 4 1 
? 2 4 1 5 3 
? 5 4 3 2 1 
? 5 2 1 4 3 
? 2 4 3 5 1 
? 3 1 4 5 2 
? 5 3 4 1 2 
? 5 4 1 2 3 
?...

result:

ok n=5, 39 queries

Test #23:

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

input:

7
1
0
2
2
3
2
1
1
2
0
0
0
2
0
3
3
1
3
1
1
3
0
1
3
1
1
1
2
1
1
5
2
0
1
2
0
1
1
2
2
2
3
1
1
1
0
2
3
2
3
1
3
1
2
2
3
1
3
1
1
1
2
3
1
1
1
2
2
1
2
1
2
1
2
2
1
1
0
2
3
0
0
1
0
3
1
3
0
3
1
1
1
1
0
3
0
2
3
0
2
2
2
0
2
0
2
2
0
1
0
2
2
0
2
3
2
2
1
3
1
0
1
2
1
2
3
1
2
2
1
1
1
0
2
2
2
1
1
2
2
1
2
2
1
1
2
3
1
2
...

output:

? 6 3 5 2 1 4 7 
? 5 6 4 1 2 7 3 
? 5 3 4 2 7 1 6 
? 4 1 2 5 3 7 6 
? 2 5 1 3 6 7 4 
? 3 7 5 1 6 4 2 
? 1 4 7 3 2 6 5 
? 5 7 4 1 2 3 6 
? 7 6 2 4 1 5 3 
? 4 2 6 3 1 7 5 
? 4 2 7 1 3 5 6 
? 5 4 7 3 1 2 6 
? 5 3 2 6 7 1 4 
? 6 5 7 3 1 2 4 
? 3 4 7 5 2 1 6 
? 6 2 5 1 7 4 3 
? 3 6 1 4 5 7 2 
? 1 7 6 4 5...

result:

ok n=7, 2636 queries

Test #24:

score: 0
Accepted
time: 62ms
memory: 3716kb

input:

10
5
1
1
4
3
4
3
1
0
2
2
0
4
1
2
2
2
2
2
4
4
2
1
1
2
2
3
0
1
3
2
0
4
2
2
3
2
2
1
2
1
1
1
1
1
2
0
2
2
5
1
2
0
2
1
2
1
4
3
3
3
3
3
2
2
2
0
0
1
4
2
0
2
2
0
3
3
3
0
1
1
2
0
1
0
3
2
1
2
2
2
4
3
2
1
3
3
3
0
2
2
1
1
1
1
1
1
4
4
3
0
1
4
2
0
0
2
2
1
2
3
2
1
3
1
0
0
2
5
2
4
1
0
4
1
3
2
1
1
1
2
0
2
2
0
2
1
3
2...

output:

? 7 4 2 1 6 10 5 3 9 8 
? 4 7 1 10 8 9 6 3 2 5 
? 8 7 6 5 1 10 4 3 2 9 
? 2 1 10 7 4 5 8 9 6 3 
? 3 4 10 2 6 1 5 8 7 9 
? 10 5 2 9 8 7 4 3 1 6 
? 10 7 4 9 6 3 8 5 1 2 
? 7 6 2 1 10 3 5 9 4 8 
? 6 5 3 8 2 9 4 10 1 7 
? 7 3 4 9 5 8 1 10 2 6 
? 10 3 6 4 5 2 7 9 8 1 
? 1 9 5 4 7 2 3 10 6 8 
? 4 6 5 8 2 ...

result:

ok n=10, 25000 queries

Test #25:

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

input:

20
3
2
3
4
2
0
4
3
2
4
2
1
0
0
5
4
3
3
0
1
2
4
3
4
4
4
0
2
2
3
1
1
1
2
1
4
4
1
1
2
1
2
3
2
2
1
2
1
3
0
1
2
2
1
2
1
0
2
3
4
1
2
0
3
1
1
2
3
0
2
1
1
0
2
3
1
2
1
0
1
2
3
0
2
4
2
3
2
3
1
1
1
3
4
2
3
2
4
1
1
1
3
1
1
1
4
3
1
3
2
1
3
1
1
4
3
1
3
2
5
0
2
2
0
2
3
2
1
3
2
3
2
0
3
1
1
3
0
4
2
1
1
0
2
4
1
2
2
3...

output:

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

result:

ok n=20, 25000 queries

Test #26:

score: 0
Accepted
time: 55ms
memory: 3700kb

input:

30
4
1
3
1
1
1
1
1
3
3
4
0
1
3
3
1
0
2
4
0
1
1
2
2
1
1
1
4
2
4
3
0
1
1
1
5
3
8
2
1
5
3
2
1
3
3
0
1
3
4
3
1
1
1
0
2
3
3
1
1
4
3
1
0
1
2
3
1
2
2
2
3
0
2
1
1
2
2
2
4
4
2
1
2
1
2
2
5
3
0
0
1
3
4
2
2
4
2
0
4
0
2
2
1
3
1
3
4
3
1
1
1
4
1
0
1
3
2
1
1
1
1
1
2
3
5
3
6
2
2
4
0
0
4
4
1
4
4
0
0
0
0
2
4
0
3
1
2
2...

output:

? 25 18 28 6 9 21 7 19 17 20 13 2 27 29 22 30 12 10 5 26 8 15 11 3 23 1 14 4 16 24 
? 5 2 8 18 9 30 24 27 17 28 6 21 1 15 13 20 7 29 10 22 16 25 26 14 11 19 23 3 12 4 
? 7 27 29 9 19 15 21 14 8 26 5 22 3 20 4 17 6 25 1 23 2 28 12 13 16 18 11 10 24 30 
? 19 12 17 24 14 5 1 26 28 18 3 9 11 21 8 4 25 2...

result:

ok n=30, 25000 queries

Test #27:

score: 0
Accepted
time: 90ms
memory: 3732kb

input:

50
4
1
3
1
2
1
0
2
1
4
1
2
4
0
2
2
2
0
2
1
1
1
4
1
1
1
1
1
2
1
1
2
0
3
2
3
4
2
2
4
4
0
0
1
0
2
1
1
3
3
2
2
1
1
2
3
4
1
1
0
4
4
1
1
0
1
0
2
0
4
2
2
0
2
1
2
1
3
2
2
1
0
1
3
5
1
2
2
1
0
2
2
1
3
8
0
2
2
0
1
4
3
1
4
1
1
3
0
0
2
3
1
1
2
1
3
3
3
1
2
3
0
1
1
1
1
3
1
3
0
1
1
8
0
3
1
2
5
4
2
2
2
0
2
4
0
0
0
0...

output:

? 44 27 41 20 42 33 10 1 3 30 31 5 38 4 12 29 34 50 35 16 23 19 47 25 2 46 36 49 39 9 21 32 18 24 15 37 11 17 13 43 26 7 14 22 28 45 6 48 40 8 
? 29 39 37 19 9 43 21 23 47 3 42 48 28 45 32 40 1 11 18 44 2 4 13 24 10 22 12 20 34 7 31 26 16 35 33 38 15 17 50 14 30 36 25 27 6 46 5 8 41 49 
? 45 10 1 37...

result:

ok n=50, 25000 queries

Test #28:

score: 0
Accepted
time: 187ms
memory: 3824kb

input:

123
4
2
1
1
1
2
1
1
3
2
1
2
2
1
1
1
1
0
1
1
1
1
2
6
2
1
2
0
0
0
1
3
3
2
3
1
3
6
5
2
1
2
3
1
6
4
0
1
5
0
3
0
2
3
3
1
0
6
0
1
4
0
1
3
0
1
1
4
2
3
4
1
3
1
3
1
3
1
5
2
4
1
1
3
2
1
1
5
2
4
2
3
1
5
1
3
0
4
6
4
3
2
3
3
2
2
0
6
1
2
3
0
2
4
1
1
1
2
0
0
4
1
3
2
2
3
1
2
2
0
1
2
2
2
3
3
4
0
1
4
0
0
3
1
1
0
1
2
...

output:

? 86 55 10 54 24 83 73 34 53 95 17 6 3 101 115 117 105 49 68 99 72 93 94 104 76 45 65 71 57 31 62 67 88 116 92 5 37 23 56 36 100 119 25 66 12 111 109 118 11 112 75 91 48 4 29 58 96 47 21 89 69 20 103 106 30 87 122 27 8 52 14 2 51 81 22 59 60 80 44 26 107 39 108 102 13 70 61 85 98 110 120 79 64 15 46...

result:

ok n=123, 25000 queries

Test #29:

score: 0
Accepted
time: 338ms
memory: 3844kb

input:

185
2
3
1
1
3
4
3
1
2
3
2
1
2
2
4
1
3
2
4
2
1
1
1
2
1
0
7
3
2
0
5
1
4
1
1
2
1
2
2
1
5
2
2
2
3
0
2
0
3
3
2
1
4
2
3
1
2
5
2
2
4
6
0
1
0
2
4
4
4
3
2
3
3
3
2
2
2
0
2
2
4
0
3
2
2
0
1
0
2
4
3
2
2
2
2
6
2
3
2
3
0
4
2
0
0
1
1
2
0
3
3
3
4
2
2
3
0
3
1
1
3
2
5
6
1
2
3
2
2
2
0
2
4
0
2
2
1
1
2
3
4
1
3
3
2
2
3
1
...

output:

? 46 81 32 124 26 141 99 41 87 159 65 162 142 91 76 51 69 83 29 10 64 58 54 110 126 170 173 147 12 11 55 61 22 14 140 80 182 103 169 137 8 43 185 44 92 123 9 88 95 121 177 100 77 144 164 167 45 101 136 84 42 179 122 143 35 21 97 134 105 181 160 152 174 56 117 37 15 52 1 150 163 112 70 114 176 73 94 ...

result:

ok n=185, 25000 queries

Test #30:

score: 0
Accepted
time: 407ms
memory: 3764kb

input:

277
2
4
1
3
3
2
0
2
1
2
2
1
2
2
0
1
5
2
0
3
1
1
3
2
1
6
2
1
3
1
0
2
3
3
1
2
2
4
1
2
0
2
1
3
3
4
0
2
2
3
2
4
4
3
3
0
1
2
4
3
3
1
3
4
3
1
5
4
0
0
1
3
2
4
1
0
0
1
3
3
1
3
3
2
0
1
1
0
1
2
1
5
2
3
2
3
0
2
1
2
4
2
3
2
3
1
1
2
1
3
2
2
4
2
3
5
3
0
1
1
2
4
3
1
3
0
0
0
4
4
0
2
0
1
3
2
1
4
2
1
1
0
3
0
1
3
0
4
...

output:

? 16 34 218 270 157 63 155 210 135 61 171 256 57 173 191 109 29 111 244 83 42 59 274 164 200 115 139 225 99 107 69 154 175 108 19 71 187 263 151 137 214 72 259 76 14 75 91 73 138 152 221 222 199 174 116 74 268 112 130 265 209 257 183 160 206 243 52 148 1 117 44 207 94 172 229 177 142 145 53 238 133 ...

result:

ok n=277, 25000 queries

Test #31:

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

input:

300
2
1
3
3
2
1
3
1
3
3
3
1
5
0
0
6
1
3
1
4
2
2
5
2
0
3
7
1
1
1
2
3
1
0
2
4
2
3
3
3
2
4
4
0
2
2
2
1
3
0
2
3
3
5
2
5
1
2
1
4
1
4
3
2
1
1
1
1
2
3
2
5
1
0
2
3
1
1
5
2
3
5
4
3
3
2
0
5
3
2
2
2
2
4
3
4
3
3
3
1
2
0
3
0
2
4
1
1
5
1
3
1
1
0
3
0
2
2
2
3
3
1
2
3
4
1
2
2
2
1
1
0
2
1
2
3
3
1
1
0
1
4
1
0
1
3
1
1
...

output:

? 134 11 283 29 4 23 41 37 81 74 8 122 268 116 171 258 82 225 248 20 86 66 98 113 186 205 211 133 177 128 147 54 44 270 109 153 300 126 146 33 42 112 106 115 254 204 84 79 93 178 107 75 228 67 159 275 124 65 180 191 174 237 105 196 273 150 118 263 189 181 217 95 24 173 72 199 21 136 249 175 232 140 ...

result:

ok n=300, 25000 queries

Test #32:

score: 0
Accepted
time: 511ms
memory: 3916kb

input:

347
1
2
2
0
5
0
2
0
1
4
1
1
3
2
2
2
4
1
2
4
4
1
4
5
1
0
2
0
2
1
3
1
1
1
0
3
3
2
2
1
0
1
1
2
4
1
1
3
1
1
2
3
2
2
4
1
2
3
4
2
1
0
0
1
1
1
2
4
1
1
0
3
2
5
3
2
3
5
1
1
1
5
4
2
3
0
2
2
0
1
2
1
1
5
4
3
4
4
1
3
3
4
2
5
1
5
1
1
3
4
3
0
3
0
3
3
2
2
2
5
3
3
1
2
3
1
4
5
3
1
1
0
1
5
2
0
2
3
3
1
0
2
3
4
2
2
3
0
...

output:

? 69 339 242 93 335 73 346 37 106 79 268 226 190 134 7 176 83 309 99 1 239 298 60 140 249 62 216 120 21 215 136 77 255 282 279 131 292 324 277 54 67 265 178 47 260 34 259 333 153 305 270 297 55 171 157 261 167 85 293 308 113 35 22 205 315 163 137 71 237 30 221 82 332 125 127 141 27 10 96 151 236 18 ...

result:

ok n=347, 25000 queries

Test #33:

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

input:

366
1
2
5
1
3
1
1
0
2
3
2
2
2
2
0
3
2
1
3
1
3
3
1
2
4
1
2
3
1
0
1
1
2
2
1
3
1
2
0
1
4
2
2
1
2
1
1
0
0
4
1
3
2
0
3
0
1
3
0
2
4
2
3
2
1
0
5
3
2
1
0
2
0
3
2
6
5
2
3
1
3
0
1
1
0
3
4
2
1
2
0
4
2
4
0
1
0
1
0
2
1
1
0
2
0
2
5
5
1
0
0
1
3
1
2
1
1
5
1
3
2
1
0
2
1
1
1
2
1
4
1
2
1
0
0
6
0
1
1
2
2
1
0
1
3
0
1
2
...

output:

? 353 348 24 54 198 185 3 59 112 351 189 336 46 45 174 129 283 338 319 171 268 295 162 154 341 150 170 8 287 221 308 187 311 193 141 179 11 284 6 316 172 237 138 62 253 93 31 270 209 265 17 5 27 26 204 183 235 239 314 309 236 227 190 161 58 330 39 145 79 94 234 331 292 329 71 130 117 290 233 362 315...

result:

ok n=366, 25000 queries

Test #34:

score: 0
Accepted
time: 554ms
memory: 3812kb

input:

398
2
2
3
4
3
0
1
1
1
2
2
3
1
2
4
2
3
0
1
2
1
2
3
3
1
3
4
3
1
5
2
3
4
2
2
1
2
3
2
3
0
2
0
2
0
4
1
2
2
3
0
2
1
1
2
5
2
1
1
5
2
1
0
2
1
5
1
2
2
2
1
1
4
0
1
0
2
3
2
5
2
2
1
0
1
1
3
1
4
1
0
1
4
0
2
0
3
1
3
3
3
3
2
5
2
2
2
3
4
0
4
1
2
3
2
3
1
2
0
2
1
4
4
2
4
0
0
0
5
3
2
1
2
4
1
1
2
6
2
2
0
3
3
0
2
2
3
2
...

output:

? 34 226 25 116 63 114 398 100 290 75 76 98 364 342 130 214 309 152 303 394 42 296 35 282 57 69 22 41 229 297 156 209 215 1 44 158 143 26 307 85 366 359 220 87 335 181 182 227 322 345 16 78 267 203 62 193 103 89 7 52 196 153 338 217 94 255 120 39 71 375 127 361 313 141 316 192 275 154 212 213 252 38...

result:

ok n=398, 25000 queries

Test #35:

score: 0
Accepted
time: 556ms
memory: 3812kb

input:

399
1
2
3
2
1
4
1
2
4
1
4
2
4
2
0
2
1
2
1
2
2
0
3
1
1
1
1
3
2
5
2
0
2
2
3
1
2
6
1
0
0
3
1
3
0
0
1
1
3
2
4
2
5
3
0
2
1
3
2
4
1
2
2
0
1
1
1
1
2
1
3
2
1
1
0
4
1
0
3
2
5
2
1
2
4
4
1
1
2
5
3
5
1
3
2
3
0
2
2
1
1
2
2
2
0
1
4
1
1
3
0
2
3
1
2
2
1
2
0
3
3
1
5
3
2
2
3
0
3
4
2
3
3
2
1
2
4
1
2
0
2
1
2
3
2
2
2
2
...

output:

? 17 398 368 53 193 52 348 271 152 253 293 335 89 181 221 394 59 163 93 80 109 396 220 79 225 213 241 250 231 5 143 94 179 376 43 31 205 397 239 345 95 327 207 311 369 294 356 224 352 228 354 161 125 30 167 27 183 65 242 148 166 363 236 137 14 40 82 171 339 155 298 313 38 301 25 319 393 262 35 86 38...

result:

ok n=399, 25000 queries

Test #36:

score: 0
Accepted
time: 561ms
memory: 3948kb

input:

400
1
3
0
5
2
3
0
2
1
1
3
1
3
0
3
2
4
1
2
2
2
2
2
1
3
1
3
2
2
0
3
2
0
0
2
2
0
2
2
3
1
2
4
2
3
3
2
4
3
2
6
3
1
0
3
1
2
0
1
3
4
2
3
1
1
1
4
2
1
1
1
2
2
2
4
4
2
3
3
0
0
3
2
2
3
5
3
2
1
1
0
2
3
3
1
0
4
4
1
3
1
1
1
4
0
1
0
1
1
2
6
3
3
3
1
5
2
5
3
0
1
3
2
2
2
0
1
1
3
1
0
0
3
2
1
4
4
4
3
1
3
1
3
1
1
1
3
3
...

output:

? 304 217 121 57 3 171 90 72 372 165 198 296 347 104 204 215 334 69 283 365 318 150 197 145 155 168 30 38 149 56 329 172 393 138 129 284 324 361 291 191 213 27 151 366 239 234 13 236 108 398 308 279 188 221 41 43 259 257 37 262 16 11 345 106 211 264 95 299 10 173 146 80 367 162 40 302 292 66 277 78 ...

result:

ok n=400, 25000 queries

Test #37:

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

input:

3
1
2

output:

? 2 1 3 
? 1 2 3 
! 1 2 3 

result:

ok n=3, 2 queries

Test #38:

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

input:

4
3

output:

? 2 4 1 3 
! 2 4 1 3 

result:

ok n=4, 1 queries

Test #39:

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

input:

5
1
2
1
2
1
2
2
0
2
2
2
2
2
1
2
0
3
2
1
2
4

output:

? 2 4 3 1 5 
? 3 2 5 1 4 
? 5 4 3 2 1 
? 1 3 5 2 4 
? 4 3 5 2 1 
? 2 5 3 4 1 
? 5 4 2 1 3 
? 4 2 3 5 1 
? 1 3 5 2 4 
? 3 4 1 5 2 
? 5 2 1 4 3 
? 3 4 1 5 2 
? 3 4 1 2 5 
? 3 5 4 2 1 
? 5 4 1 2 3 
? 2 4 3 5 1 
? 5 2 4 1 3 
? 2 5 1 4 3 
? 4 1 2 3 5 
? 2 5 3 4 1 
? 2 5 4 1 3 
! 2 5 4 1 3 

result:

ok n=5, 21 queries

Test #40:

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

input:

7
2
3
2
3
0
2
2
1
0
6

output:

? 6 4 3 7 5 2 1 
? 6 2 7 3 4 5 1 
? 4 1 6 3 2 5 7 
? 4 5 3 7 2 6 1 
? 5 6 4 2 1 7 3 
? 3 6 2 7 1 5 4 
? 6 1 5 4 7 3 2 
? 5 3 7 2 1 4 6 
? 5 3 7 6 4 2 1 
? 6 1 3 4 5 2 7 
! 6 1 3 4 5 2 7 

result:

ok n=7, 10 queries

Test #41:

score: 0
Accepted
time: 63ms
memory: 3652kb

input:

10
2
1
1
2
3
1
2
2
3
0
3
3
1
1
0
1
1
1
1
2
1
0
2
5
3
2
0
1
2
1
4
0
3
1
0
0
2
3
1
1
0
1
1
4
2
0
0
4
1
2
1
1
1
1
3
2
0
1
0
2
0
1
3
2
3
1
3
2
4
0
1
0
2
2
2
1
3
2
1
2
0
3
2
2
1
2
2
1
1
4
2
1
2
1
1
3
3
2
2
1
5
2
4
1
2
3
2
2
2
2
1
2
3
0
2
1
2
0
2
2
4
3
2
2
1
0
1
1
1
2
1
4
2
1
0
3
3
3
1
3
0
0
2
1
2
3
2
0
3...

output:

? 5 4 8 10 2 9 7 6 1 3 
? 3 5 4 2 10 9 7 1 8 6 
? 4 9 8 3 5 6 2 1 7 10 
? 3 10 5 7 8 4 9 6 1 2 
? 7 9 10 5 3 2 6 1 8 4 
? 2 1 10 9 3 7 5 8 4 6 
? 7 6 2 4 10 3 9 5 1 8 
? 10 6 7 8 9 1 2 3 5 4 
? 4 2 9 10 7 8 6 3 1 5 
? 8 1 7 4 6 9 10 3 5 2 
? 7 1 4 3 2 10 6 8 9 5 
? 9 4 7 5 1 10 8 6 3 2 
? 6 7 9 1 8 ...

result:

ok n=10, 25000 queries

Test #42:

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

input:

20
1
2
1
2
4
1
2
6
2
1
1
4
4
4
3
1
2
3
2
2
4
2
3
0
0
3
2
3
1
4
3
4
2
2
2
2
2
0
3
0
2
3
1
3
2
1
2
2
1
3
2
1
1
1
2
1
5
0
1
0
2
2
0
2
1
0
1
4
3
0
4
1
1
1
1
1
2
2
2
1
1
4
2
4
4
0
1
0
1
1
1
2
0
5
3
0
1
3
0
1
2
1
2
3
4
3
0
2
3
1
3
1
2
2
3
0
6
1
2
3
4
3
3
0
2
1
0
1
2
6
2
4
1
1
4
1
2
3
4
4
2
2
3
1
2
1
1
3
2...

output:

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

result:

ok n=20, 25000 queries

Test #43:

score: 0
Accepted
time: 81ms
memory: 3780kb

input:

30
3
5
3
2
4
4
1
4
3
2
1
3
4
1
1
1
3
1
0
2
4
3
5
1
4
0
4
2
2
1
1
2
4
1
3
3
3
2
1
1
1
2
2
0
0
1
4
0
1
1
5
1
6
2
3
1
2
4
2
0
3
2
2
2
3
0
1
0
1
3
3
3
0
1
1
3
1
0
2
0
2
2
1
0
2
1
3
1
2
1
1
2
2
3
1
2
1
1
3
2
1
2
0
3
2
1
5
3
2
1
2
5
1
2
2
2
3
3
2
4
2
2
1
2
1
2
1
2
3
1
0
4
1
0
1
1
2
2
3
3
1
1
1
3
0
1
2
0
2...

output:

? 3 19 28 13 8 27 20 25 10 6 9 21 29 26 11 17 18 23 5 1 4 14 16 7 30 24 22 12 15 2 
? 14 17 28 30 20 11 27 19 23 8 7 1 16 18 26 3 10 25 6 22 5 12 24 4 13 29 21 15 9 2 
? 15 20 22 23 4 18 3 19 24 6 11 14 16 7 27 17 1 2 26 25 13 28 10 21 30 5 29 9 12 8 
? 22 18 16 1 13 28 29 6 5 4 26 21 8 17 12 14 23 ...

result:

ok n=30, 25000 queries

Test #44:

score: 0
Accepted
time: 114ms
memory: 3724kb

input:

50
3
1
2
2
1
0
0
1
4
0
3
2
2
1
2
0
2
0
4
1
2
2
1
3
3
1
5
2
1
1
1
1
4
4
1
0
2
1
4
2
0
2
0
0
1
2
1
4
2
4
2
1
0
2
0
2
2
4
4
1
0
2
3
1
1
4
3
3
3
3
0
1
4
1
2
1
2
2
4
4
1
2
2
2
2
4
1
1
4
0
1
1
2
1
4
2
2
2
5
2
0
5
0
3
2
2
1
7
1
2
3
2
2
1
1
5
4
2
1
1
1
0
0
3
0
4
1
0
1
2
4
1
2
1
3
2
3
2
1
2
4
4
0
3
1
1
3
0
2...

output:

? 49 33 6 43 12 48 17 14 46 16 22 23 42 34 32 15 11 38 19 30 27 31 50 26 5 20 25 37 29 36 45 47 2 21 44 1 28 10 41 13 39 40 3 4 35 18 9 24 7 8 
? 27 32 33 9 7 46 35 21 48 11 39 14 23 38 49 34 26 30 1 2 43 13 40 36 15 29 37 24 44 45 16 25 4 50 18 28 41 10 3 12 19 47 8 42 5 31 17 6 22 20 
? 13 1 21 35...

result:

ok n=50, 25000 queries

Test #45:

score: 0
Accepted
time: 190ms
memory: 3824kb

input:

123
3
3
0
3
1
2
0
4
6
1
3
3
2
3
1
1
3
2
3
1
2
3
1
2
2
1
3
0
1
0
3
3
3
0
2
3
0
1
1
1
1
1
1
3
3
2
2
3
2
2
0
1
4
4
0
1
1
1
2
2
1
2
4
2
2
3
2
4
3
3
0
1
4
4
2
0
0
1
2
0
2
1
2
1
1
2
1
2
1
1
1
0
1
3
4
1
1
2
2
2
2
1
0
2
3
2
2
4
2
2
3
2
1
1
2
4
2
4
2
1
2
0
2
0
3
2
0
0
1
0
0
1
5
1
4
3
1
2
3
1
0
2
0
1
2
1
3
3
...

output:

? 24 49 88 82 2 30 51 116 117 102 55 19 92 63 15 33 104 31 89 22 108 52 65 122 83 113 38 111 11 112 57 74 93 34 91 101 3 115 10 46 1 12 66 105 14 90 67 76 114 21 59 86 48 7 107 60 71 35 18 61 56 123 53 41 77 42 100 110 47 16 73 120 75 103 81 62 68 8 84 118 17 70 6 119 45 99 26 80 72 40 79 95 23 20 3...

result:

ok n=123, 25000 queries

Test #46:

score: 0
Accepted
time: 303ms
memory: 3840kb

input:

185
4
0
2
1
2
3
1
1
5
1
2
2
0
2
0
4
2
1
3
1
2
3
0
3
1
4
2
3
3
3
2
2
3
1
3
2
2
4
3
3
0
2
2
3
3
3
5
2
1
3
0
0
1
2
2
1
4
1
3
1
0
2
0
2
2
3
2
1
1
2
2
3
4
3
3
1
2
1
2
2
1
1
3
3
0
5
1
4
3
4
3
1
0
0
3
1
3
2
0
3
4
3
0
3
3
1
0
4
3
5
2
2
2
5
0
3
5
3
1
2
0
0
1
0
4
6
3
4
0
1
1
3
1
0
2
4
0
0
3
2
3
4
2
0
2
0
1
2
...

output:

? 114 61 15 27 143 104 67 118 96 75 10 159 8 31 35 57 62 127 171 86 80 120 6 103 108 178 111 155 30 97 95 64 93 26 169 18 182 161 175 163 7 76 17 1 115 180 166 63 174 34 68 83 90 69 58 81 84 59 145 109 101 117 184 119 134 123 144 160 5 24 45 22 98 110 78 142 167 140 13 87 125 154 148 152 149 141 40 ...

result:

ok n=185, 25000 queries

Test #47:

score: 0
Accepted
time: 371ms
memory: 3808kb

input:

277
2
4
1
1
3
2
5
4
3
0
2
0
2
0
3
1
4
1
2
0
1
2
1
5
2
2
3
3
2
1
2
3
3
2
1
3
1
0
2
2
1
1
1
0
0
2
1
0
1
1
3
1
0
1
1
3
2
3
2
4
2
3
0
1
3
1
1
0
2
3
2
2
5
2
3
5
1
1
2
2
3
3
4
3
2
1
1
1
1
1
2
4
2
2
3
3
2
2
1
3
0
1
1
2
4
0
0
4
3
2
0
2
0
7
2
5
4
3
2
0
3
4
3
2
2
2
0
1
2
3
3
2
3
1
3
3
2
0
0
3
1
3
4
2
2
3
4
0
...

output:

? 199 133 213 173 165 125 115 136 202 64 76 21 14 146 135 277 190 112 84 68 206 134 128 182 193 35 263 52 266 228 188 265 42 34 174 61 254 187 271 167 25 239 7 108 111 258 10 145 151 113 120 70 250 204 142 148 157 117 69 201 15 103 98 81 101 164 268 122 179 251 267 79 222 86 77 36 63 176 20 223 121 ...

result:

ok n=277, 25000 queries

Test #48:

score: 0
Accepted
time: 427ms
memory: 3936kb

input:

300
2
2
3
1
3
2
1
0
2
2
3
2
0
0
2
1
3
0
1
4
0
2
2
5
2
4
1
5
3
3
0
2
3
0
1
3
4
2
1
2
4
1
1
1
0
2
1
1
2
4
2
2
2
3
0
1
2
2
4
2
1
3
1
2
2
5
1
4
2
1
3
2
0
4
2
3
4
2
2
3
1
1
2
4
2
4
0
1
2
4
1
5
3
1
1
3
2
5
0
1
5
1
2
2
2
6
2
5
1
3
2
4
5
1
1
3
3
4
5
0
4
1
2
6
4
0
0
1
1
3
4
2
0
4
1
2
1
5
4
1
0
3
4
2
2
0
1
0
...

output:

? 4 123 102 50 300 98 237 283 215 118 121 53 105 94 285 99 217 257 294 100 229 52 299 220 250 57 200 193 298 170 288 191 114 270 42 152 139 36 240 165 47 87 28 120 112 77 29 256 219 174 172 149 8 167 22 108 231 183 187 264 144 260 291 44 159 133 70 116 194 286 9 267 218 104 253 268 292 23 244 67 154...

result:

ok n=300, 25000 queries

Test #49:

score: 0
Accepted
time: 471ms
memory: 3848kb

input:

347
3
2
5
1
2
3
0
1
2
4
2
3
5
2
3
0
2
5
3
1
3
2
6
1
6
1
4
4
0
1
3
3
2
2
3
0
3
1
1
2
2
1
4
3
3
1
3
2
1
1
5
1
3
0
1
0
4
1
3
2
3
3
1
1
2
4
1
0
1
2
2
3
2
3
2
3
5
1
5
1
1
2
0
3
1
3
5
2
5
3
3
4
4
1
2
1
1
0
6
2
3
1
2
2
2
0
2
0
4
0
0
4
4
4
1
2
2
1
1
8
0
1
6
2
3
1
3
4
2
2
3
2
3
2
5
1
3
3
3
2
5
2
3
3
2
2
1
1
...

output:

? 301 342 26 136 3 343 211 175 29 67 246 234 274 332 256 32 35 30 229 80 50 125 329 334 312 155 27 185 255 179 62 121 215 23 127 335 218 300 214 220 297 78 201 87 299 198 108 135 331 14 42 114 225 279 131 253 15 320 278 306 196 38 326 217 338 113 22 54 148 210 44 213 75 12 85 273 258 285 36 271 92 3...

result:

ok n=347, 25000 queries

Test #50:

score: 0
Accepted
time: 509ms
memory: 3808kb

input:

366
4
3
2
4
0
3
1
3
3
0
0
1
4
3
0
2
1
4
3
3
2
1
4
1
2
4
3
0
2
2
3
1
2
0
1
1
2
3
1
2
3
3
4
6
2
3
2
4
2
1
2
2
1
3
1
3
2
2
3
3
3
2
3
3
2
2
0
1
1
1
2
4
1
0
1
1
2
4
1
3
4
1
4
0
1
0
1
4
1
1
1
1
2
4
1
1
3
4
1
2
1
1
3
0
0
4
0
0
3
2
0
0
1
3
3
0
1
1
3
1
1
0
1
2
2
3
2
2
2
0
0
2
0
1
3
3
2
1
0
3
3
2
0
2
3
2
1
1
...

output:

? 120 318 89 326 62 74 356 183 138 85 102 306 5 280 328 23 299 90 50 91 167 98 217 281 106 162 296 231 218 347 97 263 197 87 322 297 156 286 51 148 63 314 319 54 209 311 268 355 14 164 150 141 41 93 172 61 358 88 94 341 3 239 154 329 234 207 242 199 276 157 274 76 220 215 247 57 10 334 83 343 282 31...

result:

ok n=366, 25000 queries

Test #51:

score: 0
Accepted
time: 582ms
memory: 4012kb

input:

398
0
0
1
3
1
1
2
0
2
2
1
1
0
2
2
2
0
1
2
2
2
3
4
1
1
2
1
1
5
3
0
5
0
0
4
0
3
3
4
0
1
1
5
0
1
2
4
1
3
3
5
4
1
2
1
1
2
4
4
1
0
2
2
3
1
5
2
1
2
0
2
2
3
2
2
0
2
2
2
1
2
4
2
1
1
1
4
1
1
2
1
1
1
0
2
3
2
2
0
5
3
6
2
3
2
5
1
0
3
1
4
0
2
3
1
2
3
5
3
1
1
2
5
3
2
1
1
1
2
1
2
1
4
3
3
4
3
0
4
1
4
0
2
5
4
1
2
1
...

output:

? 295 254 40 266 52 128 279 21 276 139 129 258 385 338 92 73 30 361 96 31 23 173 154 383 237 286 143 292 125 55 124 69 250 349 381 43 313 86 346 113 359 391 175 45 271 176 305 224 114 386 168 267 342 277 169 80 107 252 48 303 121 70 288 91 302 115 179 16 312 321 191 149 123 246 347 275 65 130 33 18 ...

result:

ok n=398, 25000 queries

Test #52:

score: 0
Accepted
time: 573ms
memory: 4012kb

input:

399
2
2
2
2
2
1
0
1
2
1
1
0
4
1
3
0
2
1
3
7
1
4
2
1
2
1
0
7
3
1
1
4
2
1
2
3
3
4
1
0
3
2
1
0
2
2
2
3
2
2
3
1
3
1
3
2
4
3
0
0
1
0
3
1
0
0
3
2
2
4
1
1
3
0
3
0
0
2
1
2
1
6
1
0
1
1
0
0
6
4
1
3
1
1
6
1
4
1
5
0
2
1
1
1
0
2
2
2
1
1
1
0
2
2
3
4
1
3
3
0
2
4
4
1
2
2
3
2
1
2
1
4
2
3
0
2
4
2
2
1
1
3
0
0
4
1
2
2
...

output:

? 136 127 68 396 110 150 313 310 71 135 203 82 374 143 55 57 328 315 306 15 36 166 241 392 23 273 31 319 293 220 169 238 155 126 121 258 174 167 9 329 3 248 128 221 156 218 240 222 246 124 188 123 117 371 393 125 146 309 25 181 5 390 41 77 107 72 90 280 340 80 252 93 32 81 300 279 224 260 65 66 96 2...

result:

ok n=399, 25000 queries

Test #53:

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

input:

400
1
2
3
0
1
1
2
3
2
0
1
1
3
3
1
1
4
4
3
1
0
0
2
1
2
1
3
1
0
3
4
3
2
1
1
1
4
2
2
1
1
0
0
4
1
1
6
1
3
0
2
4
1
3
0
3
2
0
1
3
3
1
5
1
2
2
1
2
4
3
2
3
1
4
4
2
0
2
1
3
0
4
0
1
0
1
0
3
4
2
0
2
2
5
2
2
0
1
2
4
1
3
1
4
1
3
2
2
0
2
1
1
2
3
2
3
0
2
4
4
0
5
2
2
2
2
3
1
3
2
2
0
1
1
2
2
1
3
3
2
0
3
4
2
2
2
5
1
...

output:

? 355 270 117 389 378 111 237 377 283 344 32 29 196 300 186 207 64 191 127 247 9 319 239 113 352 151 232 72 132 315 347 163 58 236 169 16 152 131 266 278 384 18 301 41 325 147 249 214 99 88 172 221 79 391 388 261 182 223 62 119 318 256 129 333 25 115 366 75 49 130 159 78 215 65 116 324 93 341 267 28...

result:

ok n=400, 25000 queries

Test #54:

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

input:

3
1
1
1
1
1
1
1
1
1
2

output:

? 2 3 1 
? 1 2 3 
? 1 3 2 
? 1 3 2 
? 1 2 3 
? 2 3 1 
? 1 2 3 
? 1 3 2 
? 3 2 1 
? 2 1 3 
! 2 1 3 

result:

ok n=3, 10 queries

Test #55:

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

input:

4
1
1
1
1
2
1
2
1
2
2
0
1
1
1
1
2
1
2
2
1
1
2
2
1
1
2
1
2
1
1
0
2
1
1
1
1
1
1
0
2
1
1
2
1
2
1
2
0
0
2
1
2
0
2
3

output:

? 4 1 2 3 
? 4 1 2 3 
? 2 1 3 4 
? 1 4 3 2 
? 3 1 2 4 
? 4 3 1 2 
? 1 3 4 2 
? 3 4 2 1 
? 4 2 1 3 
? 3 2 4 1 
? 1 2 3 4 
? 2 1 4 3 
? 3 2 1 4 
? 2 1 3 4 
? 3 4 1 2 
? 2 4 3 1 
? 3 4 1 2 
? 2 3 1 4 
? 1 3 4 2 
? 2 1 4 3 
? 4 3 1 2 
? 1 3 4 2 
? 4 2 1 3 
? 4 1 2 3 
? 2 1 4 3 
? 1 4 2 3 
? 2 3 4 1 
? 4...

result:

ok n=4, 55 queries

Test #56:

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

input:

5
2
1
2
1
3
2
2
1
2
2
1
1
2
1
2
3
2
2
1
1
1
2
0
0
1
2
0
0
1
4

output:

? 5 3 1 2 4 
? 5 1 3 4 2 
? 4 3 1 5 2 
? 1 2 3 5 4 
? 5 3 1 4 2 
? 4 2 1 3 5 
? 4 5 2 1 3 
? 3 2 1 4 5 
? 2 5 4 3 1 
? 3 1 5 2 4 
? 4 5 1 3 2 
? 5 4 1 2 3 
? 2 3 5 4 1 
? 3 5 1 2 4 
? 2 1 4 5 3 
? 3 1 4 2 5 
? 2 1 3 5 4 
? 3 2 5 4 1 
? 4 2 3 5 1 
? 3 4 5 2 1 
? 2 3 1 5 4 
? 1 4 2 3 5 
? 3 4 5 1 2 
?...

result:

ok n=5, 30 queries

Test #57:

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

input:

6
1
1
2
1
1
3
2
2
1
1
1
0
4
0
1
1
2
3
3
3
2
2
2
1
3
1
0
0
0
3
0
2
2
1
1
1
2
0
0
2
2
3
3
2
2
0
2
1
2
1
2
1
0
2
2
1
1
1
1
4
3
2
4
1
3
2
3
1
2
0
3
5

output:

? 4 1 6 5 3 2 
? 4 2 6 1 5 3 
? 2 5 3 4 1 6 
? 1 6 2 3 5 4 
? 2 4 1 3 6 5 
? 1 4 6 3 2 5 
? 3 4 1 2 5 6 
? 2 1 3 6 5 4 
? 6 5 4 3 2 1 
? 2 5 6 1 4 3 
? 1 3 2 4 6 5 
? 2 4 5 6 1 3 
? 1 4 6 3 5 2 
? 5 4 1 6 2 3 
? 1 3 5 6 2 4 
? 3 1 2 6 5 4 
? 4 1 3 6 2 5 
? 2 1 4 6 5 3 
? 5 3 1 2 4 6 
? 6 4 2 1 5 3 
...

result:

ok n=6, 72 queries

Test #58:

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

input:

7
3
2
1
1
3
0
3
0
1
2
2
0
3
3
2
2
3
2
0
2
1
3
1
2
1
1
1
3
1
1
2
3
2
2
1
1
1
2
3
2
2
2
2
2
2
4
4
1
3
2
2
3
1
1
3
1
3
1
1
3
2
2
3
2
2
3
5
1
1
0
2
1
1
3
1
2
0
2
2
2
1
3
3
2
1
1
2
4
3
2
1
0
2
1
5
0
2
3
2
3
1
0
1
2
1
1
1
1
3
3
2
1
3
1
1
3
1
1
3
1
0
3
1
2
1
4
4
4
0
2
1
2
0
2
1
1
4
2
0
1
3
1
1
1
4
0
0
2
4
...

output:

? 7 3 1 2 6 4 5 
? 7 4 1 5 3 6 2 
? 1 6 4 5 7 2 3 
? 2 5 3 4 7 6 1 
? 2 6 5 1 4 7 3 
? 4 1 2 3 5 6 7 
? 3 5 1 7 6 2 4 
? 1 6 5 4 7 2 3 
? 4 2 1 6 5 3 7 
? 3 6 4 2 7 5 1 
? 7 6 4 5 2 1 3 
? 3 4 7 2 1 6 5 
? 6 4 3 7 5 2 1 
? 2 5 4 6 3 1 7 
? 7 3 2 5 6 1 4 
? 2 7 3 1 4 6 5 
? 5 1 2 7 3 4 6 
? 4 7 5 1 2...

result:

ok n=7, 2489 queries

Test #59:

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

input:

3
2

output:

? 2 3 1 
! 2 3 1 

result:

ok n=3, 1 queries

Test #60:

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

input:

4
1
1
1
1
2
1
2
1
2
2
0
1
1
1
1
2
1
2
2
1
1
2
2
1
1
2
1
2
1
1
0
2
1
1
1
1
1
1
0
2
1
1
2
1
2
1
2
0
0
2
1
2
0
2
3

output:

? 4 1 2 3 
? 4 1 2 3 
? 2 1 3 4 
? 1 4 3 2 
? 3 1 2 4 
? 4 3 1 2 
? 1 3 4 2 
? 3 4 2 1 
? 4 2 1 3 
? 3 2 4 1 
? 1 2 3 4 
? 2 1 4 3 
? 3 2 1 4 
? 2 1 3 4 
? 3 4 1 2 
? 2 4 3 1 
? 3 4 1 2 
? 2 3 1 4 
? 1 3 4 2 
? 2 1 4 3 
? 4 3 1 2 
? 1 3 4 2 
? 4 2 1 3 
? 4 1 2 3 
? 2 1 4 3 
? 1 4 2 3 
? 2 3 4 1 
? 4...

result:

ok n=4, 55 queries

Test #61:

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

input:

5
1
0
0
3
2
1
1
3
1
0
2
3
4

output:

? 5 3 1 2 4 
? 5 1 3 4 2 
? 4 3 1 5 2 
? 1 2 3 5 4 
? 5 3 1 4 2 
? 4 2 1 3 5 
? 4 5 2 1 3 
? 3 2 1 4 5 
? 2 5 4 3 1 
? 3 1 5 2 4 
? 4 5 1 3 2 
? 5 4 1 2 3 
? 2 3 5 4 1 
! 2 3 5 4 1 

result:

ok n=5, 13 queries

Test #62:

score: 0
Accepted
time: 3ms
memory: 3816kb

input:

6
1
2
1
2
2
1
1
3
2
1
1
3
1
2
1
2
1
1
2
2
3
3
1
3
1
0
1
1
1
2
2
2
3
1
0
1
2
1
0
2
2
4
2
2
1
1
4
0
1
2
2
2
2
2
1
0
2
2
1
3
3
2
3
3
2
3
2
2
2
2
2
2
3
3
3
0
1
1
3
3
2
4
0
3
4
2
1
2
1
2
1
3
2
2
1
1
2
2
2
1
3
1
2
2
2
3
2
3
2
2
0
2
0
3
0
2
2
1
4
1
2
1
3
3
2
1
3
2
1
2
1
2
1
1
2
0
0
2
3
2
3
4
2
1
1
2
1
2
2
...

output:

? 4 1 6 5 3 2 
? 4 2 6 1 5 3 
? 2 5 3 4 1 6 
? 1 6 2 3 5 4 
? 2 4 1 3 6 5 
? 1 4 6 3 2 5 
? 3 4 1 2 5 6 
? 2 1 3 6 5 4 
? 6 5 4 3 2 1 
? 2 5 6 1 4 3 
? 1 3 2 4 6 5 
? 2 4 5 6 1 3 
? 1 4 6 3 5 2 
? 5 4 1 6 2 3 
? 1 3 5 6 2 4 
? 3 1 2 6 5 4 
? 4 1 3 6 2 5 
? 2 1 4 6 5 3 
? 5 3 1 2 4 6 
? 6 4 2 1 5 3 
...

result:

ok n=6, 388 queries

Test #63:

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

input:

7
4
1
2
1
2
1
1
0
2
2
2
2
5
1
1
2
4
3
2
3
1
1
2
3
0
1
3
3
2
1
1
2
1
1
1
0
4
0
2
1
1
2
1
1
4
2
3
0
4
3
2
1
3
3
1
0
3
1
0
3
2
2
2
1
1
2
4
2
3
1
1
2
1
2
3
1
1
2
2
2
0
2
3
2
2
2
2
4
4
2
1
1
3
3
3
1
3
2
1
2
3
0
1
2
2
2
0
1
3
2
1
1
1
3
2
2
0
1
2
2
1
3
2
2
1
3
2
3
1
2
0
2
1
1
4
1
2
1
0
2
3
3
1
2
2
2
0
2
2
...

output:

? 7 3 1 2 6 4 5 
? 7 4 1 5 3 6 2 
? 1 6 4 5 7 2 3 
? 2 5 3 4 7 6 1 
? 2 6 5 1 4 7 3 
? 4 1 2 3 5 6 7 
? 3 5 1 7 6 2 4 
? 1 6 5 4 7 2 3 
? 4 2 1 6 5 3 7 
? 3 6 4 2 7 5 1 
? 7 6 4 5 2 1 3 
? 3 4 7 2 1 6 5 
? 6 4 3 7 5 2 1 
? 2 5 4 6 3 1 7 
? 7 3 2 5 6 1 4 
? 2 7 3 1 4 6 5 
? 5 1 2 7 3 4 6 
? 4 7 5 1 2...

result:

ok n=7, 2478 queries

Test #64:

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

input:

3
2

output:

? 3 1 2 
! 3 1 2 

result:

ok n=3, 1 queries

Test #65:

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

input:

4
1
2
2
1
0
1
2
1
3

output:

? 2 3 4 1 
? 3 2 4 1 
? 2 4 3 1 
? 2 1 3 4 
? 4 3 2 1 
? 2 3 4 1 
? 1 4 2 3 
? 3 4 1 2 
? 2 4 1 3 
! 2 4 1 3 

result:

ok n=4, 9 queries

Test #66:

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

input:

5
0
1
2
1
1
2
1
2
2
1
3
3
0
2
0
3
2
0
2
2
1
2
0
1
2
2
1
0
3
2
2
0
0
1
0
1
1
1
0
1
1
2
2
1
1
0
1
2
2
1
4

output:

? 3 5 4 2 1 
? 5 3 4 2 1 
? 3 5 1 4 2 
? 3 2 1 4 5 
? 1 4 5 3 2 
? 2 3 4 5 1 
? 3 5 1 2 4 
? 2 4 3 1 5 
? 2 4 1 5 3 
? 3 2 1 4 5 
? 2 3 4 1 5 
? 5 1 4 3 2 
? 1 2 4 5 3 
? 3 1 5 2 4 
? 5 3 1 2 4 
? 5 2 3 4 1 
? 5 2 4 1 3 
? 3 5 4 2 1 
? 1 5 4 3 2 
? 4 3 1 2 5 
? 4 2 1 5 3 
? 4 1 3 2 5 
? 2 4 5 3 1 
?...

result:

ok n=5, 51 queries

Test #67:

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

input:

6
1
1
1
2
3
2
2
3
2
2
2
3
1
3
0
2
2
2
2
2
0
1
2
1
2
3
3
1
2
2
2
0
4
3
3
1
2
1
1
2
2
0
4
1
1
1
0
2
2
1
0
1
1
2
1
1
3
2
2
1
3
3
1
4
1
2
2
1
1
1
1
2
1
0
2
2
0
2
2
2
2
2
1
2
2
2
2
0
1
0
1
0
2
1
0
4
2
1
4
1
2
0
2
1
2
3
4
2
3
1
2
2
2
2
3
2
1
2
0
2
2
1
1
3
1
1
1
2
0
1
2
2
1
1
2
0
2
1
2
0
1
2
3
1
1
2
2
2
2
...

output:

? 2 6 5 1 4 3 
? 2 3 6 4 5 1 
? 1 4 6 3 2 5 
? 3 5 6 4 1 2 
? 4 6 1 2 3 5 
? 6 4 5 3 2 1 
? 3 6 1 5 4 2 
? 3 4 2 5 6 1 
? 6 1 4 5 2 3 
? 5 1 6 4 3 2 
? 4 2 1 5 3 6 
? 6 1 2 4 5 3 
? 4 1 5 3 6 2 
? 2 4 6 5 3 1 
? 3 6 4 5 1 2 
? 5 4 2 1 6 3 
? 6 1 4 5 2 3 
? 2 6 1 4 3 5 
? 2 5 3 4 1 6 
? 5 4 1 6 3 2 
...

result:

ok n=6, 911 queries

Test #68:

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

input:

7
3
2
1
2
1
2
2
2
2
3
2
2
1
0
3
3
1
2
1
4
2
2
0
2
2
2
3
3
2
2
3
2
1
3
2
3
2
3
2
3
3
1
2
0
1
1
1
2
2
0
1
2
3
3
2
4
3
3
1
3
3
3
1
2
1
1
2
2
2
0
2
2
1
2
2
3
2
1
1
2
0
1
1
2
1
1
1
2
4
2
2
2
3
2
2
0
1
3
1
1
2
2
4
1
1
2
2
2
2
2
2
1
1
2
1
1
2
3
1
1
0
1
3
4
2
2
1
0
2
5
2
0
1
3
3
2
3
3
4
3
3
2
2
1
0
1
2
0
2
...

output:

? 3 5 6 2 7 4 1 
? 3 2 6 4 5 7 1 
? 7 1 6 4 2 3 5 
? 1 3 4 5 2 7 6 
? 6 5 2 7 4 1 3 
? 3 6 5 4 1 7 2 
? 1 3 7 6 4 5 2 
? 1 5 3 6 2 7 4 
? 7 2 4 1 6 5 3 
? 6 2 7 4 1 3 5 
? 5 4 2 1 7 3 6 
? 6 1 7 2 4 5 3 
? 3 1 7 5 2 6 4 
? 1 3 6 4 7 2 5 
? 2 6 7 3 4 1 5 
? 5 3 6 4 1 2 7 
? 7 2 3 1 6 5 4 
? 5 6 7 2 3...

result:

ok n=7, 691 queries

Test #69:

score: 0
Accepted
time: 547ms
memory: 3936kb

input:

400
3
2
2
3
3
2
1
2
1
3
3
6
1
3
3
1
4
6
4
2
0
2
1
5
0
3
2
1
2
4
2
3
0
3
3
1
3
2
3
2
2
2
1
1
1
4
3
4
1
1
1
2
2
1
1
1
0
2
1
2
2
2
0
2
2
3
2
2
2
2
0
2
1
2
1
1
4
1
1
0
6
2
1
1
3
3
3
1
2
2
3
0
1
2
0
5
1
1
1
3
2
0
4
3
1
0
1
1
2
3
4
5
0
2
3
1
0
1
1
0
2
3
1
1
1
5
4
3
2
3
1
4
3
3
0
6
1
0
2
0
1
3
1
1
1
1
1
2
...

output:

? 75 228 309 56 42 303 245 318 32 381 369 6 219 89 299 205 282 399 103 1 223 28 371 49 141 327 30 192 138 25 237 116 346 224 361 2 108 93 77 289 5 180 310 45 38 367 199 250 261 264 342 263 394 82 357 127 140 320 363 156 207 304 119 341 279 321 145 4 114 400 57 354 35 36 298 215 249 374 366 60 27 172...

result:

ok n=400, 25000 queries

Test #70:

score: 0
Accepted
time: 600ms
memory: 3992kb

input:

400
0
3
2
3
2
2
3
1
4
1
2
0
2
1
1
2
0
0
3
3
0
4
2
2
1
0
5
3
3
2
1
1
0
0
1
2
2
5
0
2
2
1
3
2
2
2
1
5
4
0
2
2
3
0
1
0
3
2
2
1
0
4
6
2
1
2
1
2
0
1
1
3
3
3
0
0
2
1
1
3
1
3
0
1
1
1
4
3
2
2
4
4
1
2
1
0
1
2
4
5
0
0
1
4
2
3
2
1
2
1
3
2
1
1
0
0
2
2
3
2
2
0
2
4
2
1
2
4
3
2
0
3
2
1
1
0
4
4
1
5
4
2
1
2
1
1
2
3
...

output:

? 176 167 156 374 259 104 73 38 16 277 264 131 252 278 141 248 322 274 268 275 116 272 205 279 103 130 151 257 290 86 92 27 355 137 163 144 80 34 21 102 2 142 196 250 8 69 26 269 293 227 72 31 150 77 363 85 317 29 289 3 353 64 190 228 377 245 161 99 391 299 306 354 67 295 315 231 361 206 316 145 97 ...

result:

ok n=400, 25000 queries

Test #71:

score: 0
Accepted
time: 546ms
memory: 3876kb

input:

400
4
2
0
2
3
2
2
4
2
0
4
1
1
3
3
1
3
1
2
3
0
2
2
1
2
4
3
2
4
1
1
1
2
4
1
4
3
4
3
1
1
2
0
2
1
4
4
4
0
3
0
2
1
1
3
2
2
2
1
2
1
1
2
1
4
1
3
5
2
3
1
0
3
1
2
3
2
1
2
0
3
2
2
1
3
1
1
1
2
2
3
1
2
2
1
2
3
2
3
6
5
6
2
2
3
3
2
1
0
2
2
0
2
3
1
3
3
2
1
1
1
2
3
2
3
0
4
0
4
0
4
4
0
2
0
3
5
0
6
1
3
0
3
2
3
3
3
3
...

output:

? 327 107 137 120 202 47 195 152 96 31 201 353 365 141 385 77 350 285 153 51 251 49 13 9 148 274 121 79 254 185 100 398 56 189 64 1 160 188 18 207 248 231 273 381 206 368 163 306 269 179 22 221 386 104 66 151 177 388 382 142 125 127 330 309 117 242 316 26 238 391 172 61 227 267 70 272 6 349 322 60 1...

result:

ok n=400, 25000 queries

Test #72:

score: 0
Accepted
time: 495ms
memory: 3936kb

input:

400
2
0
2
2
2
2
1
1
2
3
5
5
2
1
1
2
2
0
0
2
1
3
2
3
1
3
3
4
2
2
2
1
1
6
0
2
2
3
2
1
1
3
2
6
0
2
0
2
2
5
4
2
2
1
1
2
0
1
1
5
4
2
3
1
1
3
2
2
1
1
2
2
1
4
3
2
1
2
2
0
2
0
1
2
4
4
2
3
2
2
4
5
3
2
2
7
0
2
0
2
2
3
2
0
1
2
0
1
2
2
3
3
5
0
0
3
1
2
4
3
1
0
3
1
2
2
0
4
3
3
2
2
2
3
1
1
0
0
2
1
3
3
3
0
1
4
4
4
...

output:

? 138 400 266 140 104 324 154 371 254 186 121 58 261 96 71 60 7 365 311 295 289 214 208 66 29 189 390 111 49 213 158 160 168 112 329 287 277 185 242 215 74 314 285 351 275 55 303 13 122 157 83 252 360 93 143 131 135 123 232 148 142 319 393 22 363 169 361 354 392 177 378 9 113 65 6 379 36 256 51 170 ...

result:

ok n=400, 25000 queries

Test #73:

score: 0
Accepted
time: 535ms
memory: 3940kb

input:

400
2
2
4
0
4
2
4
3
1
4
6
1
1
1
6
1
2
1
0
1
5
3
3
2
2
5
1
1
3
4
3
3
4
4
2
1
2
2
0
3
3
1
3
1
1
1
0
5
6
5
4
1
0
3
2
2
1
4
1
2
2
1
3
2
3
5
1
2
1
1
0
3
3
3
2
1
0
4
2
2
2
2
3
1
1
4
2
7
1
3
2
6
5
1
1
3
2
1
1
1
2
1
1
1
3
1
6
5
1
1
0
5
3
0
1
2
4
1
2
0
1
2
3
1
0
1
0
0
4
2
3
0
2
1
2
3
3
2
6
1
3
0
0
0
5
6
4
3
...

output:

? 253 296 26 165 198 371 300 384 275 381 235 261 170 174 69 184 322 176 311 113 16 224 207 163 222 72 64 80 319 68 323 233 162 332 390 41 9 331 76 141 312 388 32 374 239 391 392 342 8 250 48 209 136 212 19 369 379 363 274 151 17 219 87 33 56 315 11 355 100 202 67 188 15 263 111 351 97 383 27 208 318...

result:

ok n=400, 25000 queries

Test #74:

score: 0
Accepted
time: 525ms
memory: 3876kb

input:

400
6
2
2
0
0
2
6
3
5
5
0
4
0
2
4
3
4
1
1
1
6
1
2
2
1
4
1
4
0
0
1
2
3
2
0
3
3
2
0
7
3
1
3
1
2
2
3
4
3
2
2
1
0
3
2
1
1
0
0
3
1
1
1
0
4
1
7
1
2
2
2
1
2
0
2
5
2
4
3
1
5
1
3
2
2
4
3
1
2
2
2
0
3
1
0
2
0
1
3
5
3
2
1
3
4
3
1
4
3
2
3
0
5
2
3
0
4
1
2
1
3
4
1
3
0
2
3
2
3
6
0
1
1
0
3
4
5
0
5
2
2
1
6
4
3
1
2
1
...

output:

? 22 397 392 222 369 352 379 111 312 254 191 323 373 262 329 319 198 189 166 208 182 6 286 363 174 108 50 364 350 365 55 51 291 203 25 149 116 270 268 76 188 71 83 168 21 176 213 388 170 245 99 117 232 380 16 297 96 324 187 278 288 321 266 134 59 161 303 205 20 160 326 60 113 237 241 328 393 287 86 ...

result:

ok n=400, 25000 queries

Test #75:

score: 0
Accepted
time: 531ms
memory: 3856kb

input:

400
0
3
1
1
1
3
2
2
1
1
0
1
2
3
3
3
3
1
3
0
1
1
5
1
2
2
0
2
1
4
2
3
2
1
1
5
1
1
3
2
1
7
0
1
4
3
4
1
0
4
3
0
1
3
2
3
2
2
2
6
0
2
3
3
4
1
3
0
3
1
0
2
1
3
1
2
1
2
2
3
0
2
2
2
1
2
0
2
2
2
3
2
2
4
0
2
2
1
1
1
3
2
2
1
2
2
2
0
2
6
1
1
4
1
2
4
2
1
0
2
1
2
3
1
3
0
2
0
4
0
2
0
1
0
2
2
3
3
2
0
1
5
0
1
2
1
2
2
...

output:

? 214 364 9 145 175 304 201 143 204 72 244 106 252 196 52 120 159 81 5 35 62 183 85 294 176 153 320 103 387 96 89 154 6 192 313 308 216 366 121 155 48 262 225 246 152 310 223 370 86 343 78 238 42 189 4 323 109 311 141 251 324 278 59 111 128 250 147 17 336 99 169 126 342 289 138 334 280 165 22 348 33...

result:

ok n=400, 25000 queries

Test #76:

score: 0
Accepted
time: 571ms
memory: 3808kb

input:

400
1
4
0
0
1
0
2
3
4
1
5
3
4
3
3
3
0
0
2
1
3
1
2
2
1
2
3
2
1
2
0
1
3
6
1
3
0
2
2
1
1
2
0
0
1
4
2
2
2
2
3
1
1
0
0
2
2
1
0
1
3
2
1
6
1
3
1
1
5
3
0
2
0
1
6
1
4
2
1
2
5
2
1
4
2
2
1
1
1
2
2
4
2
3
3
0
2
4
4
4
2
2
4
0
3
2
2
3
3
2
4
4
2
2
2
1
2
0
4
3
4
3
1
2
3
3
5
3
1
4
2
2
0
2
1
1
2
4
3
3
3
2
1
1
3
1
0
2
...

output:

? 121 165 122 163 93 260 166 31 111 294 124 148 146 362 280 169 73 341 232 90 370 75 96 311 271 118 276 151 366 381 193 235 154 152 133 50 357 101 39 16 242 367 168 67 28 55 147 51 214 18 84 127 145 182 220 123 326 328 335 399 259 40 222 86 167 254 332 47 128 359 82 372 198 141 284 126 373 199 97 1 ...

result:

ok n=400, 25000 queries

Test #77:

score: 0
Accepted
time: 557ms
memory: 3880kb

input:

400
3
0
2
1
3
3
2
1
4
1
0
2
2
2
0
1
3
1
5
1
3
1
0
1
5
1
2
3
2
2
2
3
2
0
3
5
1
2
2
1
1
0
1
4
3
5
0
1
1
2
2
3
0
1
1
4
1
6
1
1
5
3
1
3
2
2
1
2
0
0
3
1
3
3
1
1
1
1
1
2
1
2
2
1
1
3
3
4
3
2
4
3
1
2
0
2
2
2
0
3
2
5
0
2
4
1
2
0
1
1
0
1
2
4
2
1
1
0
4
1
2
5
2
3
3
4
0
5
2
2
1
2
3
4
1
2
4
2
1
2
1
1
3
4
5
3
0
2
...

output:

? 37 179 316 64 378 324 136 201 200 234 208 147 227 342 318 348 5 223 210 285 390 281 181 166 65 350 207 398 155 90 14 301 39 60 73 222 138 82 247 333 213 127 165 277 231 4 393 346 375 175 55 274 53 79 184 275 36 96 66 86 57 351 80 104 224 105 56 212 94 168 106 395 249 158 371 221 43 338 40 164 173 ...

result:

ok n=400, 25000 queries

Test #78:

score: 0
Accepted
time: 557ms
memory: 3876kb

input:

400
3
4
2
5
1
1
3
2
5
3
2
2
0
1
1
4
1
2
2
4
3
2
4
0
5
1
3
2
0
2
1
2
1
0
2
3
0
2
3
4
2
2
2
3
5
4
1
5
3
0
4
3
3
3
2
1
2
4
0
2
1
2
1
0
3
3
4
1
2
3
0
0
2
2
3
0
4
2
2
5
0
4
2
1
2
1
4
4
3
0
2
0
1
1
2
3
5
4
3
1
0
0
1
1
2
2
5
2
4
3
1
1
3
2
0
3
3
4
1
2
3
2
6
3
2
3
0
1
1
2
2
3
0
0
2
3
2
2
0
2
2
3
0
2
1
1
1
2
...

output:

? 177 4 286 166 15 197 238 397 9 38 230 376 204 353 158 60 354 266 170 59 199 106 224 391 149 288 380 334 228 336 245 37 44 309 200 248 48 140 90 377 78 49 273 125 210 99 306 95 338 102 110 307 174 227 289 150 72 43 168 36 270 148 385 352 181 247 116 77 251 249 83 378 122 341 159 153 39 297 258 175 ...

result:

ok n=400, 25000 queries

Test #79:

score: 0
Accepted
time: 535ms
memory: 3944kb

input:

400
3
0
2
0
1
3
2
2
2
2
1
2
6
3
1
4
1
2
2
3
4
2
1
1
4
6
2
3
4
1
1
1
1
1
0
1
4
3
3
2
0
0
2
1
4
3
2
1
1
1
6
0
1
4
5
2
1
2
4
2
1
3
0
1
0
2
4
1
1
3
4
2
2
3
5
0
1
5
5
4
1
2
2
5
2
1
1
5
2
2
1
2
1
3
0
2
4
2
4
1
2
4
2
1
1
3
2
2
2
1
1
3
3
2
2
2
1
1
2
4
2
2
3
2
4
4
1
2
3
4
2
0
4
1
2
0
5
2
4
2
1
1
0
0
5
3
2
7
...

output:

? 350 39 316 206 151 223 101 2 267 163 273 380 180 142 64 136 96 269 345 236 27 103 146 186 348 209 381 366 251 307 53 173 31 29 302 399 384 127 134 230 194 347 14 32 309 340 245 199 249 378 116 396 147 295 55 88 335 143 10 157 365 292 247 117 210 190 158 100 339 355 238 98 261 349 118 35 99 12 280 ...

result:

ok n=400, 25000 queries

Test #80:

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

input:

400
2
2
3
1
1
0
6
4
0
0
2
5
2
1
1
0
4
3
1
1
1
3
3
2
2
2
2
1
2
4
1
1
1
2
1
2
1
4
1
1
2
4
6
1
1
2
3
3
2
2
2
2
1
2
2
2
0
1
0
1
6
3
3
5
3
2
5
1
1
0
2
2
2
1
2
2
4
1
1
1
0
4
0
2
2
1
1
2
2
2
2
4
0
4
2
2
1
3
6
3
1
1
2
2
2
1
2
2
3
2
4
1
3
1
3
0
2
1
0
2
3
1
2
4
2
1
3
0
4
0
2
1
4
2
1
3
1
2
3
1
1
4
0
1
1
2
1
2
...

output:

? 39 189 121 394 183 25 161 339 8 107 98 302 10 141 156 27 283 130 201 43 200 54 204 344 177 78 73 251 144 297 290 250 348 270 209 309 31 81 298 391 311 118 219 100 194 338 146 346 192 343 286 179 293 361 114 266 372 32 4 80 355 75 158 380 61 241 104 292 362 336 272 249 48 240 129 282 356 234 86 64 ...

result:

ok n=400, 25000 queries

Test #81:

score: 0
Accepted
time: 522ms
memory: 3876kb

input:

400
1
3
1
5
0
1
2
1
3
2
1
5
3
2
1
0
5
5
3
5
2
0
0
4
1
3
1
2
1
2
2
1
3
6
3
3
3
1
2
2
3
0
1
3
3
5
3
7
1
4
3
0
1
1
1
3
3
3
2
4
2
1
1
1
1
2
0
0
1
3
2
0
4
3
1
1
4
2
2
6
4
3
2
3
4
2
1
2
2
2
6
0
0
0
3
2
0
3
0
3
0
2
1
3
2
2
2
0
0
8
1
4
4
1
0
2
4
1
1
0
4
1
3
4
0
2
0
2
2
1
2
2
6
3
0
3
5
2
1
4
1
2
4
1
2
1
5
4
...

output:

? 128 24 33 43 284 197 386 117 251 213 381 101 121 262 34 201 367 300 225 296 153 27 157 11 371 75 104 131 220 360 361 14 68 286 233 215 26 94 292 384 319 168 204 211 212 378 92 269 46 242 353 16 306 263 9 95 142 278 354 232 313 304 273 280 62 279 105 54 70 158 55 399 346 363 179 136 368 64 1 256 39...

result:

ok n=400, 25000 queries

Test #82:

score: 0
Accepted
time: 571ms
memory: 3860kb

input:

400
2
3
0
3
1
3
3
4
0
1
1
1
8
1
5
2
0
3
4
2
0
2
2
2
1
0
2
2
0
3
2
2
3
4
0
3
0
0
2
3
1
1
2
0
3
3
2
4
1
1
3
3
0
1
2
2
4
3
3
2
2
3
0
1
7
4
4
1
1
6
0
4
2
2
4
1
4
3
2
1
1
5
0
3
2
3
3
0
2
3
0
3
2
3
1
1
5
3
1
3
0
2
1
1
2
2
2
4
3
2
2
0
2
1
0
2
1
3
3
1
3
1
0
2
4
2
1
4
0
3
1
1
2
1
1
2
2
4
2
1
1
0
0
2
3
2
2
0
...

output:

? 275 267 51 314 115 10 82 307 52 370 54 173 128 362 47 105 334 365 2 53 87 161 392 184 40 286 318 302 108 243 113 189 372 98 80 141 62 73 371 227 202 306 399 125 259 353 138 178 381 81 345 100 282 324 271 378 187 55 146 298 23 140 247 164 208 213 7 313 337 217 393 358 198 102 391 351 317 17 336 368...

result:

ok n=400, 25000 queries

Test #83:

score: 0
Accepted
time: 572ms
memory: 3856kb

input:

400
3
0
1
4
0
1
1
1
0
2
3
1
0
2
2
1
4
1
1
2
4
4
1
3
4
1
2
3
1
1
1
1
2
2
1
1
2
5
3
3
3
1
0
2
3
1
2
1
0
2
1
1
4
2
2
2
1
0
3
1
2
1
2
1
3
4
4
1
1
0
1
2
4
0
1
0
1
1
4
1
6
2
3
2
2
2
2
2
1
1
1
6
3
2
2
1
3
3
5
1
5
1
0
0
5
1
5
2
1
2
2
1
2
1
1
1
1
3
0
0
1
0
0
2
1
2
2
3
1
4
5
4
3
2
4
2
1
5
1
3
4
1
2
1
3
2
3
2
...

output:

? 356 5 179 320 87 357 143 278 345 379 255 175 123 40 225 39 88 176 370 323 389 308 240 112 276 29 316 286 333 386 119 332 322 130 396 94 353 188 23 239 12 109 324 235 84 384 221 118 302 180 140 4 258 215 321 310 296 45 160 348 103 10 54 344 158 98 285 391 303 44 233 281 214 85 220 170 373 125 382 3...

result:

ok n=400, 25000 queries

Test #84:

score: 0
Accepted
time: 464ms
memory: 3940kb

input:

400
1
2
2
2
4
4
5
0
2
3
1
3
1
1
1
5
2
3
2
1
1
3
1
2
0
1
4
1
2
1
0
2
1
0
2
1
1
3
2
7
0
2
4
4
1
3
2
4
1
2
1
1
3
1
3
3
4
3
1
2
1
2
4
1
2
5
3
2
1
3
2
1
2
4
2
1
0
3
1
0
1
2
3
1
2
1
2
2
2
1
1
1
0
2
2
1
4
4
0
1
4
4
2
4
0
2
3
3
4
1
3
5
3
2
3
4
1
1
0
2
3
1
1
2
3
3
2
2
0
1
0
1
5
3
1
1
1
2
2
0
1
4
3
2
2
1
1
3
...

output:

? 307 47 371 241 193 367 243 209 128 316 268 25 110 174 214 132 232 324 259 104 394 384 13 387 121 20 195 78 353 218 109 153 86 107 9 29 108 230 21 191 345 161 216 139 333 364 267 178 159 187 340 374 167 19 164 98 17 133 312 150 171 138 41 341 305 55 182 231 199 148 181 88 342 246 66 166 217 357 236...

result:

ok n=400, 25000 queries

Test #85:

score: 0
Accepted
time: 658ms
memory: 3952kb

input:

400
2
3
2
2
3
3
1
2
3
3
2
3
2
3
3
3
1
2
1
0
1
2
2
3
1
0
5
3
4
3
0
2
3
3
2
1
2
3
1
3
3
2
3
4
3
2
2
5
0
0
1
1
0
3
1
1
3
5
4
2
3
2
2
2
2
2
2
2
0
3
6
1
2
3
1
2
0
1
1
4
2
1
2
3
1
2
2
3
2
1
2
3
2
1
4
1
0
1
4
0
3
1
4
5
2
1
2
0
7
0
3
3
2
1
2
3
0
3
1
4
2
1
3
2
3
1
2
3
2
4
2
7
2
2
1
2
1
6
1
3
1
0
5
5
2
0
3
0
...

output:

? 108 343 298 400 101 86 49 231 296 115 373 222 384 130 68 392 361 356 77 192 94 181 249 105 364 141 12 79 98 204 380 124 271 377 179 111 51 175 30 114 317 66 303 74 178 193 326 37 328 278 234 219 378 63 197 46 137 341 280 22 27 41 163 119 24 344 80 4 173 16 174 91 258 388 155 13 40 43 145 6 315 57 ...

result:

ok n=400, 25000 queries

Test #86:

score: 0
Accepted
time: 531ms
memory: 3940kb

input:

400
0
4
3
1
2
1
0
4
1
2
0
1
0
2
1
0
0
3
3
1
3
2
6
3
1
1
1
2
1
0
1
2
2
2
1
4
1
2
4
2
2
2
1
5
0
3
0
1
3
0
2
3
4
0
0
0
1
3
0
4
2
3
0
1
0
2
4
1
0
2
2
1
1
2
3
1
3
3
2
3
2
0
1
0
4
2
1
2
4
1
4
2
2
3
1
2
1
1
3
2
3
4
2
0
2
1
1
3
1
3
3
3
4
1
3
0
1
4
1
1
1
1
3
1
2
2
2
0
0
2
2
1
3
2
0
3
2
5
8
2
2
1
1
2
1
2
2
2
...

output:

? 222 122 248 272 186 335 361 253 399 76 339 66 308 215 290 362 135 160 233 142 71 213 355 190 313 232 2 87 159 28 73 305 119 315 125 140 98 97 348 318 257 117 291 316 298 91 221 68 365 331 387 360 226 376 275 323 294 301 132 210 65 21 293 32 105 199 106 61 67 64 178 126 247 51 356 179 237 394 37 19...

result:

ok n=400, 25000 queries

Test #87:

score: 0
Accepted
time: 517ms
memory: 3936kb

input:

400
3
2
0
5
2
1
3
1
1
1
1
3
1
1
2
2
1
1
1
2
3
1
4
2
2
3
2
1
2
0
2
2
1
4
2
1
1
3
2
2
2
2
1
1
1
1
0
3
2
5
4
0
1
0
2
0
3
3
1
2
1
3
1
1
4
4
0
3
1
1
1
1
3
1
2
2
0
2
0
1
3
0
1
2
3
2
1
2
2
3
0
4
4
4
0
2
2
3
0
0
1
1
3
1
3
1
6
6
1
4
4
2
0
2
2
2
3
3
1
1
4
3
2
1
0
0
1
3
0
4
2
2
2
0
3
2
0
0
0
1
1
2
3
2
3
0
0
3
...

output:

? 283 388 127 396 15 91 259 108 163 166 329 160 254 63 274 346 72 308 146 398 385 161 324 338 290 74 195 159 380 270 239 264 141 382 247 168 374 113 241 149 101 326 370 307 148 363 78 11 279 169 208 304 224 387 213 28 152 5 266 268 26 104 291 325 222 38 309 378 58 49 178 130 116 278 199 214 64 164 2...

result:

ok n=400, 25000 queries

Test #88:

score: 0
Accepted
time: 482ms
memory: 3880kb

input:

400
1
2
1
3
2
1
0
1
1
2
2
1
5
1
3
4
0
1
3
2
3
2
4
4
1
6
1
3
2
3
2
3
1
6
5
1
1
0
2
4
1
1
2
2
0
2
2
0
7
2
1
3
3
0
0
1
2
5
1
4
2
2
2
0
3
2
4
2
1
1
3
2
0
3
1
1
0
1
4
3
0
1
0
1
4
2
1
3
2
0
4
1
1
2
2
3
3
1
1
3
3
4
6
2
2
1
5
1
4
1
5
1
1
2
2
2
2
2
3
1
2
1
2
3
0
1
1
3
0
1
1
0
2
4
1
4
2
1
2
1
1
1
1
0
1
0
4
2
...

output:

? 70 188 65 302 237 208 279 158 217 244 312 320 252 274 123 308 395 114 363 378 187 201 131 399 173 62 9 146 152 280 309 134 156 292 388 83 218 139 258 78 115 310 177 220 77 97 164 80 76 374 199 246 52 377 229 106 317 103 384 332 257 122 108 57 89 351 66 130 360 101 189 6 138 393 265 33 394 385 322 ...

result:

ok n=400, 25000 queries

Test #89:

score: 0
Accepted
time: 553ms
memory: 3856kb

input:

400
2
2
2
1
1
1
1
1
1
0
2
4
0
1
1
4
3
1
2
2
1
3
1
0
3
0
4
1
2
2
4
0
1
3
4
4
1
2
1
1
1
2
1
0
1
2
0
3
2
1
1
2
3
0
3
2
1
2
4
3
1
1
4
1
2
0
1
2
1
1
3
1
3
5
2
4
1
1
2
3
2
0
1
3
1
1
0
1
2
4
0
2
3
1
0
3
2
0
2
4
1
1
1
2
0
0
7
1
1
2
5
5
3
2
2
2
3
2
1
3
2
1
5
1
3
1
1
2
2
2
4
0
3
3
2
3
1
3
5
3
1
3
1
3
3
2
1
1
...

output:

? 209 109 312 91 15 106 344 16 354 231 229 85 167 227 371 10 59 177 357 72 215 339 386 8 252 171 146 110 328 331 232 392 161 149 143 47 31 269 101 159 301 155 48 261 90 320 233 35 216 376 313 12 222 258 7 175 300 192 117 246 332 38 341 18 9 369 125 140 221 345 335 286 309 166 105 396 58 114 165 170 ...

result:

ok n=400, 25000 queries

Test #90:

score: 0
Accepted
time: 562ms
memory: 3824kb

input:

400
3
4
2
1
2
1
3
2
2
3
0
4
0
7
0
3
2
1
0
0
1
1
5
0
2
2
2
4
0
2
0
2
2
4
1
1
2
1
4
3
4
3
1
1
3
1
2
3
1
1
0
2
7
2
0
3
2
1
2
1
1
1
1
3
1
3
3
3
4
0
1
5
1
2
1
3
0
2
3
0
2
2
3
4
2
1
0
4
2
1
3
0
0
3
3
2
2
2
8
0
1
0
2
3
1
4
0
3
1
2
2
2
1
1
4
2
0
3
1
1
2
4
2
2
1
2
3
4
1
1
1
1
3
6
0
1
5
2
0
0
1
1
2
2
3
0
3
1
...

output:

? 5 104 370 239 167 128 385 109 369 308 61 191 259 344 207 348 228 376 188 190 125 395 96 292 182 183 100 248 272 260 294 316 291 400 25 154 253 38 290 173 67 111 230 381 140 318 304 280 205 235 85 98 165 64 397 345 225 382 31 75 196 63 350 313 240 135 70 201 174 102 2 349 234 119 282 353 204 143 34...

result:

ok n=400, 25000 queries

Test #91:

score: 0
Accepted
time: 534ms
memory: 3816kb

input:

400
4
2
1
3
3
1
0
2
3
0
3
4
0
4
2
4
3
0
2
2
3
5
2
2
3
5
3
0
0
2
4
2
3
3
1
3
1
0
1
2
3
0
5
4
0
2
2
2
1
2
0
2
3
2
0
5
2
3
1
5
1
2
2
3
2
1
0
4
3
0
2
0
2
2
2
0
3
4
0
2
5
2
1
0
2
0
1
4
1
2
3
4
2
2
1
0
3
2
1
3
2
2
5
4
6
0
1
0
5
2
2
1
2
1
2
1
1
3
2
2
3
3
3
1
3
1
3
0
2
3
2
3
6
2
1
2
2
2
1
3
1
5
2
0
2
1
1
5
...

output:

? 201 166 53 143 308 271 386 317 3 153 21 320 4 37 46 65 100 69 74 51 215 198 220 269 146 158 219 104 133 36 119 305 140 112 89 58 48 44 299 327 164 288 159 351 211 85 191 121 238 49 337 352 382 84 224 328 243 372 346 98 262 63 115 207 280 247 6 18 94 241 194 38 39 281 67 81 8 54 273 270 272 293 294...

result:

ok n=400, 25000 queries

Test #92:

score: 0
Accepted
time: 510ms
memory: 3944kb

input:

400
0
3
1
2
4
2
4
3
5
2
1
0
4
2
1
2
3
1
2
0
1
1
2
1
4
1
5
0
4
2
2
3
0
5
3
2
3
1
0
2
1
3
4
6
4
1
1
1
1
2
3
1
2
1
1
2
0
2
0
0
1
3
2
0
0
0
1
5
1
1
1
1
1
3
1
4
5
3
3
1
2
0
3
5
5
6
2
2
1
3
4
1
2
1
0
1
2
1
5
0
1
0
2
7
0
3
1
2
2
1
1
0
2
2
3
2
3
1
1
2
3
2
2
1
2
0
3
1
1
1
4
3
1
3
0
0
4
2
0
2
1
0
2
3
4
2
3
3
...

output:

? 114 237 259 133 38 386 95 242 214 376 30 50 326 82 78 377 164 306 207 55 97 310 244 201 46 1 222 367 34 157 229 68 9 337 153 247 250 26 148 234 303 316 139 239 150 241 325 236 91 158 36 71 102 395 383 281 339 362 223 245 179 280 141 140 352 85 261 175 173 269 332 169 315 224 115 52 251 45 33 206 3...

result:

ok n=400, 25000 queries

Test #93:

score: 0
Accepted
time: 565ms
memory: 3880kb

input:

400
0
1
1
2
1
4
1
2
2
5
0
4
1
2
2
3
0
1
5
3
3
0
1
1
0
4
2
4
0
0
3
2
3
5
1
1
3
0
4
1
2
1
3
1
0
2
0
0
2
2
2
2
1
2
2
3
2
3
2
3
1
2
2
0
1
6
0
3
2
2
1
1
0
0
4
1
3
1
1
2
3
0
0
1
1
5
1
3
2
1
1
2
4
1
1
3
1
1
2
1
4
1
2
0
1
3
2
4
0
5
3
3
3
0
2
3
1
1
3
1
3
0
2
0
3
1
4
5
0
0
2
1
1
2
3
4
1
1
2
3
2
5
1
3
3
1
0
0
...

output:

? 25 367 374 188 33 55 88 183 9 249 92 346 93 258 359 37 357 179 129 67 267 390 29 212 323 306 185 337 202 69 239 193 358 153 261 251 19 102 123 104 20 295 126 363 333 36 273 204 38 275 395 5 334 142 242 122 80 250 298 321 133 314 8 248 45 170 317 186 176 214 51 231 107 232 63 316 117 265 125 24 106...

result:

ok n=400, 25000 queries

Test #94:

score: 0
Accepted
time: 550ms
memory: 3876kb

input:

400
2
2
1
2
1
3
0
1
0
0
2
1
3
1
2
4
4
1
2
4
4
3
0
3
3
2
1
4
0
4
3
2
3
3
3
1
2
1
0
3
2
2
1
3
3
2
2
4
1
1
2
1
0
1
2
1
2
2
3
3
1
6
1
2
2
2
2
1
2
2
1
1
3
3
1
1
1
2
1
0
2
0
0
1
1
0
0
4
0
0
2
2
0
2
2
2
2
3
5
1
3
0
1
0
1
1
1
3
3
4
5
1
2
1
5
3
2
1
2
0
1
2
2
1
2
3
4
1
4
3
2
1
1
1
3
3
2
2
1
0
2
4
2
3
1
1
0
2
...

output:

? 294 41 199 354 58 331 129 373 306 394 190 69 300 157 382 32 282 102 339 257 321 371 208 74 60 72 119 193 76 400 40 262 192 240 106 188 19 44 237 124 224 64 55 228 45 206 252 75 186 148 26 301 225 259 302 291 293 276 236 381 278 47 203 267 222 283 239 246 51 179 140 361 292 254 214 21 52 94 322 377...

result:

ok n=400, 25000 queries

Test #95:

score: 0
Accepted
time: 559ms
memory: 4012kb

input:

400
0
1
5
2
1
2
1
1
2
4
1
2
1
1
1
4
0
2
2
3
3
6
1
3
2
0
3
3
2
3
1
2
1
6
5
3
2
1
3
5
1
0
1
0
5
1
3
2
1
0
3
2
3
3
1
0
4
2
4
0
3
5
1
2
3
1
2
2
2
2
4
2
2
2
3
3
2
4
2
1
0
1
3
4
3
3
2
2
2
3
2
3
1
1
4
2
2
2
1
2
6
4
3
2
1
0
2
1
1
1
1
1
1
6
4
2
2
4
4
1
3
0
2
2
2
2
6
0
1
5
4
0
1
1
2
2
2
0
0
1
3
5
4
1
1
0
2
0
...

output:

? 400 13 118 91 137 177 44 313 234 102 112 17 327 298 84 61 9 282 388 278 52 373 82 87 37 5 97 387 243 324 233 197 8 193 187 259 110 397 293 18 340 329 361 235 4 138 360 214 294 257 250 202 157 237 106 221 166 22 74 266 171 16 284 319 291 180 343 315 196 238 240 395 131 346 79 175 351 113 172 252 45...

result:

ok n=400, 25000 queries

Test #96:

score: -100
Wrong Answer
time: 531ms
memory: 3820kb

input:

400
3
1
3
2
3
2
3
1
0
0
1
0
3
3
0
2
3
2
1
1
2
2
3
1
3
1
3
3
2
4
1
1
4
2
1
0
1
1
5
3
2
2
2
3
2
5
3
3
4
2
2
2
1
2
1
2
0
2
2
1
3
1
4
2
3
6
0
0
3
2
0
2
3
1
3
1
6
3
1
3
2
3
2
3
0
2
2
4
2
2
2
4
2
1
4
2
3
0
2
1
2
1
1
2
0
1
1
3
3
4
1
0
2
6
2
2
5
2
1
2
3
2
0
2
4
2
2
2
2
5
3
2
2
3
3
2
0
0
1
2
4
0
6
2
1
3
4
0
...

output:

? 159 370 257 141 342 74 351 68 263 255 315 176 158 213 381 144 219 399 123 323 272 170 198 58 259 82 135 279 229 270 374 165 253 363 105 195 373 331 357 52 240 271 235 148 189 337 281 302 205 137 121 249 260 42 333 316 79 175 24 309 284 108 264 236 332 358 124 244 61 193 136 231 172 301 41 19 216 2...

result:

wrong answer Elements should be distinct.