QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#464344 | #4205. Art Collections | Dan4Life# | 50 | 1443ms | 66804kb | C++23 | 1.2kb | 2024-07-06 01:37:40 | 2024-07-06 01:37:42 |
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;
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: 3876kb
input:
6 7 10 7 12 7 6 3 3 1 2 1 3 0
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 942318468 6 4 6 5 3 1 2 942318468 6 5 4 6 3 1 2 942318468 6 6 5 4 3 1 2 942318468 6 5 6 4 3 1 2 942318468 6 6 5 4 2 3 1 942318468 6 6 5 4 1 2 3 942318468 6 ...
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3868kb
input:
6 5 6 5 10 13 8 3 5 3 2 0 2 1
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 942318468 6 3 4 5 6 1 2 942318468 6 5 3 4 6 1 2 942318468 6 4 5 3 6 1 2 942318468 6 4 3 5 6 1 2 942318468 6 4 3 5 2 6 1 942318468 6 4 3 5 1 2 6 942318468 6 ...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
6 5 6 5 10 13 8 3 5 3 2 0 2 1
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 942318468 6 3 4 5 6 1 2 942318468 6 5 3 4 6 1 2 942318468 6 4 5 3 6 1 2 942318468 6 4 3 5 6 1 2 942318468 6 4 3 5 2 6 1 942318468 6 4 3 5 1 2 6 942318468 6 ...
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
6 5 6 5 10 13 8 3 5 3 2 0 2 1
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 942318468 6 3 4 5 6 1 2 942318468 6 5 3 4 6 1 2 942318468 6 4 5 3 6 1 2 942318468 6 4 3 5 6 1 2 942318468 6 4 3 5 2 6 1 942318468 6 4 3 5 1 2 6 942318468 6 ...
result:
ok correct
Test #5:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
3 1 3 1 0
output:
942318468 3 3 1 2 942318468 3 2 3 1 942318468 3 1 2 3 942318468 3 1 3 2 539883183 3 1 3 2
result:
ok correct
Test #6:
score: 0
Accepted
time: 1ms
memory: 3892kb
input:
6 8 5 8 3 8 9 3 3 1 2 1 3 0
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 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 5 4 6 942318468 6 1 2 3 6 5 4 942318468 6 ...
result:
ok correct
Test #7:
score: 0
Accepted
time: 1ms
memory: 4164kb
input:
6 5 6 5 10 13 8 3 5 3 2 0 2 1
output:
942318468 6 3 4 6 1 5 2 942318468 6 2 3 4 6 1 5 942318468 6 5 2 3 4 6 1 942318468 6 1 5 2 3 4 6 942318468 6 6 1 5 2 3 4 942318468 6 4 6 1 5 2 3 942318468 6 3 4 5 6 1 2 942318468 6 5 3 4 6 1 2 942318468 6 4 5 3 6 1 2 942318468 6 4 3 5 6 1 2 942318468 6 4 3 5 2 6 1 942318468 6 4 3 5 1 2 6 942318468 6 ...
result:
ok correct
Subtask #2:
score: 15
Accepted
Test #8:
score: 15
Accepted
time: 0ms
memory: 3892kb
input:
40 435 402 387 376 389 384 383 392 361 364 369 350 357 382 417 456 443 404 401 384 363 328 347 340 317 344 373 364 387 358 375 406 439 450 451 414 451 466 441 414 187 174 179 188 203 222 211 212 219 200 217 220 219 204 217 214 225 216 199 194 162 159 158 149 158 153 160 161 154 159 141 143 147 143 1...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Test #9:
score: 0
Accepted
time: 0ms
memory: 4184kb
input:
40 435 402 387 376 389 384 383 392 361 364 369 350 357 382 417 456 443 404 401 384 363 328 347 340 317 344 373 364 387 358 375 406 439 450 451 414 451 466 441 414 187 174 179 188 203 222 211 212 219 200 217 220 219 204 217 214 225 216 199 194 162 159 158 149 158 153 160 161 154 159 141 143 147 143 1...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Test #10:
score: 0
Accepted
time: 1ms
memory: 4212kb
input:
40 435 402 387 376 389 384 383 392 361 364 369 350 357 382 417 456 443 404 401 384 363 328 347 340 317 344 373 364 387 358 375 406 439 450 451 414 451 466 441 414 187 174 179 188 203 222 211 212 219 200 217 220 219 204 217 214 225 216 199 194 162 159 158 149 158 153 160 161 154 159 141 143 147 143 1...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Test #11:
score: 0
Accepted
time: 2ms
memory: 4216kb
input:
40 435 402 387 376 389 384 383 392 361 364 369 350 357 382 417 456 443 404 401 384 363 328 347 340 317 344 373 364 387 358 375 406 439 450 451 414 451 466 441 414 187 174 179 188 203 222 211 212 219 200 217 220 219 204 217 214 225 216 199 194 162 159 158 149 158 153 160 161 154 159 141 143 147 143 1...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Test #12:
score: 0
Accepted
time: 2ms
memory: 4216kb
input:
40 363 330 353 352 385 382 359 388 413 432 419 440 409 394 385 396 435 398 411 386 381 412 439 442 413 394 359 394 355 348 365 372 409 388 377 386 387 370 343 358 147 134 153 170 167 174 163 168 179 162 157 172 163 164 149 130 143 142 151 154 100 97 104 103 96 101 102 97 88 97 83 85 89 87 87 83 85 8...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Test #13:
score: 0
Accepted
time: 2ms
memory: 3940kb
input:
40 417 450 427 428 395 398 421 392 367 348 361 340 371 386 395 384 345 382 369 394 399 368 341 338 367 386 421 386 425 432 415 408 371 392 403 394 393 410 437 422 233 230 217 208 203 204 203 212 193 200 189 182 199 184 187 200 183 194 213 218 152 159 156 157 162 171 162 161 164 159 146 148 144 148 1...
output:
942318468 40 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 37 942318468 40 37 18 13 34 29 20 16 26 31 2 17 12 24 40 3 38 30 35 19 7 5 23 33 14 39 1 15 25 28 36 10 27 11 8 6 32 22 4 21 9 942318468 40 9 37 18 13 34 29 20 16 26 31 2 17 12 24...
result:
ok correct
Subtask #3:
score: 15
Accepted
Test #14:
score: 15
Accepted
time: 31ms
memory: 6076kb
input:
250 15328 15547 15546 15361 15258 15191 15402 15191 15364 15421 15602 15387 15556 15715 15482 15713 15552 15311 15272 15477 15524 15423 15326 15547 15740 15785 15666 15419 15214 15343 15558 15539 15736 15587 15774 15635 15694 15639 15452 15615 15842 15639 15648 15737 15886 15955 16082 16089 16154 15...
output:
942318468 250 43 118 34 187 170 54 235 110 77 237 59 94 149 169 38 204 186 19 212 70 125 33 92 160 68 115 148 229 69 48 86 11 47 248 217 158 139 105 9 157 241 14 100 7 66 131 155 220 76 140 8 172 173 247 239 50 161 26 101 232 182 109 107 165 112 116 124 214 179 108 45 230 3 141 72 163 154 238 80 31 ...
result:
ok correct
Test #15:
score: 0
Accepted
time: 31ms
memory: 5824kb
input:
250 16828 16581 16632 16441 16236 16055 16198 16265 16492 16529 16556 16573 16386 16207 16352 16283 16042 16021 15972 15851 15854 15679 15550 15379 15238 15361 15136 15061 15156 15263 15108 14891 15082 15105 15168 15131 15270 15199 15182 14951 14758 14873 14676 14463 14588 14623 14520 14709 14698 14...
output:
942318468 250 43 118 34 187 170 54 235 110 77 237 59 94 149 169 38 204 186 19 212 70 125 33 92 160 68 115 148 229 69 48 86 11 47 248 217 158 139 105 9 157 241 14 100 7 66 131 155 220 76 140 8 172 173 247 239 50 161 26 101 232 182 109 107 165 112 116 124 214 179 108 45 230 3 141 72 163 154 238 80 31 ...
result:
ok correct
Test #16:
score: 0
Accepted
time: 26ms
memory: 5900kb
input:
250 15797 15578 15579 15764 15867 15934 15723 15934 15761 15704 15523 15738 15569 15410 15643 15412 15573 15814 15853 15648 15601 15702 15799 15578 15385 15340 15459 15706 15911 15782 15567 15586 15389 15538 15351 15490 15431 15486 15673 15510 15283 15486 15477 15388 15239 15170 15043 15036 14971 15...
output:
942318468 250 43 118 34 187 170 54 235 110 77 237 59 94 149 169 38 204 186 19 212 70 125 33 92 160 68 115 148 229 69 48 86 11 47 248 217 158 139 105 9 157 241 14 100 7 66 131 155 220 76 140 8 172 173 247 239 50 161 26 101 232 182 109 107 165 112 116 124 214 179 108 45 230 3 141 72 163 154 238 80 31 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 24ms
memory: 5832kb
input:
250 16828 16581 16632 16441 16236 16055 16198 16265 16492 16529 16556 16573 16386 16207 16352 16283 16042 16021 15972 15851 15854 15679 15550 15379 15238 15361 15136 15061 15156 15263 15108 14891 15082 15105 15168 15131 15270 15199 15182 14951 14758 14873 14676 14463 14588 14623 14520 14709 14698 14...
output:
942318468 250 43 118 34 187 170 54 235 110 77 237 59 94 149 169 38 204 186 19 212 70 125 33 92 160 68 115 148 229 69 48 86 11 47 248 217 158 139 105 9 157 241 14 100 7 66 131 155 220 76 140 8 172 173 247 239 50 161 26 101 232 182 109 107 165 112 116 124 214 179 108 45 230 3 141 72 163 154 238 80 31 ...
result:
ok correct
Test #18:
score: 0
Accepted
time: 35ms
memory: 5832kb
input:
250 15103 15044 15289 15532 15349 15214 15263 15234 15251 15136 15089 15284 15383 15570 15415 15218 15247 15084 14851 14726 14951 15164 15219 15170 14999 14862 15055 14980 15047 15134 15223 15112 15283 15510 15573 15696 15535 15510 15331 15492 15373 15448 15303 15420 15341 15120 14963 15122 15145 15...
output:
942318468 250 76 9 199 7 230 143 23 160 208 105 52 108 28 242 197 126 92 226 185 232 33 1 229 124 55 183 89 30 235 130 73 159 59 206 170 136 135 203 166 207 181 94 17 115 122 83 175 53 82 99 31 141 212 176 224 158 40 195 154 198 81 79 218 93 8 234 98 14 5 61 219 236 149 186 156 47 222 20 102 147 213...
result:
ok correct
Test #19:
score: 0
Accepted
time: 32ms
memory: 6104kb
input:
250 15103 15044 15289 15532 15349 15214 15263 15234 15251 15136 15089 15284 15383 15570 15415 15218 15247 15084 14851 14726 14951 15164 15219 15170 14999 14862 15055 14980 15047 15134 15223 15112 15283 15510 15573 15696 15535 15510 15331 15492 15373 15448 15303 15420 15341 15120 14963 15122 15145 15...
output:
942318468 250 76 9 199 7 230 143 23 160 208 105 52 108 28 242 197 126 92 226 185 232 33 1 229 124 55 183 89 30 235 130 73 159 59 206 170 136 135 203 166 207 181 94 17 115 122 83 175 53 82 99 31 141 212 176 224 158 40 195 154 198 81 79 218 93 8 234 98 14 5 61 219 236 149 186 156 47 222 20 102 147 213...
result:
ok correct
Subtask #4:
score: 15
Accepted
Test #20:
score: 15
Accepted
time: 104ms
memory: 10472kb
input:
444 47779 47508 47483 47368 47625 48050 47855 48054 47977 48418 48603 48716 48955 49326 49239 49104 48949 48640 48969 48574 48795 49172 49579 49824 49753 50094 49755 49510 49945 49540 49353 48916 48905 48636 48253 48484 48347 48414 48711 48470 48605 48778 48815 48794 49145 48944 49033 49354 49763 49...
output:
942318468 444 329 390 332 281 230 143 23 160 208 105 52 108 386 242 197 126 92 259 185 325 33 410 229 297 55 419 89 301 235 130 430 159 59 206 170 136 135 203 265 207 181 320 17 115 251 83 175 53 82 387 426 315 212 176 389 158 339 254 364 198 81 264 218 93 8 234 327 14 391 61 377 236 149 300 401 354...
result:
ok correct
Test #21:
score: 0
Accepted
time: 106ms
memory: 10448kb
input:
444 47520 47837 47492 47835 47724 47699 47896 47761 47612 47757 48188 47939 48254 48217 48432 48133 48210 48489 48906 48995 49094 49099 49118 48827 48588 48685 48778 48351 48714 48523 48790 48419 48462 48515 48716 48273 48140 48209 47858 48261 48660 48419 48330 48541 48914 49281 49058 48643 48258 48...
output:
942318468 444 329 390 332 281 230 143 23 160 208 105 52 108 386 242 197 126 92 259 185 325 33 410 229 297 55 419 89 301 235 130 430 159 59 206 170 136 135 203 265 207 181 320 17 115 251 83 175 53 82 387 426 315 212 176 389 158 339 254 364 198 81 264 218 93 8 234 327 14 391 61 377 236 149 300 401 354...
result:
ok correct
Test #22:
score: 0
Accepted
time: 105ms
memory: 10484kb
input:
444 49820 49813 49772 50073 50508 50401 50388 50497 50872 51275 51282 51507 51114 50887 50722 51001 51188 51505 51864 52113 52088 51799 51658 51611 51328 51181 50996 50979 50952 51063 50882 50773 50638 50327 50338 50507 50488 50821 50880 51235 50944 50643 50806 50691 51082 51215 51142 51247 51476 51...
output:
942318468 444 344 324 208 213 249 408 285 415 315 441 409 422 101 238 140 34 334 150 272 32 17 117 182 71 233 300 413 63 358 160 346 291 261 9 255 277 24 131 282 412 341 444 380 294 46 83 172 161 336 191 121 168 411 89 319 204 421 243 7 436 201 185 14 377 82 84 310 211 425 98 65 176 206 323 322 316 ...
result:
ok correct
Test #23:
score: 0
Accepted
time: 89ms
memory: 10488kb
input:
444 49820 49813 49772 50073 50508 50401 50388 50497 50872 51275 51282 51507 51114 50887 50722 51001 51188 51505 51864 52113 52088 51799 51658 51611 51328 51181 50996 50979 50952 51063 50882 50773 50638 50327 50338 50507 50488 50821 50880 51235 50944 50643 50806 50691 51082 51215 51142 51247 51476 51...
output:
942318468 444 344 324 208 213 249 408 285 415 315 441 409 422 101 238 140 34 334 150 272 32 17 117 182 71 233 300 413 63 358 160 346 291 261 9 255 277 24 131 282 412 341 444 380 294 46 83 172 161 336 191 121 168 411 89 319 204 421 243 7 436 201 185 14 377 82 84 310 211 425 98 65 176 206 323 322 316 ...
result:
ok correct
Test #24:
score: 0
Accepted
time: 99ms
memory: 10736kb
input:
444 48514 48123 48058 47847 47426 47551 47698 47499 47520 47589 47968 48059 47662 48035 47978 47947 48054 48383 48066 47819 47546 47977 47608 47605 47800 47719 48140 47991 48094 47885 47480 47857 47470 47643 48072 48413 48170 48375 48524 48271 47994 48043 48370 48471 48446 48569 48912 49337 49394 49...
output:
942318468 444 134 55 79 336 140 205 422 236 380 314 312 179 321 291 15 49 130 440 76 106 369 387 164 27 85 132 306 66 324 431 4 18 2 250 154 379 96 135 16 32 311 432 270 108 305 290 127 443 133 385 17 415 143 216 165 126 39 429 310 275 335 347 187 262 191 99 184 217 323 25 404 307 211 269 372 230 27...
result:
ok correct
Test #25:
score: 0
Accepted
time: 88ms
memory: 10472kb
input:
444 48919 49076 49491 49470 49177 49300 49407 49568 49931 49752 49901 50048 50437 50842 50887 51070 51003 51060 50789 50494 50149 49950 50251 49890 49535 49936 49549 49784 49505 49698 49575 49900 49895 50144 50411 50418 50221 50388 50311 50638 50215 50314 49951 50202 50335 50674 50605 50342 50105 50...
output:
942318468 444 134 55 79 336 140 205 422 236 380 314 312 179 321 291 15 49 130 440 76 106 369 387 164 27 85 132 306 66 324 431 4 18 2 250 154 379 96 135 16 32 311 432 270 108 305 290 127 443 133 385 17 415 143 216 165 126 39 429 310 275 335 347 187 262 191 99 184 217 323 25 404 307 211 269 372 230 27...
result:
ok correct
Subtask #5:
score: 0
Wrong Answer
Test #26:
score: 0
Wrong Answer
time: 622ms
memory: 35608kb
input:
2000 1011936 1010159 1010038 1011193 1009524 1008907 1009920 1009639 1009848 1008911 1008416 1008289 1008834 1009311 1010522 1010115 1009346 1010261 1009924 1008175 1009442 1008277 1010154 1010509 1012454 1013547 1013776 1013527 1012314 1012149 1012898 1011179 1009258 1007517 1009338 1010875 1011136...
output:
942318468 2000 1025 1408 705 1546 1740 1989 1822 337 768 1447 1590 104 1543 366 819 628 1211 233 18 1632 411 432 923 1728 797 1199 228 1830 1069 1974 1158 272 1776 1854 1594 1008 870 938 616 1365 472 1792 1843 450 1510 1588 106 1270 1895 59 315 1960 1205 1950 560 159 1222 932 777 442 32 1160 1082 11...
result:
wrong answer Too many queries
Subtask #6:
score: 0
Wrong Answer
Test #32:
score: 0
Wrong Answer
time: 1443ms
memory: 66804kb
input:
4000 3962634 3962869 3963478 3963413 3962560 3962271 3966146 3970103 3969774 3972665 3969358 3970513 3968216 3971363 3970710 3972293 3969998 3973671 3971634 3975575 3974174 3976047 3973336 3974873 3973492 3971053 3967762 3967067 3968264 3965959 3969328 3967721 3969472 3969113 3972322 3974273 3974618...
output:
942318468 4000 230 364 1075 1921 2198 2180 3768 3885 684 674 2969 2267 1252 410 3078 1662 388 421 371 1080 3898 1790 581 662 3298 3914 541 561 2688 3720 1362 2482 664 3008 1810 481 3359 3568 3352 2460 749 3348 3272 3246 3783 2421 2417 745 3760 205 2254 1881 3347 1738 1535 3823 55 265 3216 2887 824 3...
result:
wrong answer Too many queries