QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#32487 | #1464. Interactive Algorithm | cdw | WA | 1371ms | 3852kb | C++20 | 1.0kb | 2022-05-20 19:56:25 | 2022-05-20 19:56:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N = 400, K = 25000;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, p[N], deg[N];
bool vis[N][N];
int main(){
ios::sync_with_stdio(false);
cin >> n;
for(int i = 0;i < n;++ i){p[i] = i; vis[i][i] = true;}
for(int i = 0, x;i < K;++ i){
shuffle(p, p + n, rng);
cout << '?';
for(int j = 0;j < n;++ j) cout << ' ' << p[j] + 1;
cout << endl;
cin >> x;
if(x == n - 1){
cout << '!';
for(int j = 0;j < n;++ j) cout << ' ' << p[j] + 1;
cout << endl;
return 0;
}
if(!x) for(int j = 0;j < n - 1;++ j)
vis[p[j]][p[j + 1]] = vis[p[j + 1]][p[j]] = true;
}
for(int i = 0;i < n;++ i)
for(int j = 0;j < n;++ j) deg[i] += !vis[i][j];
for(p[0] = 0;p[0] < n;++ p[0]) if(deg[p[0]] == 1){
for(int i = 1;i < n;++ i)
for(p[i] = 0;p[i] < n;++ p[i])
if(!vis[p[i - 1]][p[i]] && (i == 1 || p[i] != p[i - 2])) break;
cout << '!';
for(int i = 0;i < n;++ i) cout << ' ' << p[i] + 1;
cout << endl;
return 0;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3568kb
input:
5 2 0 3 2 0 2 2 1 1 2 4
output:
? 1 2 5 4 3 ? 2 1 4 5 3 ? 1 5 2 3 4 ? 5 2 1 3 4 ? 4 5 3 2 1 ? 1 5 4 2 3 ? 3 2 4 5 1 ? 5 4 3 1 2 ? 5 3 1 2 4 ? 5 1 3 2 4 ? 3 4 2 5 1 ! 3 4 2 5 1
result:
ok n=5, 11 queries
Test #2:
score: 0
Accepted
time: 2ms
memory: 3552kb
input:
2 1
output:
? 1 2 ! 1 2
result:
ok n=2, 1 queries
Test #3:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
3 1 2
output:
? 3 1 2 ? 1 2 3 ! 1 2 3
result:
ok n=3, 2 queries
Test #4:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
4 2 2 2 1 2 0 0 1 2 3
output:
? 4 2 1 3 ? 1 3 4 2 ? 3 2 4 1 ? 4 1 2 3 ? 1 3 2 4 ? 1 2 3 4 ? 1 2 3 4 ? 2 3 4 1 ? 4 2 3 1 ? 3 1 4 2 ! 3 1 4 2
result:
ok n=4, 10 queries
Test #5:
score: 0
Accepted
time: 5ms
memory: 3696kb
input:
5 2 1 3 1 2 1 2 1 3 1 2 2 1 1 2 2 0 1 1 2 0 1 2 1 2 2 2 1 0 2 4
output:
? 3 2 4 1 5 ? 2 3 1 4 5 ? 5 2 4 3 1 ? 4 1 3 2 5 ? 1 3 4 5 2 ? 1 2 5 4 3 ? 5 4 2 3 1 ? 5 4 1 3 2 ? 4 2 3 1 5 ? 1 4 2 3 5 ? 5 4 3 1 2 ? 1 2 4 3 5 ? 3 5 4 2 1 ? 4 1 5 2 3 ? 2 1 3 4 5 ? 5 2 4 1 3 ? 1 4 5 3 2 ? 2 3 1 4 5 ? 3 4 1 2 5 ? 3 2 4 5 1 ? 1 4 5 3 2 ? 5 2 1 4 3 ? 2 3 4 1 5 ? 1 4 3 2 5 ? 4 2 3 5 1 ...
result:
ok n=5, 31 queries
Test #6:
score: 0
Accepted
time: 14ms
memory: 3596kb
input:
7 2 2 5 2 1 3 1 2 3 3 1 2 2 2 3 1 1 1 2 2 4 2 2 2 3 3 2 2 5 1 2 2 1 0 1 2 3 3 3 2 0 3 1 1 1 2 0 2 0 3 1 1 1 3 4 0 1 1 3 3 3 2 3 3 0 3 1 2 1 1 3 2 2 1 1 2 3 2 2 1 2 4 3 3 0 2 4 2 2 1 1 2 2 1 0 1 4 2 1 1 2 4 0 2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 ? 8 1 2 5 4 6 7 9 10 3 ? 7 10 5 1 2 3 4 8 6 9 ?...
result:
ok n=10, 25000 queries
Test #8:
score: 0
Accepted
time: 211ms
memory: 3652kb
input:
20 1 2 3 0 1 1 5 3 2 3 3 1 1 2 3 4 2 3 3 2 2 1 2 2 2 0 0 4 2 1 0 2 2 2 3 4 1 2 2 4 4 2 2 1 0 4 3 0 1 1 0 1 1 4 1 1 3 0 2 2 1 5 0 4 1 1 2 1 3 1 2 3 2 2 0 2 4 1 2 2 2 1 3 1 1 3 2 1 2 2 1 1 0 3 3 1 0 2 4 3 2 1 4 3 1 4 6 3 5 3 2 1 1 1 4 1 1 4 3 3 2 2 1 0 2 1 1 5 5 1 2 3 1 2 1 1 4 3 2 3 2 4 4 2 1 3 2 3 4...
output:
? 16 6 14 20 9 17 7 13 8 18 15 3 1 4 11 5 12 2 19 10 ? 9 4 8 11 15 14 2 6 12 20 3 19 17 10 18 13 1 5 7 16 ? 14 11 12 20 18 3 9 17 8 6 1 5 10 7 16 15 2 19 4 13 ? 1 17 18 15 7 8 12 3 14 20 11 19 10 13 6 4 2 16 9 5 ? 2 3 13 5 4 14 9 16 17 12 6 15 20 8 18 10 1 7 19 11 ? 8 10 6 2 11 13 14 20 16 1 17 19 3...
result:
ok n=20, 25000 queries
Test #9:
score: 0
Accepted
time: 285ms
memory: 3604kb
input:
30 4 2 1 1 1 2 2 4 1 2 4 5 2 2 2 3 2 0 2 3 2 1 1 4 0 4 3 3 1 1 0 4 0 1 1 1 3 3 1 0 2 1 3 2 3 4 1 1 2 0 1 1 4 0 0 2 1 1 3 1 3 4 1 3 1 2 1 1 1 2 3 2 1 2 2 3 1 1 1 2 3 3 3 1 1 2 2 5 3 2 3 2 0 4 2 5 0 2 2 5 2 4 2 1 3 2 3 1 2 3 4 2 3 0 2 4 2 1 0 2 1 3 0 2 2 1 3 1 2 4 1 3 4 3 1 0 4 2 2 3 3 3 2 0 6 2 4 1 1...
output:
? 18 25 20 1 16 23 24 29 11 13 5 15 22 28 10 27 9 30 7 21 6 4 2 17 19 26 8 12 14 3 ? 28 17 14 26 12 19 22 23 3 24 13 25 9 8 7 11 10 27 5 29 16 20 30 6 4 18 2 21 15 1 ? 28 9 19 13 25 6 7 5 2 15 20 3 11 22 12 23 14 30 24 1 10 27 29 18 17 21 16 26 4 8 ? 13 12 27 9 23 17 2 14 22 20 24 18 30 3 1 8 15 26 ...
result:
ok n=30, 25000 queries
Test #10:
score: 0
Accepted
time: 298ms
memory: 3468kb
input:
50 3 1 4 4 2 3 1 0 1 2 1 3 4 4 1 2 3 2 4 0 0 3 3 4 1 0 1 2 1 0 0 2 4 4 2 5 3 2 2 0 4 2 2 3 1 1 3 1 0 2 2 1 3 7 1 3 1 0 4 3 3 1 2 1 2 2 2 5 3 1 1 0 1 3 1 1 2 1 3 2 2 3 1 2 3 2 4 1 5 4 2 2 4 7 2 1 1 2 1 0 2 2 2 2 0 4 1 2 1 3 1 2 0 2 3 2 2 1 1 2 3 2 0 2 2 4 3 2 0 3 2 1 1 3 2 2 4 3 1 4 1 1 1 4 3 2 1 1 0...
output:
? 36 18 9 2 38 34 8 7 5 29 37 44 1 32 16 21 11 3 20 19 49 48 47 45 13 6 10 15 27 22 28 30 31 23 40 41 46 33 4 14 43 25 42 24 35 39 17 50 26 12 ? 24 30 47 37 22 27 21 35 32 28 41 38 7 1 10 48 2 9 5 14 12 13 25 20 40 19 4 42 11 29 6 16 44 39 49 15 26 3 36 50 45 31 17 34 46 23 8 33 18 43 ? 16 13 3 20 2...
result:
ok n=50, 25000 queries
Test #11:
score: 0
Accepted
time: 553ms
memory: 3692kb
input:
123 2 5 2 2 2 1 2 6 1 3 3 4 3 1 1 1 2 2 4 1 3 3 2 4 4 4 2 0 2 3 2 0 2 4 1 2 0 3 3 5 1 2 2 7 3 1 2 2 2 2 1 3 2 2 2 1 2 1 2 3 2 0 3 1 3 1 2 2 4 2 4 2 1 1 2 1 1 1 3 2 1 1 3 2 1 3 5 0 1 3 2 0 2 1 1 5 4 1 1 2 1 1 1 5 3 1 4 2 2 2 1 3 3 0 1 1 5 3 3 3 1 3 1 3 1 3 4 0 1 3 3 3 4 3 1 3 3 1 5 2 1 1 1 2 1 5 1 3 ...
output:
? 51 85 43 59 86 89 105 8 67 2 38 91 70 17 96 23 56 121 81 123 115 12 113 111 57 18 16 7 36 14 78 39 92 5 61 108 54 15 95 1 71 10 80 65 31 26 100 68 44 120 122 110 55 66 106 49 32 64 112 90 11 77 34 109 72 101 58 9 37 88 118 82 46 99 75 53 35 19 47 50 69 119 42 25 40 117 102 48 45 6 104 83 93 114 73...
result:
ok n=123, 25000 queries
Test #12:
score: 0
Accepted
time: 810ms
memory: 3660kb
input:
185 2 2 1 4 0 3 3 0 2 5 1 1 2 0 1 0 4 6 1 3 3 1 2 3 0 2 3 5 1 4 1 1 1 3 4 4 1 1 3 6 2 2 3 2 1 1 4 3 1 2 4 2 2 2 2 5 2 5 4 0 5 0 1 1 1 1 3 1 1 2 3 1 1 1 1 0 2 2 2 4 2 2 5 3 2 0 1 1 2 4 4 2 1 3 3 2 2 1 0 2 3 3 0 0 0 1 2 2 2 4 4 1 6 0 1 2 1 5 5 5 2 3 1 2 2 0 1 3 1 1 0 3 0 0 4 0 0 2 5 6 3 3 1 1 0 3 4 1 ...
output:
? 154 95 127 62 58 4 23 136 161 39 128 73 107 74 30 166 76 13 3 84 93 183 122 68 106 140 86 171 44 146 67 28 75 114 46 164 22 175 55 85 57 117 88 91 52 108 172 97 79 21 157 35 113 17 19 37 153 155 82 100 112 105 89 69 33 64 149 24 147 124 11 42 115 109 78 26 142 169 98 144 145 48 177 12 121 111 32 8...
result:
ok n=185, 25000 queries
Test #13:
score: 0
Accepted
time: 1050ms
memory: 3688kb
input:
277 2 1 3 0 2 3 1 1 1 2 1 2 1 2 2 2 1 5 1 3 2 1 3 0 6 3 2 6 1 3 1 2 2 1 1 1 3 1 7 0 2 1 0 0 4 1 1 3 0 2 3 0 4 0 4 1 1 1 1 5 1 2 2 1 1 1 1 0 3 0 3 3 0 0 1 3 4 1 2 4 2 0 2 3 2 1 2 5 5 4 3 1 1 1 0 3 2 0 1 0 2 0 2 3 4 2 1 0 1 2 2 2 2 2 1 1 3 1 1 3 2 1 1 1 0 2 2 1 1 3 2 2 1 3 1 4 1 5 1 6 5 1 2 6 1 0 1 5 ...
output:
? 69 275 55 194 38 172 11 233 146 175 213 103 255 128 208 131 258 24 203 18 14 42 136 66 159 181 186 254 132 239 247 15 251 96 50 46 244 195 92 264 22 75 67 216 192 53 221 87 229 222 111 64 180 94 227 144 91 252 104 234 260 177 250 265 122 109 160 35 232 43 113 71 23 89 139 121 60 49 168 140 274 27 ...
result:
ok n=277, 25000 queries
Test #14:
score: 0
Accepted
time: 1012ms
memory: 3816kb
input:
300 2 1 2 0 3 2 5 1 4 3 1 4 0 3 3 1 2 3 1 1 0 0 3 0 0 1 1 2 3 4 1 3 1 0 1 2 4 1 4 2 1 1 0 2 2 0 0 2 4 2 1 1 1 2 4 3 1 3 4 1 1 2 6 2 2 2 3 1 3 5 2 2 1 2 0 5 0 2 2 0 5 2 1 4 1 3 3 2 2 2 3 2 1 1 2 3 2 2 1 1 1 2 2 0 1 1 0 2 4 1 4 1 2 2 3 3 2 2 5 1 1 1 3 3 1 1 1 2 2 2 3 4 5 1 1 2 2 3 3 2 3 3 3 1 0 1 0 1 ...
output:
? 46 45 120 80 180 16 3 205 17 276 36 23 160 247 215 44 58 102 76 300 22 30 143 292 97 201 275 131 190 195 157 217 298 27 186 194 210 113 229 70 4 126 238 264 146 242 78 99 47 174 296 187 135 176 121 282 246 147 79 60 105 149 288 266 258 222 85 278 39 114 77 156 128 161 145 13 270 244 216 291 62 83 ...
result:
ok n=300, 25000 queries
Test #15:
score: 0
Accepted
time: 1077ms
memory: 3740kb
input:
347 1 0 1 1 2 0 4 2 1 1 1 5 1 4 5 4 0 3 3 2 1 1 1 3 1 2 3 2 2 1 3 5 1 3 2 2 0 1 3 1 1 2 2 1 1 2 1 2 0 2 1 1 3 1 0 2 1 0 3 1 2 4 1 2 1 1 1 2 1 4 4 0 1 1 1 1 4 0 4 5 1 1 4 2 4 4 2 4 3 2 1 2 0 2 1 6 1 1 2 1 2 1 2 2 2 3 5 2 2 2 2 4 6 1 2 2 3 4 5 3 4 4 3 3 0 4 1 1 2 0 5 2 3 0 1 1 4 4 6 1 3 3 0 2 0 2 1 0 ...
output:
? 60 233 283 311 115 202 9 164 213 192 92 191 327 196 12 22 154 117 14 197 332 122 75 208 126 216 250 62 44 312 147 135 69 26 324 73 101 289 93 195 309 51 290 172 83 187 161 38 15 4 10 65 78 155 206 227 168 276 48 19 335 41 253 120 252 25 245 329 292 263 297 295 340 251 137 188 143 230 272 106 2 288...
result:
ok n=347, 25000 queries
Test #16:
score: 0
Accepted
time: 1023ms
memory: 3780kb
input:
366 3 2 3 2 0 3 5 6 3 4 2 1 4 2 2 1 1 1 5 2 3 1 0 0 4 4 2 3 2 1 4 3 1 2 2 2 1 2 5 1 4 2 3 3 2 6 2 0 1 1 1 1 3 1 1 1 1 4 1 3 1 0 1 2 4 1 0 4 3 3 0 2 3 1 1 3 2 2 0 1 1 2 0 2 2 0 0 4 2 0 1 4 3 3 6 0 1 2 4 1 4 3 1 2 4 2 4 0 1 2 3 2 0 2 3 3 1 1 4 3 1 2 2 2 4 1 4 4 2 3 5 3 0 2 0 1 3 3 2 4 2 1 1 2 3 2 1 1 ...
output:
? 287 190 271 27 323 243 348 64 144 107 309 113 340 131 125 72 312 69 240 316 164 45 92 87 21 23 229 98 216 4 227 177 283 55 296 139 28 285 289 65 303 163 278 186 51 137 147 274 155 286 345 188 203 254 187 166 124 233 58 294 93 140 324 123 71 295 343 89 276 103 280 116 96 261 181 33 114 292 91 282 3...
result:
ok n=366, 25000 queries
Test #17:
score: 0
Accepted
time: 1348ms
memory: 3708kb
input:
398 2 3 4 1 3 2 0 5 2 1 4 1 1 1 3 1 3 0 0 5 3 4 2 2 1 2 1 4 2 3 3 1 0 2 6 0 3 2 0 4 1 2 1 2 3 2 3 0 0 3 0 4 1 5 2 2 5 1 1 1 3 2 3 1 3 3 1 0 0 1 4 1 2 4 1 1 1 3 1 4 2 1 0 2 4 2 0 4 0 1 0 4 1 1 1 2 1 3 1 1 2 6 4 1 2 1 4 3 2 0 0 1 2 3 2 5 0 2 0 2 1 6 1 0 3 2 6 1 1 1 2 0 2 4 1 3 0 5 3 1 4 4 0 2 1 0 3 2 ...
output:
? 176 102 371 395 70 81 375 314 214 1 4 302 11 294 325 363 202 152 295 183 148 134 82 48 47 188 288 33 274 234 347 279 351 269 317 361 146 275 145 358 254 230 172 52 258 237 318 206 280 396 122 227 300 28 103 285 247 370 161 243 205 143 166 217 308 338 277 12 84 304 87 43 18 96 341 123 7 128 74 366 ...
result:
ok n=398, 25000 queries
Test #18:
score: 0
Accepted
time: 1309ms
memory: 3724kb
input:
399 2 2 3 1 2 4 3 3 0 3 4 1 0 2 1 1 3 0 1 3 5 0 1 3 2 4 2 2 0 1 1 3 7 1 1 2 2 4 1 3 1 4 3 1 0 2 0 3 2 2 3 1 1 3 1 0 1 0 1 2 2 1 4 1 1 0 1 2 1 3 0 3 3 1 2 2 1 3 1 1 2 2 3 1 3 4 3 3 0 0 4 3 2 4 4 3 1 2 3 1 1 1 2 0 2 3 1 5 5 4 1 2 2 2 1 0 0 0 3 0 2 2 0 0 1 1 0 1 2 3 4 2 2 5 1 4 3 3 3 1 4 2 3 1 1 1 2 2 ...
output:
? 192 397 68 260 307 256 356 91 273 387 45 102 22 138 357 3 221 240 43 376 42 318 337 276 386 98 323 383 54 161 269 26 279 20 119 191 147 280 382 360 127 63 292 261 213 230 350 225 295 322 266 171 11 37 27 75 151 35 283 371 247 343 210 178 324 329 48 38 6 39 131 85 170 79 291 392 368 234 9 105 1 396...
result:
ok n=399, 25000 queries
Test #19:
score: 0
Accepted
time: 1180ms
memory: 3740kb
input:
400 2 1 0 2 0 3 0 0 3 1 1 4 0 1 3 1 4 3 1 0 2 0 3 0 3 1 4 2 2 3 5 1 4 3 1 1 0 3 2 1 3 2 3 1 1 1 3 4 3 4 2 2 3 4 1 5 2 1 2 1 1 1 3 2 1 1 1 0 3 3 3 2 1 2 2 3 4 2 2 2 2 1 0 2 4 3 1 6 2 2 1 2 5 2 6 4 0 2 2 1 1 4 3 3 4 0 2 0 0 3 2 2 2 4 0 3 1 3 2 2 4 3 2 3 2 3 2 1 2 1 1 4 2 5 0 1 6 1 2 0 3 1 2 2 1 1 0 4 ...
output:
? 299 87 396 114 244 330 284 159 266 142 58 400 194 71 89 132 242 237 387 218 354 23 83 272 171 148 164 32 136 286 323 115 43 97 364 108 298 331 317 78 305 101 249 198 183 157 73 163 185 143 265 81 117 327 187 300 88 34 219 18 346 302 233 383 102 17 94 98 135 96 373 264 69 152 210 395 301 212 95 100...
result:
ok n=400, 25000 queries
Test #20:
score: 0
Accepted
time: 3ms
memory: 3568kb
input:
3 1 1 1 1 2
output:
? 1 2 3 ? 3 2 1 ? 3 2 1 ? 3 1 2 ? 1 3 2 ! 1 3 2
result:
ok n=3, 5 queries
Test #21:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
4 1 2 1 1 2 1 0 1 1 0 1 1 2 2 3
output:
? 1 4 3 2 ? 3 2 4 1 ? 1 4 3 2 ? 3 4 1 2 ? 4 2 3 1 ? 4 3 1 2 ? 1 2 3 4 ? 2 3 4 1 ? 4 3 1 2 ? 1 2 3 4 ? 4 3 1 2 ? 2 1 3 4 ? 3 2 4 1 ? 2 4 3 1 ? 2 4 1 3 ! 2 4 1 3
result:
ok n=4, 15 queries
Test #22:
score: 0
Accepted
time: 6ms
memory: 3608kb
input:
5 3 1 2 3 2 2 1 3 2 2 3 3 2 3 1 1 0 3 2 1 0 0 2 3 1 1 2 2 0 2 2 3 3 2 0 1 1 4
output:
? 3 4 5 1 2 ? 4 1 3 5 2 ? 4 2 1 3 5 ? 5 2 1 3 4 ? 3 4 1 2 5 ? 2 1 4 3 5 ? 1 4 3 2 5 ? 3 4 5 1 2 ? 1 3 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7 13 19 11 5 10 8 12 18 9 4 20 16 6 17 ? 9 10 6 8 3 5 11 18 1 2 19 20 14 1...
result:
ok n=20, 25000 queries
Test #26:
score: 0
Accepted
time: 253ms
memory: 3704kb
input:
30 1 2 2 1 2 6 5 2 3 4 1 0 3 2 3 0 5 2 1 3 4 1 0 3 1 2 2 3 4 4 1 4 2 2 1 0 4 1 0 4 0 3 3 1 2 0 2 2 0 2 1 5 4 1 0 4 2 0 3 2 0 2 3 0 1 3 0 2 1 1 4 2 0 1 1 3 5 0 2 1 1 0 3 5 2 0 1 3 4 1 1 3 4 1 0 3 1 2 1 2 2 1 4 1 2 2 1 1 1 2 1 1 2 0 2 1 2 0 1 1 2 2 5 3 0 5 0 0 4 2 1 2 4 1 3 3 2 1 1 1 3 1 1 0 0 3 1 1 3...
output:
? 4 16 3 28 12 30 13 6 21 23 11 10 25 19 9 27 17 8 1 15 29 14 22 24 5 2 18 20 7 26 ? 3 10 28 6 26 27 4 21 19 1 30 16 22 15 24 18 12 11 13 14 5 17 20 8 7 25 9 2 23 29 ? 8 16 27 1 24 7 30 23 15 25 20 11 14 10 2 3 29 5 17 9 6 13 12 4 18 21 19 22 26 28 ? 25 21 6 13 2 16 3 30 8 29 9 17 18 15 1 12 24 28 4...
result:
ok n=30, 25000 queries
Test #27:
score: 0
Accepted
time: 389ms
memory: 3568kb
input:
50 2 3 1 1 2 0 3 4 4 1 1 3 5 2 0 1 3 0 0 3 1 0 3 4 4 1 0 0 1 2 0 2 2 4 4 1 2 2 3 1 2 2 5 0 2 0 2 4 3 2 1 0 3 3 3 0 5 1 1 1 3 1 3 2 0 4 2 4 1 3 1 3 1 0 2 3 2 3 4 1 1 2 3 2 0 0 3 0 1 2 0 3 2 2 2 1 3 0 1 0 5 0 3 1 4 1 2 3 2 3 1 2 2 1 2 3 0 1 1 5 4 0 0 1 0 0 0 2 3 0 2 2 3 2 1 4 1 3 2 3 3 0 5 2 1 1 3 5 2...
output:
? 46 40 45 9 2 35 22 5 28 41 7 36 15 13 8 4 12 49 17 24 21 50 23 32 11 16 42 29 34 10 30 1 26 33 48 44 25 27 38 18 20 37 19 47 14 3 31 39 43 6 ? 20 25 38 50 27 12 49 36 32 23 15 40 47 17 1 4 30 31 42 14 6 7 33 16 3 2 28 22 45 19 46 18 5 21 29 48 44 11 34 9 43 8 37 35 13 41 24 39 26 10 ? 20 42 18 4 4...
result:
ok n=50, 25000 queries
Test #28:
score: 0
Accepted
time: 558ms
memory: 3644kb
input:
123 2 2 1 1 2 1 2 1 1 1 0 3 2 1 4 2 4 5 2 1 2 0 0 0 3 1 4 2 1 3 0 2 4 2 1 4 1 2 2 2 1 0 1 0 0 0 0 3 4 2 0 3 0 2 3 2 1 1 2 3 4 5 1 0 4 1 4 0 2 1 2 4 4 2 2 1 2 0 1 2 2 2 2 3 2 5 2 2 3 0 0 0 4 3 2 5 5 1 1 1 4 3 7 1 2 2 2 3 1 3 0 2 2 2 1 1 3 3 2 0 1 3 5 2 0 2 3 1 0 5 2 3 2 2 0 2 1 3 1 3 3 2 0 3 4 1 1 0 ...
output:
? 42 91 108 56 118 123 10 15 3 101 86 60 22 27 48 87 82 76 97 93 63 62 121 13 29 19 99 102 106 45 98 1 12 109 30 7 55 38 114 69 68 74 33 117 120 110 35 14 50 116 21 24 100 8 119 83 16 77 65 103 107 80 78 6 95 9 112 4 17 5 57 40 53 47 113 81 46 20 71 37 75 96 72 23 79 70 73 94 64 58 89 90 51 66 36 52...
result:
ok n=123, 25000 queries
Test #29:
score: 0
Accepted
time: 857ms
memory: 3648kb
input:
185 3 1 1 1 0 2 3 2 5 4 4 2 1 2 2 0 1 2 1 0 0 3 0 4 1 0 2 3 1 0 4 4 3 3 1 0 1 1 2 0 2 3 2 3 1 1 0 3 0 4 3 2 0 0 2 1 1 2 2 0 4 1 2 2 0 0 3 3 1 2 1 0 1 3 3 1 1 1 4 1 1 2 2 3 2 2 4 0 2 3 1 2 1 3 0 3 0 3 1 3 1 5 1 0 0 0 1 0 0 4 0 4 3 3 2 1 3 2 3 2 4 1 5 0 3 2 1 1 6 1 4 1 2 1 0 3 3 1 3 1 2 2 4 4 2 2 1 2 ...
output:
? 111 67 29 123 166 174 165 113 12 21 81 110 96 35 7 101 58 118 134 3 30 98 130 152 175 44 43 146 94 151 13 112 153 163 48 73 15 70 82 56 31 158 161 62 148 60 10 115 106 52 157 47 183 102 119 124 41 19 32 2 25 88 63 24 139 51 91 18 160 89 172 22 138 104 167 84 6 54 36 129 8 114 126 127 179 61 55 135...
result:
ok n=185, 25000 queries
Test #30:
score: 0
Accepted
time: 1034ms
memory: 3628kb
input:
277 2 2 3 3 0 2 4 1 0 0 3 2 0 3 0 4 3 3 1 1 1 2 4 0 2 1 1 2 0 3 6 2 1 5 1 2 1 0 2 1 2 1 1 2 0 0 3 1 2 3 1 1 0 3 2 1 6 1 3 0 0 2 3 1 4 3 4 2 3 3 3 1 3 4 1 4 2 3 2 4 1 2 2 4 1 3 2 3 1 3 4 2 3 1 2 2 1 1 2 2 1 2 2 2 1 3 1 3 1 5 1 4 1 0 0 2 3 1 1 3 3 4 4 2 1 2 2 1 3 2 4 3 1 1 2 2 2 3 2 0 1 1 7 3 1 2 1 0 ...
output:
? 268 230 10 128 49 72 236 134 94 104 224 91 272 165 86 139 14 219 87 149 50 184 172 151 192 150 215 127 214 83 180 204 5 51 53 145 77 202 43 115 65 64 152 1 69 183 148 133 97 221 191 155 193 251 237 122 124 247 114 250 170 116 169 80 157 82 59 254 111 112 223 239 48 100 136 234 57 233 89 196 71 37 ...
result:
ok n=277, 25000 queries
Test #31:
score: 0
Accepted
time: 1008ms
memory: 3752kb
input:
300 3 2 2 4 1 1 1 4 0 4 6 2 1 1 2 0 2 0 3 2 4 2 4 2 0 1 4 3 5 5 0 1 6 2 3 2 1 0 1 2 1 1 1 0 0 3 0 2 3 2 1 3 0 2 3 2 1 4 0 2 2 1 3 3 2 1 1 1 0 3 2 3 1 4 4 4 1 2 2 0 1 3 7 2 1 2 1 3 1 3 2 2 2 4 1 0 2 1 3 3 0 2 4 4 1 2 3 0 1 1 0 1 3 6 3 1 0 5 3 0 6 1 2 2 5 1 1 5 2 3 1 1 2 3 1 1 0 0 4 4 0 1 4 2 1 2 4 1 ...
output:
? 268 58 245 202 248 74 80 267 230 291 84 146 145 293 266 93 288 250 82 173 282 103 163 56 55 50 212 31 61 52 2 130 79 16 262 194 182 206 139 237 269 187 275 86 238 54 57 140 247 73 24 265 196 157 216 143 278 176 102 135 231 38 166 98 128 186 154 28 142 71 12 10 155 242 141 162 241 90 132 232 236 95...
result:
ok n=300, 25000 queries
Test #32:
score: 0
Accepted
time: 1270ms
memory: 3724kb
input:
347 0 1 3 1 3 1 3 0 2 1 1 2 1 2 3 2 2 0 2 1 4 0 0 2 5 1 2 4 1 1 1 3 3 3 1 2 5 5 4 4 2 4 2 1 3 1 3 2 1 3 5 3 3 4 1 3 2 0 1 1 2 4 3 3 1 0 2 3 4 0 1 3 2 0 0 4 1 5 0 0 3 1 1 3 1 1 1 1 2 2 1 2 1 1 3 3 1 1 4 2 3 3 2 1 3 1 1 2 1 3 1 3 2 3 2 2 4 2 0 2 2 2 1 2 1 1 5 3 1 2 0 3 3 0 3 1 2 1 0 0 0 2 2 1 0 1 1 4 ...
output:
? 15 31 29 112 303 176 119 24 105 226 328 95 10 110 72 168 104 337 203 216 188 187 254 28 229 84 304 231 228 281 276 32 329 296 327 49 69 178 273 1 122 164 310 103 253 173 9 34 60 180 272 25 338 113 255 261 65 17 277 89 297 179 99 275 138 300 312 291 161 50 263 128 257 293 194 313 251 116 159 91 56 ...
result:
ok n=347, 25000 queries
Test #33:
score: 0
Accepted
time: 1229ms
memory: 3796kb
input:
366 2 4 2 2 4 3 2 1 3 0 3 1 2 3 6 2 2 2 4 3 0 1 6 2 0 1 3 1 1 2 2 2 1 2 0 4 2 2 2 1 2 1 1 3 0 2 1 0 4 0 1 1 5 1 0 2 1 0 0 1 1 2 3 3 1 3 3 2 1 3 2 6 2 2 2 1 1 1 0 1 1 2 2 3 0 3 3 4 2 4 1 2 2 0 3 0 1 3 2 0 2 1 0 2 2 2 2 1 3 0 2 2 2 1 2 6 1 2 1 1 1 2 2 0 2 5 1 1 2 1 0 2 1 2 0 2 5 1 1 0 0 0 3 1 2 3 4 4 ...
output:
? 95 299 122 366 215 132 146 152 88 278 87 300 29 226 93 5 331 233 191 271 177 361 232 192 16 39 204 298 286 79 216 76 339 182 127 340 22 72 221 325 58 290 244 283 3 60 261 281 327 203 305 151 153 140 136 112 355 44 13 223 238 245 157 100 284 239 275 15 184 14 349 328 196 118 364 274 107 108 30 302 ...
result:
ok n=366, 25000 queries
Test #34:
score: 0
Accepted
time: 1242ms
memory: 3808kb
input:
398 3 3 3 2 2 3 1 4 1 2 1 1 0 2 2 2 1 3 0 2 1 2 1 2 1 2 1 3 5 1 4 2 0 3 2 2 0 3 1 0 1 1 5 1 3 6 0 2 1 2 3 1 1 1 2 1 2 3 0 3 1 3 1 4 3 1 4 4 6 3 2 1 2 4 1 7 2 3 1 2 1 2 0 4 5 0 3 1 2 3 1 3 4 2 2 4 4 0 0 2 3 4 4 0 4 1 1 0 2 1 1 4 2 2 2 1 1 0 5 2 3 4 5 3 1 2 2 1 1 2 5 3 3 2 1 2 1 2 0 2 1 1 5 0 1 3 2 2 ...
output:
? 307 166 297 180 80 295 216 392 394 385 58 188 119 184 264 158 381 41 127 236 46 27 23 193 12 144 254 36 1 40 163 91 267 327 54 159 249 148 284 4 104 187 232 57 44 291 136 335 272 49 372 212 198 63 138 324 344 368 146 290 310 35 140 319 186 133 348 279 85 101 99 247 215 90 235 47 84 296 154 382 373...
result:
ok n=398, 25000 queries
Test #35:
score: 0
Accepted
time: 1176ms
memory: 3740kb
input:
399 1 3 3 3 4 3 4 5 2 2 2 0 8 2 2 1 0 1 5 1 3 3 2 3 1 4 1 2 2 3 3 2 3 0 2 3 0 3 3 1 1 0 5 4 0 1 3 0 5 3 0 4 1 1 2 2 3 1 0 1 3 2 0 1 1 3 3 4 3 5 1 1 2 1 1 3 3 2 1 3 2 0 0 0 1 0 1 1 1 1 1 4 1 1 0 2 1 0 1 2 2 1 0 3 2 0 5 5 2 3 4 6 3 2 2 3 2 4 3 0 1 2 1 1 1 2 1 1 3 1 3 1 0 0 3 1 1 4 2 3 0 0 0 2 3 3 1 1 ...
output:
? 362 297 300 216 200 327 110 16 83 371 397 13 81 291 373 179 167 288 117 181 229 130 269 113 41 127 135 263 367 72 155 82 180 315 252 9 102 310 108 284 396 94 257 138 223 293 40 382 107 262 370 195 178 376 348 157 245 351 123 69 264 192 189 220 143 165 1 388 12 357 236 336 197 349 11 326 37 5 254 1...
result:
ok n=399, 25000 queries
Test #36:
score: 0
Accepted
time: 1292ms
memory: 3852kb
input:
400 2 0 1 2 3 1 4 0 1 3 3 2 3 1 2 4 1 1 1 2 1 3 2 3 1 1 3 2 5 2 3 4 4 1 0 3 0 1 2 3 5 1 4 1 2 4 0 2 2 1 0 2 2 2 3 0 4 3 1 3 3 1 2 3 3 2 1 0 3 2 3 2 2 4 1 1 1 1 3 2 0 4 0 2 3 2 1 1 4 1 1 6 1 2 3 3 4 3 5 1 2 2 1 3 2 0 2 1 2 2 0 2 5 1 1 3 5 2 0 2 1 4 3 3 3 2 1 1 3 0 0 1 2 1 5 4 4 3 3 2 3 4 2 1 3 0 1 1 ...
output:
? 339 87 307 178 311 97 279 265 226 201 256 181 375 297 199 210 183 82 77 136 247 196 122 216 73 294 363 25 264 89 313 179 141 81 46 389 3 400 249 168 80 321 266 396 103 191 298 117 186 194 120 188 101 180 14 356 353 348 78 367 187 244 125 4 142 262 392 218 165 241 291 219 71 237 43 350 336 50 398 1...
result:
ok n=400, 25000 queries
Test #37:
score: 0
Accepted
time: 2ms
memory: 3600kb
input:
3 2
output:
? 3 2 1 ! 3 2 1
result:
ok n=3, 1 queries
Test #38:
score: 0
Accepted
time: 4ms
memory: 3516kb
input:
4 1 2 1 2 2 1 0 2 2 2 0 1 2 0 3
output:
? 2 1 3 4 ? 1 4 2 3 ? 3 4 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0 1 1 3 2 2 2 2 2 1 0 3 1 0 0 2 5 1 5 1 0 0 2 0 4 2 0 2 2 2 3 3 3 4 1 1 0 1 3 1 2 1 3 2 1 1 3 2 0 2 1 2 2 0 3 1 2 3 2 3 1 1 4 3 4 1 0 0 1 4 1 0 2 3 2 1 2 3 3 2 2...
output:
? 2 16 19 20 4 1 11 14 15 12 8 9 13 7 5 10 3 6 17 18 ? 20 13 17 8 3 12 1 10 18 4 11 16 7 2 19 15 9 14 5 6 ? 10 20 11 7 4 19 15 2 12 14 16 6 5 3 17 1 13 9 8 18 ? 9 19 8 18 16 1 14 3 5 4 17 12 13 20 11 10 6 7 2 15 ? 10 16 9 6 1 3 14 20 18 13 12 8 17 5 2 11 19 4 7 15 ? 4 18 2 13 3 17 14 5 16 19 7 6 8 1...
result:
ok n=20, 25000 queries
Test #43:
score: 0
Accepted
time: 289ms
memory: 3584kb
input:
30 4 1 0 2 3 3 5 4 2 2 2 1 0 3 2 3 1 0 2 1 3 0 2 0 1 6 3 0 1 4 2 3 4 2 3 1 2 1 2 1 2 3 4 2 2 4 3 3 3 3 1 3 3 1 3 5 3 3 2 2 1 5 3 2 1 3 3 0 1 2 3 2 1 2 3 2 2 2 3 3 5 3 0 2 2 0 2 1 0 1 5 1 2 3 1 1 4 1 4 1 3 2 1 3 4 3 1 4 2 2 0 0 0 5 0 0 2 1 2 2 0 2 2 2 1 1 1 2 2 1 3 2 1 0 3 1 1 3 4 2 5 0 0 2 2 2 3 1 0...
output:
? 27 22 19 28 26 8 17 18 6 23 2 24 21 9 12 30 25 7 29 13 14 10 3 11 1 15 5 20 4 16 ? 15 10 12 23 6 7 24 4 14 18 27 21 20 19 29 16 25 13 22 5 11 8 28 3 9 17 2 1 30 26 ? 8 6 14 19 27 2 5 4 10 20 28 26 12 16 18 25 13 3 24 9 1 29 7 15 17 11 22 21 30 23 ? 28 19 24 26 8 17 7 9 6 2 13 4 23 14 15 12 10 30 1...
result:
ok n=30, 25000 queries
Test #44:
score: 0
Accepted
time: 401ms
memory: 3532kb
input:
50 1 1 1 1 1 1 0 2 1 1 0 2 3 3 0 2 2 1 2 7 2 1 3 2 3 3 3 3 2 4 1 1 5 0 0 3 3 2 3 2 1 2 2 3 4 2 2 4 2 3 1 3 3 2 3 1 1 3 1 3 3 3 0 2 0 2 1 3 1 2 2 1 4 2 1 4 1 2 4 1 1 1 1 5 2 0 3 1 1 3 0 2 2 2 3 3 2 2 5 3 0 5 3 0 1 4 2 3 1 3 5 1 3 3 5 3 0 1 2 1 2 0 2 2 2 1 2 1 2 0 3 0 2 2 1 2 0 1 3 1 2 3 2 2 4 0 2 3 1...
output:
? 47 46 14 31 24 44 26 30 19 15 13 48 23 1 20 4 35 42 38 39 11 16 34 41 18 37 7 9 10 8 29 49 40 32 25 43 5 45 50 27 22 17 3 28 33 2 6 21 36 12 ? 41 11 6 14 49 18 3 35 46 30 38 8 22 47 44 5 43 34 26 25 16 33 15 7 45 17 21 32 10 9 1 24 50 29 48 36 27 42 2 28 23 31 12 19 37 13 4 39 20 40 ? 47 36 13 5 3...
result:
ok n=50, 25000 queries
Test #45:
score: 0
Accepted
time: 602ms
memory: 3676kb
input:
123 0 2 0 1 3 0 2 3 1 2 3 1 1 3 0 2 2 4 2 2 3 2 2 1 0 0 2 4 1 1 5 4 2 4 0 1 2 2 1 1 1 0 1 2 3 0 3 3 0 1 1 2 2 2 2 1 3 3 1 3 3 2 1 2 2 2 2 3 2 5 0 3 2 3 0 1 0 4 1 1 2 2 2 1 1 4 0 3 2 1 1 5 1 1 2 2 1 4 1 0 1 5 2 2 3 0 2 3 2 2 3 4 5 2 2 1 2 3 1 4 1 3 2 3 2 2 0 1 3 0 0 1 1 6 3 5 0 2 2 0 1 2 1 2 3 3 3 1 ...
output:
? 85 58 94 29 93 98 34 24 19 3 109 107 21 61 96 2 31 111 64 123 72 70 66 38 121 13 119 83 114 33 77 90 65 20 6 99 7 118 43 40 122 18 37 11 73 100 117 1 52 115 10 79 81 71 53 36 80 63 60 16 104 76 9 62 44 42 82 91 14 41 74 23 50 88 48 55 69 46 8 59 89 116 84 108 47 4 102 15 54 17 5 120 78 25 49 103 3...
result:
ok n=123, 25000 queries
Test #46:
score: 0
Accepted
time: 805ms
memory: 3592kb
input:
185 2 1 3 2 4 2 3 4 2 0 1 4 0 1 1 2 2 1 6 0 0 3 5 2 3 0 0 1 0 1 2 1 1 2 3 3 1 2 6 3 5 4 1 1 2 1 4 4 2 4 2 1 2 2 5 2 3 2 1 2 3 2 2 4 1 2 3 0 0 1 2 2 1 5 2 0 3 4 1 3 6 4 2 1 0 1 4 3 1 1 3 2 3 2 0 1 4 1 3 1 2 5 1 5 2 3 1 2 1 0 4 0 1 1 4 1 1 3 2 3 3 1 0 0 3 1 0 2 1 0 2 2 0 1 1 1 2 0 0 2 2 1 1 2 1 4 2 2 ...
output:
? 32 36 145 33 46 111 90 74 40 137 95 125 70 56 178 120 37 35 148 21 88 157 101 154 3 16 38 158 183 165 55 87 117 68 96 73 94 151 118 147 57 98 72 142 80 177 83 168 51 97 76 58 50 127 54 174 25 160 10 161 138 134 13 132 175 86 114 44 2 116 184 121 185 155 63 52 5 22 65 82 14 169 124 24 146 17 144 85...
result:
ok n=185, 25000 queries
Test #47:
score: 0
Accepted
time: 1066ms
memory: 3780kb
input:
277 3 2 4 1 4 1 5 3 5 2 3 3 0 1 2 4 2 4 4 1 1 2 3 1 2 3 3 2 2 2 1 2 0 3 3 2 2 3 0 0 3 3 0 1 0 2 2 2 2 1 3 5 1 1 1 1 0 3 1 2 3 1 4 3 1 1 2 3 0 1 5 3 0 3 0 2 1 2 2 2 1 3 2 0 2 1 1 4 2 3 1 1 3 2 0 4 3 2 0 2 1 2 2 1 2 2 5 2 1 0 3 4 1 5 2 3 3 2 1 1 1 2 4 1 3 0 3 3 5 1 5 3 2 2 3 0 3 4 2 0 1 0 1 4 2 5 4 1 ...
output:
? 13 255 142 47 231 36 153 180 210 97 237 215 23 34 107 45 222 236 67 71 207 220 85 69 43 25 15 49 96 102 75 240 201 129 9 26 122 253 174 134 175 58 50 165 192 185 88 140 200 160 57 17 228 163 149 81 35 147 167 162 196 243 4 256 101 70 72 208 65 150 272 229 189 206 63 59 183 108 274 258 239 260 268 ...
result:
ok n=277, 25000 queries
Test #48:
score: 0
Accepted
time: 1090ms
memory: 3764kb
input:
300 3 3 0 2 3 3 0 2 2 4 1 3 1 3 3 1 2 1 1 0 1 0 1 2 4 2 3 2 2 1 0 0 5 5 1 3 3 1 2 3 0 2 2 2 3 4 3 2 3 2 2 0 3 0 2 2 2 2 2 1 0 3 5 3 2 2 3 3 1 3 3 2 0 4 2 0 4 0 2 0 2 1 1 2 1 1 2 2 2 4 2 1 4 2 2 1 2 2 1 2 1 3 3 2 1 3 2 2 1 1 4 1 2 1 3 2 3 1 4 0 0 0 1 0 4 2 2 1 2 2 1 3 2 3 8 0 1 3 2 0 2 1 2 5 1 2 0 1 ...
output:
? 218 177 110 229 57 77 44 146 153 17 158 90 150 11 299 263 94 103 143 170 74 162 129 295 197 178 63 120 281 163 181 38 86 258 174 36 198 273 141 206 221 113 21 53 160 98 294 236 246 247 51 269 125 144 114 199 274 68 71 161 91 9 185 87 222 251 215 79 8 39 298 40 7 266 117 293 134 31 192 241 56 182 1...
result:
ok n=300, 25000 queries
Test #49:
score: 0
Accepted
time: 1207ms
memory: 3752kb
input:
347 1 1 2 5 0 0 1 1 1 2 4 3 2 0 2 3 1 0 0 4 2 2 2 1 3 0 2 0 5 1 1 1 0 5 5 3 2 3 0 3 1 3 1 1 2 0 0 3 5 2 2 1 1 2 3 0 0 0 1 2 1 1 2 3 2 2 2 2 2 4 2 3 1 6 2 1 0 1 3 2 4 6 1 1 2 2 4 4 5 4 2 3 2 2 3 3 1 2 3 2 5 1 0 2 1 2 3 2 0 2 2 0 2 3 3 0 1 2 2 1 1 3 1 1 1 2 4 1 0 1 1 2 3 3 1 3 2 1 5 9 2 1 1 3 0 4 1 1 ...
output:
? 76 40 306 274 281 177 48 185 209 17 130 62 266 218 116 50 139 33 173 270 152 9 53 248 187 31 246 265 304 89 227 309 222 230 298 198 150 21 14 251 183 65 191 120 74 282 25 245 68 264 109 256 69 170 6 220 233 119 285 342 204 149 334 26 13 303 168 37 207 51 94 83 268 175 293 232 344 193 272 273 134 1...
result:
ok n=347, 25000 queries
Test #50:
score: 0
Accepted
time: 1159ms
memory: 3724kb
input:
366 1 2 1 0 2 0 0 2 5 1 1 3 0 2 1 2 1 1 1 1 2 2 1 2 5 1 1 4 3 4 3 4 1 3 4 2 2 2 2 3 3 1 2 4 3 1 1 5 1 2 3 4 2 1 2 2 4 4 2 3 4 2 2 2 1 3 4 0 1 2 1 0 3 1 1 2 1 3 0 2 5 1 2 1 0 4 2 0 0 0 1 1 2 0 3 2 1 0 1 1 3 2 1 0 2 1 2 2 2 0 0 2 3 2 1 6 2 1 2 2 2 1 2 1 3 2 2 0 2 3 3 2 3 2 2 3 2 3 6 3 2 1 2 2 1 1 1 1 ...
output:
? 72 99 293 355 363 228 332 325 277 286 231 350 281 14 288 78 238 203 80 11 113 292 34 366 126 171 42 24 1 202 107 5 364 67 191 56 92 97 251 201 43 165 61 210 247 271 242 60 21 29 65 59 53 178 346 136 194 81 216 356 47 250 185 246 186 314 336 26 111 226 243 127 262 15 267 134 87 112 70 85 48 218 214...
result:
ok n=366, 25000 queries
Test #51:
score: 0
Accepted
time: 1289ms
memory: 3800kb
input:
398 2 2 1 1 2 1 0 3 2 0 2 0 0 0 7 1 0 3 1 0 2 1 1 2 3 1 2 2 1 0 0 2 1 1 0 2 1 1 1 1 2 3 0 3 1 0 4 3 1 4 4 3 2 1 0 5 1 2 2 6 4 4 3 2 0 2 1 1 6 3 1 1 2 3 2 0 2 2 4 3 3 1 2 2 1 2 3 1 1 0 2 5 5 3 1 4 2 2 0 3 2 1 0 0 0 3 1 2 1 4 1 1 2 0 2 3 2 5 5 3 1 4 5 3 2 2 1 0 2 2 2 0 2 3 2 0 1 2 1 0 0 2 2 2 3 0 1 1 ...
output:
? 80 77 165 256 105 62 144 297 42 389 301 53 351 19 36 238 227 390 153 374 61 229 27 370 78 46 83 99 76 219 171 323 17 321 181 31 182 359 268 38 272 344 92 360 237 63 350 210 330 51 383 306 154 226 290 123 88 121 111 183 114 100 372 265 41 151 220 342 157 12 1 217 142 236 74 68 249 139 263 132 354 1...
result:
ok n=398, 25000 queries
Test #52:
score: 0
Accepted
time: 1136ms
memory: 3736kb
input:
399 1 1 1 1 1 0 4 1 1 3 3 3 0 2 2 2 3 2 1 2 3 0 1 0 1 2 2 1 3 0 1 2 1 3 3 1 0 4 4 1 1 2 0 3 2 0 1 3 1 4 2 1 2 0 2 0 1 2 2 0 4 1 0 3 1 2 2 2 2 2 0 3 3 2 1 2 1 3 2 2 3 2 2 2 1 3 1 3 2 1 1 0 4 1 4 2 0 5 1 0 2 1 0 4 3 2 2 0 1 3 4 6 0 2 1 2 2 1 2 3 2 1 2 2 1 1 1 3 2 3 1 4 3 0 3 1 2 1 1 2 3 1 2 0 2 3 1 1 ...
output:
? 368 267 298 26 195 377 131 52 259 366 110 252 397 372 271 33 272 160 96 161 345 128 309 245 180 288 142 89 305 93 78 355 190 157 72 383 394 107 266 182 6 234 156 111 16 192 112 37 170 126 2 311 92 373 43 219 143 140 365 242 201 70 164 5 233 348 357 316 362 56 344 360 326 312 385 10 251 116 221 378...
result:
ok n=399, 25000 queries
Test #53:
score: 0
Accepted
time: 1260ms
memory: 3788kb
input:
400 1 1 3 2 0 3 1 0 3 2 3 4 4 1 3 2 0 4 0 0 0 3 2 2 3 3 3 4 1 1 5 1 4 2 1 4 2 1 1 6 1 3 4 2 2 2 1 2 2 3 2 0 1 3 2 2 2 3 5 2 4 0 2 0 2 2 1 2 1 2 1 0 3 1 1 2 3 0 1 2 2 2 0 1 0 3 2 5 1 0 5 4 2 2 0 2 2 2 5 5 1 3 2 0 5 3 2 2 2 2 1 1 3 0 1 0 3 3 1 1 4 1 3 3 4 0 0 3 4 3 3 5 1 1 2 1 4 2 0 2 4 1 3 4 4 2 1 2 ...
output:
? 103 307 320 211 42 310 73 178 207 399 132 143 168 33 213 208 173 185 336 216 351 140 55 312 389 386 58 179 14 183 196 238 169 217 85 31 163 32 114 248 83 381 334 5 142 66 89 176 346 317 184 374 122 25 198 20 278 306 269 2 197 393 384 70 379 109 246 116 12 166 71 75 110 368 19 28 43 333 115 268 273...
result:
ok n=400, 25000 queries
Test #54:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
3 1 2
output:
? 2 3 1 ? 3 1 2 ! 3 1 2
result:
ok n=3, 2 queries
Test #55:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
4 2 2 2 1 1 1 1 2 2 2 0 1 1 1 2 1 1 2 3
output:
? 1 4 2 3 ? 2 3 1 4 ? 4 1 3 2 ? 4 3 1 2 ? 2 1 3 4 ? 3 4 1 2 ? 3 4 2 1 ? 1 4 2 3 ? 1 4 2 3 ? 1 3 2 4 ? 4 3 2 1 ? 1 4 3 2 ? 2 1 3 4 ? 3 4 1 2 ? 4 2 1 3 ? 1 2 4 3 ? 2 3 4 1 ? 3 1 2 4 ? 3 1 4 2 ! 3 1 4 2
result:
ok n=4, 19 queries
Test #56:
score: 0
Accepted
time: 8ms
memory: 3516kb
input:
5 1 1 1 1 1 0 1 1 2 2 1 2 2 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 2 1 3 3 2 1 1 2 0 1 1 2 1 0 1 0 2 1 1 3 2 1 1 2 1 1 2 1 0 2 2 2 1 0 2 3 2 1 1 1 0 1 0 0 0 2 2 2 2 1 2 1 2 1 1 3 1 2 1 3 1 1 2 3 1 1 4
output:
? 4 2 1 5 3 ? 3 2 1 4 5 ? 2 4 5 1 3 ? 3 2 1 4 5 ? 2 4 5 1 3 ? 5 4 3 2 1 ? 4 3 2 5 1 ? 3 4 2 5 1 ? 3 5 4 1 2 ? 3 4 1 5 2 ? 5 1 3 2 4 ? 1 4 5 3 2 ? 5 3 2 1 4 ? 5 2 3 4 1 ? 1 4 3 2 5 ? 4 1 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6 2 3 5 1 7 ? 5 7 4 6 2 1 3 ? 6 4 1 7 2 5 3 ? 2 3 4 7 5 1 6 ? 1 3 5 6 4 2 7 ? 2 1 4 5 7 6 3 ? 7 4 1 6 5 3 2 ? 2 7 6 3 4 1 5 ? 3 4 6 5 1 7 2 ? 5 1 4 7 6 2 3 ? 7 4 5 3 6 1 2 ? 4 3 2 7 5 ...
result:
ok n=7, 3547 queries
Test #64:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
3 2
output:
? 2 1 3 ! 2 1 3
result:
ok n=3, 1 queries
Test #65:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
4 2 1 2 2 3
output:
? 1 3 2 4 ? 3 4 1 2 ? 1 3 4 2 ? 1 3 4 2 ? 3 1 4 2 ! 3 1 4 2
result:
ok n=4, 5 queries
Test #66:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
5 0 3 2 0 2 3 1 1 4
output:
? 5 3 1 2 4 ? 3 4 2 5 1 ? 2 4 3 1 5 ? 3 5 4 2 1 ? 3 5 2 4 1 ? 4 3 2 5 1 ? 5 3 2 4 1 ? 1 5 4 2 3 ? 2 5 1 4 3 ! 2 5 1 4 3
result:
ok n=5, 9 queries
Test #67:
score: 0
Accepted
time: 2ms
memory: 3580kb
input:
6 1 3 0 3 0 1 2 2 2 2 3 2 1 0 3 2 2 1 1 1 3 1 2 3 0 1 2 2 1 1 1 2 3 2 2 2 1 3 2 2 3 2 2 2 1 2 0 0 2 0 1 1 2 1 1 2 2 0 1 1 2 1 3 2 3 1 1 3 3 1 3 1 1 2 1 2 2 1 1 2 1 0 3 1 1 1 1 1 3 1 2 2 2 2 2 2 3 2 3 2 2 1 1 1 1 2 2 3 1 2 0 1 2 2 2 0 2 1 3 2 0 2 1 3 2 1 0 2 1 0 2 2 3 1 1 4 0 0 2 3 2 2 3 1 2 0 0 4 1 ...
output:
? 6 4 3 2 5 1 ? 6 1 3 2 4 5 ? 1 2 5 4 3 6 ? 4 2 3 6 5 1 ? 6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2 3 5 2 0 0 2 6 5 1 6 0 1 4 0 0 0 7 2 3 4 3 3 3 3 1 0 2 1 1 2 0 1 2 3 0 3 0 2 2 1 1 2 3 5 3 4 4 2 3 1 2 2 1 1 3 1 1 1 0 3 4 1 4 2 2 2 0 1 2 3 2 1 0 4 2 0 1 2 4 4 3 0 2 3 5 1 2 2 5 2 1 1 0 1 4 5 2 2 2 0 1 3 4 3 4 2 3 4 3 6 2 2 1 4 2 1 4 2 2 3 2 0 6 4 2 2 0 2 1 6 3 ...
output:
? 299 34 355 199 59 219 391 114 325 6 128 381 89 119 110 266 125 163 294 286 71 302 275 356 178 76 130 42 16 7 91 347 131 376 338 223 43 204 166 287 3 77 334 340 14 278 171 112 265 362 174 268 198 393 386 396 230 254 272 78 176 368 33 80 49 354 35 370 183 277 322 191 333 318 309 87 111 248 351 100 2...
result:
ok n=400, 25000 queries
Test #70:
score: 0
Accepted
time: 1064ms
memory: 3736kb
input:
400 3 2 2 3 0 0 2 2 3 3 2 3 1 2 2 2 0 3 5 2 2 1 2 1 4 1 1 1 2 1 4 0 5 2 1 2 3 1 2 4 1 1 3 3 5 3 3 6 1 1 4 0 1 2 1 0 4 2 5 3 3 3 1 1 2 5 1 3 2 3 1 1 2 1 2 2 1 2 3 4 2 2 2 3 2 3 5 1 4 0 2 2 1 1 1 3 3 1 5 3 2 1 1 3 1 2 0 3 4 2 2 5 2 4 3 1 2 5 2 4 0 1 1 0 2 1 1 0 1 2 1 0 6 3 2 1 5 0 2 3 2 2 3 2 0 1 1 3 ...
output:
? 396 372 197 183 317 299 139 29 221 263 209 235 370 87 155 159 246 174 293 102 205 25 360 296 110 350 284 1 214 393 258 307 218 363 26 318 302 91 143 366 273 3 206 42 308 188 276 32 304 239 62 95 55 66 88 272 346 150 356 248 111 245 274 137 260 303 400 244 147 127 333 253 54 354 319 135 371 177 53 ...
result:
ok n=400, 25000 queries
Test #71:
score: 0
Accepted
time: 1209ms
memory: 3756kb
input:
400 5 3 0 4 1 3 4 1 0 2 3 0 1 1 3 1 2 5 3 0 2 1 2 3 5 1 6 2 1 2 3 1 1 1 2 2 2 2 3 2 0 2 4 4 4 3 2 3 4 2 2 0 0 1 2 1 1 5 0 2 1 1 1 4 0 2 1 1 3 2 2 3 4 2 2 5 0 2 1 2 3 1 2 0 0 2 3 0 3 3 5 2 2 0 4 3 2 4 1 2 2 4 2 2 4 3 2 0 2 0 0 4 3 3 2 4 4 2 2 1 2 3 3 2 4 4 1 4 2 1 4 1 1 0 2 1 2 2 0 4 1 4 0 3 2 3 0 1 ...
output:
? 80 2 145 213 82 21 174 374 366 41 34 238 331 292 148 329 272 224 164 67 198 214 197 25 52 320 333 150 188 367 330 236 6 312 250 37 336 372 280 117 299 270 49 179 316 319 230 169 39 324 106 309 286 92 101 181 98 377 110 159 394 268 232 120 249 216 105 183 283 123 146 128 62 326 274 349 279 355 222 ...
result:
ok n=400, 25000 queries
Test #72:
score: 0
Accepted
time: 1287ms
memory: 3712kb
input:
400 0 6 3 1 2 2 4 2 1 2 4 5 4 0 1 4 1 1 2 2 0 1 1 0 3 0 3 4 2 4 3 2 3 1 1 1 0 0 3 1 3 0 3 3 6 2 2 0 6 2 1 2 3 4 2 3 3 1 2 2 0 1 2 4 0 2 1 2 0 1 1 3 1 0 2 2 3 1 1 7 8 1 1 0 4 4 2 3 2 3 2 4 1 2 1 3 3 4 2 3 3 2 0 2 1 1 4 1 4 1 2 3 1 1 5 1 6 2 0 1 0 4 2 1 1 1 3 0 1 4 1 1 1 3 1 2 1 3 3 1 0 3 4 2 3 2 2 1 ...
output:
? 8 255 365 42 133 375 160 195 189 350 235 301 251 291 37 141 2 382 185 153 49 69 200 177 81 67 223 107 41 167 43 397 114 101 230 227 111 116 358 304 196 48 326 166 396 62 40 270 324 131 310 261 267 38 386 181 239 132 28 260 12 11 45 307 325 4 79 75 339 84 191 139 26 171 87 273 63 370 204 288 39 229...
result:
ok n=400, 25000 queries
Test #73:
score: 0
Accepted
time: 1255ms
memory: 3800kb
input:
400 4 3 2 1 5 0 2 2 1 0 3 3 0 4 4 1 3 4 4 1 4 1 1 1 0 6 2 2 3 0 1 2 1 2 2 2 1 0 1 1 4 0 2 2 2 3 4 0 0 3 5 3 1 3 1 1 2 3 2 2 0 2 0 5 2 4 1 2 1 2 2 0 5 1 3 2 0 1 0 0 2 2 1 1 3 0 0 0 2 1 1 1 2 2 0 3 3 2 4 0 2 2 2 1 6 1 3 2 2 2 2 0 5 3 4 0 2 3 1 1 3 1 1 2 1 1 3 2 0 1 2 1 2 3 3 0 1 0 2 2 0 0 1 4 0 2 1 0 ...
output:
? 362 249 129 78 10 281 112 174 365 395 183 387 22 386 198 389 94 299 311 180 321 88 282 126 199 354 349 220 393 159 140 127 241 231 361 114 244 273 360 203 254 70 156 6 48 15 260 31 34 348 322 339 82 130 313 49 160 388 168 390 255 343 295 191 104 258 90 98 329 325 181 151 371 5 256 239 370 61 230 2...
result:
ok n=400, 25000 queries
Test #74:
score: 0
Accepted
time: 1226ms
memory: 3668kb
input:
400 1 1 0 2 2 3 0 5 2 2 1 1 3 3 2 3 3 3 1 3 1 0 2 1 3 2 1 5 0 2 2 1 2 2 1 3 1 2 3 0 1 5 2 4 1 2 2 0 4 2 4 1 4 0 1 0 1 2 2 2 3 7 4 4 1 1 1 4 1 1 8 2 2 1 1 1 1 1 4 6 3 2 0 4 2 0 4 1 2 0 4 3 2 1 2 2 0 2 1 2 2 2 3 3 5 0 0 2 1 0 0 2 3 1 1 2 4 1 3 1 1 0 0 2 2 2 3 0 1 1 1 1 3 2 2 2 0 2 2 1 4 1 2 3 1 4 1 0 ...
output:
? 108 324 53 88 52 211 310 90 112 72 342 141 18 304 321 295 234 115 27 143 291 337 307 82 331 246 351 12 371 126 192 182 42 339 201 294 245 391 392 332 93 17 338 118 400 129 325 364 110 226 171 83 1 172 340 319 329 109 162 32 305 242 235 222 223 20 35 302 145 120 167 14 180 92 327 89 252 28 253 107 ...
result:
ok n=400, 25000 queries
Test #75:
score: 0
Accepted
time: 1222ms
memory: 3792kb
input:
400 2 2 1 5 3 2 0 0 3 1 1 3 3 1 1 2 1 3 3 0 2 4 2 1 3 2 3 1 1 2 4 3 2 2 1 1 3 3 4 2 6 2 1 3 3 1 4 3 3 2 2 0 3 1 3 2 1 2 1 4 3 3 2 2 3 2 3 0 3 2 3 1 4 0 1 1 2 3 1 1 1 1 5 3 3 2 1 1 0 1 2 2 1 1 1 3 0 0 5 1 4 1 1 3 4 1 2 2 1 2 5 2 1 2 2 2 3 2 4 0 3 2 0 2 0 4 1 0 1 0 3 3 4 2 3 2 0 1 2 6 2 2 2 1 1 3 0 2 ...
output:
? 268 369 205 159 393 359 292 9 303 23 147 146 262 312 311 358 387 193 251 202 242 158 297 247 271 117 263 398 48 353 46 293 324 97 105 87 188 207 72 98 194 17 264 301 53 180 221 14 244 18 361 100 160 171 21 315 298 28 120 209 144 41 340 126 212 318 85 201 124 331 54 65 302 86 6 191 82 259 133 277 1...
result:
ok n=400, 25000 queries
Test #76:
score: 0
Accepted
time: 1368ms
memory: 3784kb
input:
400 4 6 6 1 3 2 2 2 3 1 1 1 0 1 3 0 3 0 1 1 2 1 2 1 2 4 1 2 1 1 6 1 1 0 3 2 1 3 3 1 2 1 0 1 1 2 2 1 2 2 3 4 4 1 1 2 2 4 1 0 2 2 3 2 1 0 2 6 4 1 3 1 5 5 3 0 1 3 4 2 2 3 1 1 5 2 7 0 2 2 1 2 4 1 4 1 1 1 3 2 0 2 1 0 1 1 4 0 1 2 2 2 1 5 5 2 2 0 1 3 2 3 2 1 0 1 1 3 0 5 5 1 3 2 1 2 2 2 2 1 2 2 3 1 4 1 2 4 ...
output:
? 15 330 162 168 62 322 334 207 394 189 50 86 10 72 137 102 329 18 116 76 244 267 48 213 251 304 343 219 92 5 193 218 130 109 60 163 56 149 347 231 372 274 349 232 390 93 129 151 385 312 83 124 279 3 311 90 91 240 238 14 286 192 33 100 366 88 332 38 299 35 159 69 383 272 24 324 328 277 78 317 112 21...
result:
ok n=400, 25000 queries
Test #77:
score: 0
Accepted
time: 1371ms
memory: 3668kb
input:
400 1 5 1 6 2 3 2 0 5 0 3 2 4 1 0 1 4 0 2 2 3 1 1 3 3 0 2 3 0 4 4 1 4 3 1 1 2 2 0 4 2 3 3 1 3 1 1 1 2 2 1 3 4 2 1 3 4 2 0 1 2 2 5 4 1 1 1 2 2 3 3 5 2 2 2 3 2 1 4 4 1 1 4 1 0 1 3 0 4 5 1 0 1 1 2 0 3 2 1 3 1 2 1 2 1 1 0 3 2 2 2 0 0 3 3 1 2 4 1 5 1 2 0 2 1 2 2 4 4 2 6 0 3 1 1 2 0 4 2 2 2 4 2 3 2 2 0 2 ...
output:
? 316 42 125 317 38 121 252 10 52 351 61 285 114 186 390 95 277 372 72 206 165 267 273 240 56 221 88 358 172 352 6 150 398 187 347 291 271 304 261 25 109 242 384 243 266 4 247 255 178 327 349 47 270 33 200 94 26 119 31 216 179 70 287 50 111 218 359 279 174 19 23 326 65 362 336 71 217 345 192 323 107...
result:
ok n=400, 25000 queries
Test #78:
score: 0
Accepted
time: 1218ms
memory: 3720kb
input:
400 1 4 2 0 1 1 2 3 2 1 1 2 2 1 3 2 1 1 1 0 3 1 2 5 1 2 1 2 3 3 2 0 0 1 4 3 2 0 3 1 1 4 3 2 5 3 1 3 5 3 1 0 1 2 1 0 5 2 1 3 3 4 2 1 0 1 1 2 1 5 2 4 1 1 1 2 2 1 3 3 4 6 1 1 4 2 1 3 5 3 1 2 1 3 0 1 0 0 5 2 1 1 3 3 1 0 1 4 2 4 1 3 5 1 1 4 3 1 4 2 1 1 6 1 0 3 4 1 4 1 1 1 2 2 1 1 3 3 1 1 2 2 2 6 4 6 5 2 ...
output:
? 366 195 56 327 332 170 157 43 113 384 32 276 118 119 83 369 121 319 359 277 334 129 136 339 189 293 116 231 285 222 249 370 226 79 145 379 247 345 301 108 380 394 172 34 23 167 88 207 22 368 294 78 50 273 149 69 385 326 318 274 101 14 376 73 53 363 371 115 67 223 130 233 82 373 230 282 265 111 333...
result:
ok n=400, 25000 queries
Test #79:
score: 0
Accepted
time: 1230ms
memory: 3672kb
input:
400 2 1 3 2 3 0 0 1 2 2 2 0 3 4 3 2 0 1 1 2 1 2 2 2 2 2 1 1 3 1 1 1 0 1 4 1 4 2 2 4 2 1 0 3 5 2 0 1 3 0 1 1 3 1 3 0 2 1 2 3 2 1 2 2 1 0 1 1 2 2 3 0 1 5 1 1 3 5 1 1 2 1 3 0 1 1 2 3 0 5 0 1 2 2 4 0 1 1 1 3 3 0 1 3 1 4 0 3 3 0 3 0 1 2 2 2 3 1 1 4 2 3 2 0 0 0 1 3 0 0 2 0 0 4 2 1 1 4 1 4 2 0 0 1 1 2 3 1 ...
output:
? 360 5 217 330 139 258 169 255 37 55 318 368 94 156 147 193 211 246 342 394 53 343 341 271 272 225 198 100 266 183 137 365 243 399 107 51 181 323 219 221 389 400 370 388 30 148 172 304 26 118 101 41 16 103 174 321 355 331 187 8 77 152 208 268 264 302 52 382 73 86 250 92 20 190 364 335 142 125 230 3...
result:
ok n=400, 25000 queries
Test #80:
score: 0
Accepted
time: 1323ms
memory: 3740kb
input:
400 3 4 1 1 1 3 2 2 2 3 0 2 3 3 1 2 1 0 0 0 0 2 3 0 2 2 1 1 3 0 0 1 1 0 1 0 2 1 4 3 0 3 1 3 4 1 3 4 1 3 3 2 2 0 2 2 1 0 2 2 1 2 2 0 3 4 1 3 3 4 1 1 3 1 1 3 1 1 1 1 3 1 0 5 1 1 0 0 1 1 3 1 0 1 3 3 2 1 4 1 5 2 2 3 2 2 3 1 2 1 0 2 1 2 1 0 4 1 3 2 2 3 2 1 0 2 1 1 1 2 4 1 1 2 1 1 2 3 3 1 2 1 2 2 0 5 2 1 ...
output:
? 319 355 302 288 108 281 114 97 224 335 231 167 230 375 2 11 40 264 273 368 101 182 201 210 371 207 236 174 191 48 268 259 376 312 145 262 113 180 387 271 126 362 280 102 89 45 166 254 293 277 152 346 47 265 143 206 117 7 333 367 194 326 226 15 252 378 289 308 188 42 243 394 155 359 118 322 270 157...
result:
ok n=400, 25000 queries
Test #81:
score: 0
Accepted
time: 1091ms
memory: 3732kb
input:
400 2 0 2 1 3 2 4 5 0 3 0 1 1 1 0 2 1 1 4 1 2 1 4 0 1 1 3 2 1 2 2 2 3 0 1 3 2 3 0 1 2 0 2 0 4 1 1 1 2 6 2 2 2 2 3 0 3 2 1 2 1 0 3 0 7 3 3 1 0 1 3 2 1 2 1 1 1 2 1 2 4 1 1 3 1 0 1 0 3 1 0 3 4 2 2 1 1 2 2 4 4 1 1 4 4 3 2 0 1 2 4 1 1 5 4 2 0 2 2 0 3 1 1 2 1 4 0 1 3 0 5 5 3 1 2 2 0 3 2 2 2 2 1 2 3 3 2 1 ...
output:
? 307 323 346 150 289 134 333 32 160 79 141 185 223 257 9 210 360 245 74 82 188 18 83 33 294 179 272 131 119 336 377 240 28 165 271 158 246 121 366 269 216 183 309 78 7 255 386 166 211 328 3 5 306 136 235 385 26 199 311 142 337 215 101 149 133 159 164 127 64 388 147 196 317 173 264 303 69 126 107 75...
result:
ok n=400, 25000 queries
Test #82:
score: 0
Accepted
time: 1197ms
memory: 3668kb
input:
400 4 0 1 2 2 0 4 1 3 6 2 3 1 1 3 3 3 2 3 1 5 1 2 1 0 3 2 0 0 1 2 0 3 3 3 3 2 3 4 1 1 2 0 3 2 2 2 3 2 2 1 2 0 1 0 1 2 1 1 2 1 2 2 4 1 1 1 2 3 4 0 3 4 0 1 2 5 0 3 2 2 2 1 4 1 1 5 2 2 2 1 0 2 1 2 1 1 1 2 3 2 1 0 2 1 1 0 1 4 2 1 1 1 2 3 3 3 2 5 2 3 1 3 2 3 1 2 3 1 1 1 2 3 1 1 1 2 4 2 2 1 1 0 1 0 2 3 2 ...
output:
? 346 376 266 164 304 278 381 316 258 369 245 17 292 200 127 27 178 153 14 180 342 140 51 207 111 72 134 186 125 344 219 121 222 177 56 190 368 94 33 252 99 355 238 341 129 22 30 339 233 237 197 377 363 379 68 297 149 70 335 361 115 227 201 317 128 176 280 16 236 53 226 249 314 214 261 65 62 389 182...
result:
ok n=400, 25000 queries
Test #83:
score: -100
Wrong Answer
time: 1283ms
memory: 3740kb
input:
400 2 1 2 3 3 3 5 3 2 1 2 4 2 2 0 3 3 4 0 3 1 0 2 2 3 1 3 2 3 1 3 2 2 7 2 5 1 0 3 4 1 2 3 2 2 1 4 1 3 1 3 1 2 1 2 1 2 3 1 1 2 2 4 0 1 2 2 0 2 0 2 2 6 0 4 1 2 6 5 4 3 3 2 4 5 4 2 4 2 1 3 0 4 1 0 2 1 1 1 1 0 0 2 4 1 3 0 0 2 2 1 4 0 2 4 1 1 2 3 3 2 2 1 4 1 0 2 3 3 0 1 5 2 3 4 4 1 5 1 1 3 2 3 1 4 0 2 0 ...
output:
? 168 149 172 303 162 366 387 363 151 378 285 284 385 298 309 113 185 294 314 129 59 313 362 64 190 400 53 111 2 215 351 274 191 51 62 1 11 8 204 319 21 67 146 123 148 181 72 226 74 235 153 141 108 249 80 206 278 264 265 189 116 20 246 186 147 39 367 88 336 159 126 65 301 339 335 19 173 114 280 79 7...
result:
wrong answer Elements should be distinct.