QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#464843 | #4205. Art Collections | Dan4Life | 50 | 1418ms | 66764kb | C++23 | 1.3kb | 2024-07-06 15:21:33 | 2024-07-06 15:21:33 |
Judging History
answer
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)
using ar2 = array<int,2>;
using ar3 = array<int,3>;
using ll = long long;
const int mxN = 4010;
int n;
vector<int> v;
bool better[mxN];
map<vector<int>,int> M;
int myPublish(vector<int> V){
if(M.count(V)) return M[V];
return M[V] = publish(V);
}
void recur(int l, int r){
if(l>=r) return;
random_shuffle(begin(v)+l,begin(v)+r+1);
int xd = (r-l+1);
for(int i = l; i <= r; i++)
better[v[i]]=0;
int st = myPublish(v);
if(st==0) return;
int cnt = 0;
while(xd-- and cnt<=(r-l+1)/2){
int b = v[r];
v.erase(begin(v)+r);
v.insert(begin(v)+l,b);
int now = myPublish(v);
if(now <= st) better[b]=1,cnt++;
st = now;
}
vector<int> nw; nw.clear();
for(int i = 0; i < l; i++) nw.pb(v[i]);
for(int i = l; i <= r; i++) if(better[v[i]]) nw.pb(v[i]);
for(int i = l; i <= r; i++) if(!better[v[i]]) nw.pb(v[i]);
for(int i = r+1; i < n; i++) nw.pb(v[i]);
v.clear(); for(auto u : nw) v.pb(u);
int mid = (l+r)/2; recur(l,mid); recur(mid+1,r);
}
void solve(int N) {
n = N; srand(time(NULL));
v.resize(N,0);
iota(all(v),1);
random_shuffle(all(v));
recur(0,N-1); answer(v);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 4184kb
input:
6 10 7 2 3 8 11 3 5 3 1 3 1 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 5 6 4 2 1 3 942318468 6 4 5 6 2 1 3 942318468 6 6 4 5 2 1 3 942318468 6 6 5 4 2 3 1 942318468 6 6 5 4 1 2 3 942318468 6 6 5 4 3 1 2 942318468 6 ...
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3892kb
input:
6 6 5 8 5 10 11 4 2 2 1 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 5 3 4 2 1 6 942318468 6 4 5 3 2 1 6 942318468 6 3 4 5 2 1 6 942318468 6 4 3 5 2 1 6 942318468 6 4 3 5 2 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 4180kb
input:
6 6 5 8 5 10 11 4 2 2 1 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 5 3 4 2 1 6 942318468 6 4 5 3 2 1 6 942318468 6 3 4 5 2 1 6 942318468 6 4 3 5 2 1 6 942318468 6 4 3 5 2 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 3892kb
input:
6 6 5 8 5 10 11 4 2 2 1 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 5 3 4 2 1 6 942318468 6 4 5 3 2 1 6 942318468 6 3 4 5 2 1 6 942318468 6 4 3 5 2 1 6 942318468 6 4 3 5 2 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 1ms
memory: 3956kb
input:
3 2 2 0
output:
942318468 3 2 1 3 942318468 3 3 2 1 942318468 3 1 3 2 539883183 3 1 3 2
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 4184kb
input:
6 5 8 13 12 7 4 3 3 1 2 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 3 1 2 4 6 5 942318468 6 2 3 1 4 6 5 942318468 6 1 2 3 4 6 5 942318468 6 2 1 3 4 6 5 942318468 6 1 2 3 4 5 6 539883183 6 1 2 3 4 5 6
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
6 6 5 8 5 10 11 4 2 2 1 0
output:
942318468 6 4 2 1 3 6 5 942318468 6 5 4 2 1 3 6 942318468 6 6 5 4 2 1 3 942318468 6 3 6 5 4 2 1 942318468 6 1 3 6 5 4 2 942318468 6 2 1 3 6 5 4 942318468 6 5 3 4 2 1 6 942318468 6 4 5 3 2 1 6 942318468 6 3 4 5 2 1 6 942318468 6 4 3 5 2 1 6 942318468 6 4 3 5 2 6 1 539883183 6 4 3 5 2 6 1
result:
ok correct
Subtask #2:
score: 15
Accepted
Test #8:
score: 15
Accepted
time: 2ms
memory: 4196kb
input:
40 380 387 388 379 394 367 356 395 420 405 442 459 426 437 434 395 404 381 386 389 424 403 384 353 366 337 336 359 334 365 330 363 346 365 358 379 408 403 430 393 189 188 177 164 181 186 201 204 217 228 229 214 207 204 223 232 215 206 213 208 162 161 156 159 150 147 152 145 152 153 143 147 143 141 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 3924kb
input:
40 380 387 388 379 394 367 356 395 420 405 442 459 426 437 434 395 404 381 386 389 424 403 384 353 366 337 336 359 334 365 330 363 346 365 358 379 408 403 430 393 189 188 177 164 181 186 201 204 217 228 229 214 207 204 223 232 215 206 213 208 162 161 156 159 150 147 152 145 152 153 143 147 143 141 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 4232kb
input:
40 380 387 388 379 394 367 356 395 420 405 442 459 426 437 434 395 404 381 386 389 424 403 384 353 366 337 336 359 334 365 330 363 346 365 358 379 408 403 430 393 189 188 177 164 181 186 201 204 217 228 229 214 207 204 223 232 215 206 213 208 162 161 156 159 150 147 152 145 152 153 143 147 143 141 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Test #11:
score: 0
Accepted
time: 2ms
memory: 3936kb
input:
40 380 387 388 379 394 367 356 395 420 405 442 459 426 437 434 395 404 381 386 389 424 403 384 353 366 337 336 359 334 365 330 363 346 365 358 379 408 403 430 393 189 188 177 164 181 186 201 204 217 228 229 214 207 204 223 232 215 206 213 208 162 161 156 159 150 147 152 145 152 153 143 147 143 141 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Test #12:
score: 0
Accepted
time: 2ms
memory: 3952kb
input:
40 420 389 378 413 396 411 410 421 406 429 430 447 414 393 406 369 398 369 356 375 366 361 382 407 440 433 410 371 344 351 382 419 394 421 424 429 394 391 372 381 209 200 211 216 203 222 207 200 195 184 191 172 181 164 177 180 197 212 213 210 144 141 144 149 158 153 160 151 150 143 136 138 134 132 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Test #13:
score: 0
Accepted
time: 2ms
memory: 4204kb
input:
40 360 391 402 367 384 369 370 359 374 351 350 333 366 387 374 411 382 411 424 405 414 419 398 373 340 347 370 409 436 429 398 361 386 359 356 351 386 389 408 399 177 178 173 192 195 192 207 200 217 202 201 184 189 180 193 202 213 200 181 170 139 146 141 150 149 152 143 144 137 134 130 130 126 128 1...
output:
942318468 40 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 36 942318468 40 36 1 16 30 22 38 18 19 7 33 2 5 17 34 40 32 24 4 8 10 23 25 11 27 35 6 39 14 31 37 12 20 9 28 15 21 13 29 3 26 942318468 40 26 36 1 16 30 22 38 18 19 7 33 2 5 17 3...
result:
ok correct
Subtask #3:
score: 15
Accepted
Test #14:
score: 15
Accepted
time: 36ms
memory: 6196kb
input:
250 14330 14541 14648 14451 14470 14375 14248 14321 14510 14663 14612 14857 15096 15345 15242 15111 15344 15167 15202 15159 15364 15279 15320 15369 15234 15463 15372 15405 15492 15451 15318 15115 15328 15297 15402 15403 15466 15325 15428 15427 15606 15717 15890 15901 16100 16097 15852 15759 15702 15...
output:
942318468 250 228 110 238 112 221 4 246 129 62 137 179 212 65 128 46 180 181 194 206 239 88 198 201 15 132 157 136 211 195 55 24 47 48 243 92 185 90 14 18 103 54 220 247 138 17 29 229 200 249 219 75 199 38 87 60 102 27 113 40 119 12 83 218 97 86 166 68 236 161 188 63 115 235 71 207 204 159 133 245 1...
result:
ok correct
Test #15:
score: 0
Accepted
time: 25ms
memory: 5888kb
input:
250 14822 14965 15174 15007 14874 14811 14892 14793 15042 14859 14944 14929 15026 14925 14720 14639 14588 14435 14358 14449 14328 14183 14174 14419 14322 14115 14030 14001 13960 13741 13788 13903 13904 14033 14092 13931 13838 13849 14064 14115 14186 14317 14544 14593 14384 14173 14392 14555 14310 14...
output:
942318468 250 228 110 238 112 221 4 246 129 62 137 179 212 65 128 46 180 181 194 206 239 88 198 201 15 132 157 136 211 195 55 24 47 48 243 92 185 90 14 18 103 54 220 247 138 17 29 229 200 249 219 75 199 38 87 60 102 27 113 40 119 12 83 218 97 86 166 68 236 161 188 63 115 235 71 207 204 159 133 245 1...
result:
ok correct
Test #16:
score: 0
Accepted
time: 23ms
memory: 5884kb
input:
250 15851 16080 16039 16048 16075 16268 16069 15918 16129 16258 16081 15964 15763 15662 15553 15552 15437 15500 15429 15368 15463 15214 15377 15264 15429 15338 15553 15474 15581 15410 15427 15290 15429 15226 15197 15418 15223 15130 15115 14992 15215 15216 14985 14964 15079 15044 15021 15098 15127 15...
output:
942318468 250 106 92 112 197 196 97 82 54 163 31 124 221 153 156 84 13 155 76 137 48 39 212 154 107 18 98 87 213 145 127 53 123 243 192 52 2 74 241 116 9 185 104 117 210 94 189 29 201 11 136 176 78 148 122 160 60 41 174 219 214 147 99 158 161 247 177 17 49 81 113 150 225 220 245 146 56 132 100 178 1...
result:
ok correct
Test #17:
score: 0
Accepted
time: 31ms
memory: 5968kb
input:
250 14820 14729 14720 14697 14838 14731 14522 14691 14758 14783 14540 14383 14484 14261 14442 14281 14476 14429 14508 14331 14268 14167 14164 14257 14310 14399 14416 14575 14438 14419 14394 14361 14324 14085 13884 13839 13700 13739 13622 13795 13942 13993 13924 13857 14098 14021 14020 14245 14482 14...
output:
942318468 250 106 92 112 197 196 97 82 54 163 31 124 221 153 156 84 13 155 76 137 48 39 212 154 107 18 98 87 213 145 127 53 123 243 192 52 2 74 241 116 9 185 104 117 210 94 189 29 201 11 136 176 78 148 122 160 60 41 174 219 214 147 99 158 161 247 177 17 49 81 113 150 225 220 245 146 56 132 100 178 1...
result:
ok correct
Test #18:
score: 0
Accepted
time: 29ms
memory: 5968kb
input:
250 14820 14729 14720 14697 14838 14731 14522 14691 14758 14783 14540 14383 14484 14261 14442 14281 14476 14429 14508 14331 14268 14167 14164 14257 14310 14399 14416 14575 14438 14419 14394 14361 14324 14085 13884 13839 13700 13739 13622 13795 13942 13993 13924 13857 14098 14021 14020 14245 14482 14...
output:
942318468 250 106 92 112 197 196 97 82 54 163 31 124 221 153 156 84 13 155 76 137 48 39 212 154 107 18 98 87 213 145 127 53 123 243 192 52 2 74 241 116 9 185 104 117 210 94 189 29 201 11 136 176 78 148 122 160 60 41 174 219 214 147 99 158 161 247 177 17 49 81 113 150 225 220 245 146 56 132 100 178 1...
result:
ok correct
Test #19:
score: 0
Accepted
time: 38ms
memory: 5924kb
input:
250 14820 14729 14720 14697 14838 14731 14522 14691 14758 14783 14540 14383 14484 14261 14442 14281 14476 14429 14508 14331 14268 14167 14164 14257 14310 14399 14416 14575 14438 14419 14394 14361 14324 14085 13884 13839 13700 13739 13622 13795 13942 13993 13924 13857 14098 14021 14020 14245 14482 14...
output:
942318468 250 106 92 112 197 196 97 82 54 163 31 124 221 153 156 84 13 155 76 137 48 39 212 154 107 18 98 87 213 145 127 53 123 243 192 52 2 74 241 116 9 185 104 117 210 94 189 29 201 11 136 176 78 148 122 160 60 41 174 219 214 147 99 158 161 247 177 17 49 81 113 150 225 220 245 146 56 132 100 178 1...
result:
ok correct
Subtask #4:
score: 15
Accepted
Test #20:
score: 15
Accepted
time: 94ms
memory: 10724kb
input:
444 49899 50154 50295 50486 50177 50610 50833 50792 50683 50440 50119 50038 50139 49876 49603 49178 48829 49134 48807 49214 49299 49730 49861 49900 49817 49414 49643 49242 49527 49636 49663 49292 48887 49310 49237 49144 48799 49190 49155 49504 49817 49380 49449 49196 49065 48844 48643 48492 48363 48...
output:
942318468 444 221 84 335 342 395 416 92 48 421 391 190 374 402 203 16 2 201 200 137 97 8 434 279 346 255 167 307 301 442 360 33 231 297 273 422 208 240 376 61 223 314 192 85 23 51 181 343 141 292 28 357 429 356 420 104 368 149 199 304 140 443 276 52 117 417 358 205 178 58 270 401 142 387 248 440 93 ...
result:
ok correct
Test #21:
score: 0
Accepted
time: 80ms
memory: 10744kb
input:
444 49027 48646 48639 49070 49271 49166 49505 49262 49267 48908 48829 49238 48997 49370 49643 49772 49915 49520 49103 48688 48849 48630 48627 49028 48769 48936 49013 48760 49101 48678 48589 48890 48483 48192 48431 48610 48177 48582 48859 48520 48287 48482 48621 48792 49091 49106 49029 48846 48641 48...
output:
942318468 444 73 402 380 144 436 351 264 34 358 186 412 347 432 13 311 28 408 406 345 291 324 142 12 387 4 280 344 203 257 60 206 149 401 199 405 265 285 85 31 331 109 48 256 91 89 283 329 3 279 223 75 148 435 100 151 262 376 258 274 78 107 146 81 388 61 233 165 108 51 339 18 240 239 437 10 421 365 ...
result:
ok correct
Test #22:
score: 0
Accepted
time: 100ms
memory: 10712kb
input:
444 50146 50015 49804 49989 49606 49669 49272 49541 49918 50355 50402 50195 50368 50719 50374 50325 50066 49973 50258 50579 50354 49987 50138 49887 49682 49537 49382 49551 49400 48999 49036 48729 48536 48781 48542 48907 48810 48687 48264 48305 48396 48343 48040 47939 48322 48391 48346 48657 48824 48...
output:
942318468 444 73 402 380 144 436 351 264 34 358 186 412 347 432 13 311 28 408 406 345 291 324 142 12 387 4 280 344 203 257 60 206 149 401 199 405 265 285 85 31 331 109 48 256 91 89 283 329 3 279 223 75 148 435 100 151 262 376 258 274 78 107 146 81 388 61 233 165 108 51 339 18 240 239 437 10 421 365 ...
result:
ok correct
Test #23:
score: 0
Accepted
time: 97ms
memory: 10680kb
input:
444 49676 49489 49158 49199 49564 49275 49098 48849 49030 49325 49430 49793 50038 50195 50582 50445 50820 51153 50782 50547 50310 50579 50862 50839 50736 50489 50092 50217 50492 50407 50042 49715 49326 48927 48934 48993 49314 49171 48820 48519 48412 48429 48854 48687 49114 48911 49302 49051 49076 49...
output:
942318468 444 59 192 435 157 261 306 43 197 358 68 205 103 213 72 120 253 301 231 98 125 360 209 388 434 316 319 63 8 274 310 270 421 81 277 24 375 27 427 177 123 439 69 444 61 336 363 346 272 159 148 353 220 398 371 359 304 49 198 280 14 146 243 44 142 317 62 290 429 41 294 399 175 283 262 151 172 ...
result:
ok correct
Test #24:
score: 0
Accepted
time: 98ms
memory: 10712kb
input:
444 49651 49384 49471 49810 49631 49828 49573 49248 49687 49398 49655 49676 49967 49576 49777 49910 49469 49184 49439 49720 49777 50020 49685 49916 49711 49922 49583 49846 50009 49664 49371 49584 49919 49772 50113 49756 50171 50364 50675 50676 50627 50638 50663 51038 51327 51562 51553 51152 51101 51...
output:
942318468 444 59 192 435 157 261 306 43 197 358 68 205 103 213 72 120 253 301 231 98 125 360 209 388 434 316 319 63 8 274 310 270 421 81 277 24 375 27 427 177 123 439 69 444 61 336 363 346 272 159 148 353 220 398 371 359 304 49 198 280 14 146 243 44 142 317 62 290 429 41 294 399 175 283 262 151 172 ...
result:
ok correct
Test #25:
score: 0
Accepted
time: 104ms
memory: 10656kb
input:
444 50276 50191 49960 49559 49862 50019 49806 49755 49530 49819 49894 50335 50168 49831 49590 50033 49970 50053 49788 49651 49358 49565 49574 49305 49542 49501 49200 49523 49248 48855 49146 48927 48502 48513 48350 48251 48382 48359 47980 47905 47670 47305 47010 47129 47028 46845 46860 46989 46870 46...
output:
942318468 444 118 256 354 86 252 415 76 384 247 441 233 370 104 168 81 276 193 319 278 347 413 173 244 315 399 189 180 329 134 394 296 386 71 367 190 53 128 339 115 323 84 388 207 406 25 218 417 366 40 410 352 293 313 250 245 171 198 279 27 163 391 63 430 340 123 64 54 164 38 99 435 59 175 305 165 1...
result:
ok correct
Subtask #5:
score: 0
Wrong Answer
Test #26:
score: 0
Wrong Answer
time: 562ms
memory: 35888kb
input:
2000 975541 974710 972857 971822 970249 970752 972023 973378 974489 974046 975427 976052 976923 976526 977873 979338 980377 979010 977097 978260 977101 977570 977467 976312 976389 977538 977863 979492 980715 980472 980767 982222 981563 979644 981091 982038 980097 982042 981703 980128 980941 980336 9...
output:
942318468 2000 1781 1543 1331 1270 285 77 526 1372 1167 523 1888 183 1251 202 1641 868 710 1084 823 194 1876 1484 117 1827 548 1838 1135 1929 1764 1559 637 1452 1524 1642 276 1120 1765 1605 1659 254 915 1514 1186 1354 229 1377 635 826 1988 1601 997 1586 1451 1066 173 1189 458 515 1707 1901 907 234 6...
result:
wrong answer Too many queries
Subtask #6:
score: 0
Wrong Answer
Test #32:
score: 0
Wrong Answer
time: 1418ms
memory: 66764kb
input:
4000 3965348 3963719 3964024 3960151 3957806 3958055 3954224 3953215 3956442 3952971 3954706 3956599 3954802 3954827 3954350 3950777 3950290 3949719 3946586 3949729 3945744 3941887 3943436 3944011 3943926 3943243 3942816 3944399 3943866 3945461 3948668 3950513 3950150 3953241 3955572 3957607 3959086...
output:
942318468 4000 328 3855 262 2410 1272 3147 3447 2996 2619 1511 807 1015 2538 2237 3155 3172 1280 1463 2078 2610 2833 310 1710 2495 2512 1711 160 989 2448 1246 2206 2640 809 824 1366 2172 2184 2781 3385 3243 1027 3557 1007 3339 1371 2462 2151 2628 487 1916 1010 3200 2181 3828 3814 1028 3236 1923 2481...
result:
wrong answer Too many queries