QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#232244#7616. Jump GraphCharlieVinnieWA 48ms54876kbC++171.9kb2023-10-30 08:32:212023-10-30 08:32:21

Judging History

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

  • [2023-10-30 08:32:21]
  • 评测
  • 测评结果:WA
  • 用时:48ms
  • 内存:54876kb
  • [2023-10-30 08:32:21]
  • 提交

answer

#include "bits/stdc++.h"
#ifdef DEBUG
#include "PrettyDebug.hpp"
#else
#define debug(...) [](auto...){}(__VA_ARGS__)
#define debuga(...) [](auto...){}(__VA_ARGS__)
#endif
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Rev(i,a,b) for(int i=a;i>=b;i--)
#define Fin(file) freopen(file,"r",stdin)
#define Fout(file) freopen(file,"w",stdout)
#define assume(expr) ((!!(expr))||(exit((fprintf(stderr,"Assumption Failed: %s on Line %d\n",#expr,__LINE__),-1)),false))
#define range basic_string_view
using namespace std; typedef long long ll;
constexpr int N=3e5+5;
int n,a[N],L[N],R[N],fa[N],dep[N],sub[N]; vector<int> son[N]; ll ans[N];
signed main(){
    atexit([](){cerr<<"Time = "<<clock()<<" ms"<<endl;}); ios::sync_with_stdio(0); cin.tie(0);
    cin>>n; For(i,1,n) cin>>a[i];
    stack<int> st; For(i,1,n) { while(st.size()&&a[i]>a[st.top()]) st.pop();; if(st.size()) L[i]=st.top();; st.push(i); }
    st=move(stack<int>());
    Rev(i,n,1) { while(st.size()&&a[i]>a[st.top()]) st.pop();; if(st.size()) R[i]=st.top();; st.push(i); }
    For(i,1,n) fa[i]=a[L[i]]>a[R[i]]?L[i]:R[i];
    debuga(L,1,n); debuga(R,1,n); debuga(fa,1,n);
    int rt=0; For(i,1,n) if(fa[i]) son[fa[i]].push_back(i); else rt=i;
    vector<int> lis; function<void(int)> dfs=[&](int u) { lis.push_back(u); for(int v:son[u]) dep[v]=dep[u]+1,dfs(v); }; dep[rt]=1; dfs(rt);
    reverse(lis.begin(),lis.end()); lis.pop_back();
    int tot=0; For(u,1,n) { tot+=dep[u]; sub[u]=1; }
    for(int u:lis) sub[fa[u]]+=sub[u];
    For(u,1,n) if(u!=rt) ans[max(1,L[u])]+=sub[u],R[u]&&(ans[R[u]+1]-=sub[u]);
    For(i,2,n) ans[i]+=ans[i-1];
    For(i,1,n) cout<<tot-ans[i]-1<<' ';; cout<<'\n';
    return 0;
}

// START TYPING IF YOU DON'T KNOW WHAT TO DO
// STOP TYPING IF YOU DON'T KNOW WHAT YOU'RE DOING
// CONTINUE, NON-STOPPING, FOR CHARLIEVINNIE

// Started Coding On: October 30 Mon, 07 : 37 : 16

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6
1 6 3 2 5 4

output:

11 7 7 7 6 8 

result:

ok single line: '11 7 7 7 6 8 '

Test #2:

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

input:

2
1 2

output:

1 1 

result:

ok single line: '1 1 '

Test #3:

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

input:

36
9 29 1 3 14 31 24 21 10 18 22 16 8 7 15 12 17 19 25 28 27 34 11 6 32 4 20 13 2 35 23 26 33 36 30 5

output:

92 89 90 90 91 78 73 71 71 71 65 65 64 64 63 65 65 70 74 85 95 91 111 111 109 111 110 110 110 107 136 136 137 136 168 168 

result:

ok single line: '92 89 90 90 91 78 73 71 71 71 ...10 107 136 136 137 136 168 168 '

Test #4:

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

input:

63
30 17 34 8 29 57 2 62 35 27 24 22 54 53 60 37 31 19 1 5 20 14 3 36 38 40 56 39 50 32 51 9 15 52 55 45 63 41 6 47 23 7 33 10 26 61 16 58 43 42 44 48 28 12 49 11 59 4 21 25 46 13 18

output:

204 204 202 204 204 204 209 191 197 196 195 195 194 198 179 176 172 170 170 170 170 172 172 172 179 188 186 187 186 187 185 187 187 188 191 193 167 202 202 198 199 199 197 199 199 183 190 183 183 183 183 184 185 185 184 187 181 190 190 191 190 191 191 

result:

ok single line: '204 204 202 204 204 204 209 19...87 181 190 190 191 190 191 191 '

Test #5:

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

input:

110
70 59 102 66 81 43 31 26 52 23 88 49 9 7 76 108 25 101 89 73 4 22 77 94 64 24 16 58 47 30 28 45 68 15 84 36 21 78 56 46 32 62 65 55 61 20 74 2 83 33 105 110 50 60 85 42 96 98 6 10 41 51 97 8 72 86 69 93 82 67 100 57 75 1 106 11 40 35 17 39 18 14 34 53 92 12 54 3 95 103 99 80 5 27 37 29 63 13 90 ...

output:

386 386 377 379 375 375 374 374 373 376 372 377 376 376 376 344 359 344 341 339 339 339 340 323 325 324 324 322 321 320 320 320 321 329 315 322 322 313 314 313 313 313 314 317 316 317 316 320 319 331 331 306 357 357 357 358 358 352 354 354 355 356 352 353 353 353 354 353 354 354 352 365 364 365 350 ...

result:

ok single line: '386 386 377 379 375 375 374 37...87 387 386 386 385 389 388 407 '

Test #6:

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

input:

192
186 25 95 115 187 44 154 54 80 121 89 117 68 74 27 137 171 112 22 60 6 109 97 14 101 166 82 126 15 69 92 51 174 162 65 156 132 150 56 138 20 93 85 103 164 26 77 124 170 34 185 188 116 98 120 123 148 16 100 49 53 88 179 102 94 169 96 37 140 48 146 40 125 141 45 129 11 19 175 43 144 184 5 10 7 2 8...

output:

693 693 693 694 649 653 644 645 645 643 644 642 643 642 643 643 639 644 644 643 644 641 642 642 642 640 648 645 646 646 646 647 631 649 649 646 647 643 644 640 641 640 641 641 640 651 651 652 652 665 665 658 708 708 708 710 708 709 706 707 707 708 692 697 697 690 691 691 690 692 688 691 691 689 690 ...

result:

ok single line: '693 693 693 694 649 653 644 64...34 840 839 838 836 836 836 837 '

Test #7:

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

input:

336
3 269 28 151 303 89 230 218 88 70 150 254 173 87 75 247 293 310 32 250 45 276 233 257 315 126 128 104 181 14 11 152 268 258 334 299 109 122 278 226 251 277 98 21 36 67 39 163 259 188 241 326 170 147 153 48 201 246 238 145 162 49 91 192 13 191 59 236 165 167 202 34 210 312 220 194 234 330 282 183...

output:

1475 1473 1474 1474 1463 1467 1465 1463 1462 1462 1462 1460 1464 1463 1463 1463 1466 1470 1487 1486 1487 1485 1487 1487 1480 1504 1503 1504 1501 1502 1502 1502 1503 1508 1367 1396 1396 1396 1388 1389 1389 1382 1380 1380 1380 1380 1381 1381 1384 1387 1387 1365 1379 1379 1378 1379 1379 1376 1367 1367 ...

result:

ok single line: '1475 1473 1474 1474 1463 1467 ... 1426 1449 1449 1448 1486 1486 '

Test #8:

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

input:

588
114 95 54 22 424 384 47 439 9 60 331 317 361 454 86 123 79 417 96 240 208 310 26 113 339 498 291 141 425 169 492 177 191 567 260 279 514 63 27 421 229 482 36 183 326 118 35 426 456 367 55 245 222 287 362 167 533 84 46 313 365 571 464 221 281 503 180 163 522 289 404 548 110 350 159 147 57 323 211...

output:

2271 2270 2269 2269 2268 2271 2271 2266 2273 2273 2273 2274 2274 2267 2280 2279 2280 2273 2275 2274 2275 2273 2275 2275 2276 2274 2298 2298 2297 2299 2297 2300 2300 2275 2308 2308 2298 2298 2298 2297 2299 2292 2295 2295 2295 2295 2295 2295 2293 2291 2291 2290 2291 2291 2292 2294 2290 2309 2309 2309 ...

result:

ok single line: '2271 2270 2269 2269 2268 2271 ... 3252 3252 3252 3250 3252 3252 '

Test #9:

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

input:

1029
97 622 1025 939 297 294 590 710 36 75 492 654 729 722 933 672 194 471 647 456 917 561 356 683 1027 650 873 723 911 986 508 680 384 390 530 179 823 512 884 130 266 343 715 517 524 398 905 855 670 6 354 952 581 16 302 958 60 52 519 810 927 712 258 96 336 185 363 120 999 779 587 61 478 286 614 845...

output:

5001 5001 4992 4980 4979 4979 4979 4977 4979 4979 4980 4981 4981 4986 4979 4979 4979 4979 4979 4980 4977 4981 4981 4981 4835 4859 4858 4859 4859 4831 4833 4830 4831 4831 4831 4832 4831 4836 4831 4835 4835 4836 4835 4836 4835 4836 4835 4842 4840 4840 4840 4839 4846 4846 4846 4842 4849 4849 4849 4851 ...

result:

ok single line: '5001 5001 4992 4980 4979 4979 ... 5271 5271 5270 5270 5270 5270 '

Test #10:

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

input:

1800
766 1174 1086 920 844 1508 1276 441 919 16 1053 1661 1742 1363 1 773 755 1636 84 521 1595 86 1506 724 1375 698 271 800 1696 472 15 1458 542 1662 1343 53 168 917 931 1660 257 19 1084 1684 1597 617 1553 270 1691 1443 1540 410 952 594 963 664 1657 1232 1429 253 1473 905 304 678 515 993 1357 998 18...

output:

9797 9796 9796 9795 9795 9792 9793 9793 9792 9793 9793 9795 9723 9733 9733 9732 9733 9729 9733 9733 9731 9732 9729 9730 9727 9727 9727 9727 9705 9717 9717 9716 9718 9711 9710 9710 9710 9711 9712 9710 9714 9714 9714 9714 9723 9723 9722 9723 9713 9723 9719 9720 9719 9720 9719 9721 9707 9713 9712 9713 ...

result:

ok single line: '9797 9796 9796 9795 9795 9792 ... 9476 9480 9477 9480 9479 9479 '

Test #11:

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

input:

3150
2016 1004 1533 2983 2188 426 737 2057 889 194 2681 613 2955 2104 333 689 2999 1485 1701 1761 29 2888 2328 2642 1585 2730 971 2355 1359 1350 2083 2347 434 2534 1629 2931 1776 969 1323 136 1721 1627 1425 277 3068 1390 614 2370 834 1407 2849 1751 928 292 1637 231 1636 2809 2433 462 1509 191 848 30...

output:

16472 16472 16472 16464 16464 16464 16464 16464 16464 16464 16463 16469 16467 16470 16470 16470 16452 16468 16468 16468 16469 16460 16462 16461 16462 16454 16456 16452 16452 16452 16452 16453 16455 16454 16460 16457 16468 16468 16467 16468 16467 16468 16467 16467 16459 16502 16502 16500 16502 16502 ...

result:

ok single line: '16472 16472 16472 16464 16464 ... 18151 18151 18152 18152 18185 '

Test #12:

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

input:

5512
5122 249 4482 37 1130 342 4012 2911 3534 5000 4910 5329 1780 4651 2673 2255 2130 66 1916 1854 3186 633 4080 2088 4802 3713 3806 2500 2800 4847 1789 5071 3476 2972 2785 3228 95 3989 178 4714 3450 4936 5212 2442 5276 1168 2688 2515 3009 4173 3218 3292 2090 2854 129 391 4120 609 4027 2703 680 1141...

output:

34679 34679 34674 34675 34674 34675 34673 34675 34675 34675 34682 34626 34637 34628 34628 34626 34624 34624 34623 34624 34623 34629 34628 34635 34632 34643 34641 34642 34642 34642 34650 34640 34642 34641 34641 34640 34642 34641 34646 34645 34650 34650 34652 34664 34634 34638 34637 34638 34638 34632 ...

result:

ok single line: '34679 34679 34674 34675 34674 ... 34878 34894 34893 34894 34894 '

Test #13:

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

input:

2
2 1

output:

1 1 

result:

ok single line: '1 1 '

Test #14:

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

input:

9646
4083 1911 8250 7773 2595 5073 8165 8693 4036 236 4365 2065 7669 2442 3631 5796 5741 9047 1922 5503 7747 2031 4187 7895 3089 9381 3282 5635 7378 8720 7254 1678 3462 786 4569 7287 3388 5315 4446 9006 3062 3630 1182 7230 8481 7938 8114 1581 3290 4126 5330 2311 7929 227 1457 9607 7240 23 7008 8837 ...

output:

56216 56216 56212 56212 56212 56212 56213 56209 56215 56215 56214 56216 56213 56216 56216 56216 56217 56211 56228 56228 56227 56228 56228 56228 56231 56213 56238 56238 56239 56233 56230 56230 56229 56230 56230 56230 56235 56234 56235 56229 56239 56238 56239 56239 56235 56237 56230 56231 56231 56232 ...

result:

ok single line: '56216 56216 56212 56212 56212 ... 76814 76840 76840 76839 76841 '

Test #15:

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

input:

16880
2620 5517 15317 14624 3162 3872 16556 1032 12526 8373 5617 9938 2396 9520 5386 10125 14441 8334 3564 1734 14365 9674 4994 1584 8939 3039 9744 11195 1039 10794 14520 5616 7740 14885 2305 5122 2334 144 7635 14842 16058 225 8844 11893 10115 12681 7593 15281 10705 1275 11916 5855 10548 16245 3159 ...

output:

126395 126395 126394 126394 126394 126394 126346 126352 126345 126345 126345 126343 126345 126344 126345 126345 126340 126347 126346 126346 126338 126338 126337 126337 126336 126338 126338 126341 126345 126345 126344 126361 126361 126356 126371 126370 126370 126370 126370 126373 126368 126376 126376...

result:

ok single line: '126395 126395 126394 126394 12...78 109082 109095 109094 109095 '

Test #16:

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

input:

29540
21660 2028 12964 6138 24030 20445 10053 17204 20432 863 17996 13607 10819 11136 15689 9902 14559 17935 13982 16518 26375 3516 18377 15190 11520 18426 14397 21421 27432 13490 24097 2332 5574 1451 24688 28254 18558 25985 26192 29067 10134 15556 10078 11734 29033 18604 19513 12836 5044 24817 2381...

output:

225212 225212 225211 225212 225209 225209 225209 225209 225203 225204 225196 225195 225195 225195 225194 225197 225197 225196 225200 225200 225194 225214 225213 225213 225213 225212 225215 225215 225213 225241 225239 225240 225239 225240 225240 225241 225276 225276 225277 225271 225310 225308 225309...

result:

ok single line: '225212 225212 225211 225212 22...47 221047 221048 221048 221050 '

Test #17:

score: 0
Accepted
time: 9ms
memory: 19104kb

input:

51695
25757 46390 46936 35417 38407 50322 34131 45113 48067 40556 43162 38421 18517 22542 34293 39180 16755 38132 44939 5760 21027 4643 41258 22179 40253 14694 6659 18296 47470 19801 7302 45675 31360 9788 33220 33106 26159 28585 35811 13400 37315 18401 23221 22583 7530 47246 38366 49277 25080 50788 ...

output:

391066 391066 391065 391067 391067 391026 391031 391031 391002 391003 390997 390995 390995 390995 390996 390995 390999 390999 390995 391003 391002 391003 391000 391002 390999 390999 390999 390999 390984 390997 390997 390987 390988 390988 390986 390986 390986 390986 390986 390991 390989 390994 390993...

result:

ok single line: '391066 391066 391065 391067 39...84 498084 498083 498085 498085 '

Test #18:

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

input:

90466
29089 23465 25716 3629 50971 22470 48859 55467 72802 49276 70808 9377 69724 57726 69918 26033 4604 66193 155 79747 19849 11388 29639 38214 81901 33586 81767 22269 67108 89312 72587 12737 81405 36261 54036 73876 61084 5386 22093 90119 79588 64897 89069 64078 7067 80737 39378 39754 62061 17827 7...

output:

807940 807940 807939 807940 807938 807942 807942 807943 807946 807954 807949 807950 807949 807950 807947 807948 807948 807947 807949 807945 807963 807963 807963 807965 807964 807988 807986 807987 807987 807983 808011 808011 808008 808010 808010 808009 808008 808008 808008 807132 807170 807170 807094...

result:

ok single line: '807940 807940 807939 807940 80...89 689088 689090 689089 689092 '

Test #19:

score: 0
Accepted
time: 24ms
memory: 21832kb

input:

158315
62178 4434 123737 96786 81926 3922 34992 97731 98678 147622 91816 40832 48627 43111 90353 147554 16042 123199 84597 32319 94149 110323 30035 147659 145023 23971 17026 6722 23884 118418 92184 83560 150010 152570 45000 10337 53681 15818 105963 68507 62496 49670 48658 115914 86541 31751 49111 13...

output:

1277042 1277042 1277036 1277036 1277034 1277034 1277034 1277035 1277039 1277036 1277041 1277041 1277040 1277041 1277041 1277038 1277043 1277039 1277039 1277039 1277039 1277040 1277042 1277039 1277057 1277054 1277053 1277053 1277053 1277054 1277057 1277057 1277057 1277064 1277096 1277096 1277095 1277...

result:

ok single line: '1277042 1277042 1277036 127703...324395 1324393 1324395 1324395 '

Test #20:

score: 0
Accepted
time: 44ms
memory: 24180kb

input:

277051
132642 165514 158003 120016 153522 201662 226711 268617 145665 30979 192592 61026 240472 67380 68422 221783 201493 127374 264150 144250 18261 238987 40974 134787 244832 276228 98112 50224 206799 16649 247375 107624 213918 187954 34950 36807 255977 143136 97230 259959 247959 183983 78607 19162...

output:

2629197 2629195 2629194 2629194 2629194 2629195 2629200 2629191 2629197 2629197 2629196 2629198 2629195 2629198 2629198 2629198 2629198 2629198 2629192 2629198 2629198 2629196 2629198 2629198 2629199 2628422 2628446 2628446 2628445 2628447 2628445 2628448 2628446 2628445 2628445 2628445 2628445 2628...

result:

ok single line: '2629197 2629195 2629194 262919...279650 2279650 2279651 2279651 '

Test #21:

score: 0
Accepted
time: 43ms
memory: 23840kb

input:

262142
170465 225058 248463 155214 235457 208686 37676 172736 204107 181502 161769 171326 90738 123185 45301 109851 85505 229991 70616 250517 248629 171505 11331 90670 135216 250761 236384 141122 138348 108406 192420 74275 215952 113433 146716 115791 160655 178073 138620 184624 257945 206781 207559 ...

output:

2276751 2276751 2276747 2276749 2276736 2276734 2276734 2276734 2276733 2276731 2276731 2276728 2276729 2276727 2276728 2276727 2276728 2276727 2276739 2276738 2276754 2276751 2276751 2276751 2276752 2276748 2276762 2276761 2276760 2276760 2276759 2276762 2276755 2276759 2276758 2276759 2276759 2276...

result:

ok single line: '2276751 2276751 2276747 227674...369712 2369714 2369715 2369716 '

Test #22:

score: 0
Accepted
time: 44ms
memory: 23960kb

input:

262143
104690 24534 218732 138014 100511 185497 214245 5776 216429 169892 27467 176352 2259 215862 201935 4122 199348 66381 221330 249611 95524 167976 248902 109967 101818 202850 31715 139528 26578 224649 223222 235766 4443 156237 229678 41057 140361 110 111176 55338 177637 234749 64915 60304 104561...

output:

2198605 2198605 2198596 2198597 2198597 2198597 2198598 2198600 2198595 2198596 2198596 2198595 2198597 2198595 2198596 2198596 2198595 2198596 2198596 2198604 2198623 2198623 2198609 2198609 2198609 2198607 2198609 2198608 2198609 2198608 2198613 2198602 2198606 2198606 2198601 2198602 2198600 2198...

result:

ok single line: '2198605 2198605 2198596 219859...418295 2418295 2418296 2418302 '

Test #23:

score: 0
Accepted
time: 41ms
memory: 23900kb

input:

262144
214478 58333 173353 144219 144132 109974 63097 90872 34077 11764 139960 110695 198098 247191 49838 91097 195596 234166 23774 82368 198358 71750 201949 160648 129902 84496 86828 87893 84925 104692 63510 149545 31853 213266 97983 261204 134167 1134 182062 191913 46997 208182 136097 261055 13809...

output:

2138945 2138945 2138944 2138942 2138936 2138934 2138934 2138933 2138933 2138933 2138932 2138937 2138937 2138938 2138951 2138951 2138952 2138937 2138938 2138938 2138938 2138939 2138934 2138928 2138923 2138923 2138923 2138923 2138924 2138923 2138925 2138924 2138931 2138930 2138942 2138921 2138955 2138...

result:

ok single line: '2138945 2138945 2138944 213894...189651 2189655 2189654 2189655 '

Test #24:

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

input:

3
1 2 3

output:

2 2 3 

result:

ok single line: '2 2 3 '

Test #25:

score: 0
Accepted
time: 38ms
memory: 23852kb

input:

262145
137633 85042 78668 86888 164296 78818 99660 17023 138296 91902 105221 155594 20867 233386 178776 125453 34246 199388 14125 39335 69217 114560 123725 239648 170713 115499 199125 78683 131215 202159 157626 142536 231410 217134 236637 205948 241634 136331 200931 6891 156420 142217 131866 7713 52...

output:

2305742 2305741 2305741 2305741 2305736 2305740 2305739 2305740 2305738 2305740 2305740 2305740 2305744 2305736 2305748 2305747 2305747 2305742 2305745 2305745 2305746 2305747 2305748 2305738 2305760 2305760 2305758 2305760 2305760 2305760 2305763 2305763 2305762 2305766 2305765 2305769 2305758 2305...

result:

ok single line: '2305742 2305741 2305741 230574...379701 2379701 2379702 2379705 '

Test #26:

score: 0
Accepted
time: 45ms
memory: 24032kb

input:

262146
95481 247989 115902 154711 248737 186448 219360 126937 88912 176372 2585 128596 246976 112951 24632 206233 86616 13659 143536 66605 34933 52511 23503 199359 2880 57690 106624 8847 134687 215953 157186 116177 103855 152864 28824 132268 217119 83956 259046 113758 65655 93493 205000 176629 19493...

output:

2121755 2121753 2121754 2121754 2121730 2121734 2121730 2121730 2121730 2121728 2121730 2121730 2121707 2121712 2121712 2121701 2121702 2121702 2121700 2121700 2121700 2121699 2121700 2121695 2121701 2121701 2121701 2121702 2121702 2121702 2121713 2121712 2121712 2121710 2121712 2121712 2121712 2121...

result:

ok single line: '2121755 2121753 2121754 212175...411207 2411207 2411206 2411211 '

Test #27:

score: 0
Accepted
time: 47ms
memory: 24984kb

input:

299997
110211 290304 52567 198511 245392 79155 82217 279881 18934 203294 18871 20938 137230 160056 84518 55725 296273 94773 50586 275945 171481 249827 252924 163275 206989 58868 199567 71622 243840 190814 174920 106404 295338 277115 69484 270150 173661 120412 168097 12268 297280 200375 274813 49868 ...

output:

2752164 2752157 2752158 2752158 2752157 2752158 2752158 2752154 2752157 2752153 2752154 2752154 2752155 2752155 2752155 2752155 2752139 2752154 2752154 2752148 2752150 2752150 2752145 2752146 2752144 2752145 2752144 2752145 2752144 2752147 2752146 2752146 2752144 2752156 2752156 2752154 2752153 2752...

result:

ok single line: '2752164 2752157 2752158 275215...575943 2575943 2575944 2575948 '

Test #28:

score: 0
Accepted
time: 48ms
memory: 24756kb

input:

299998
240166 183171 165015 193616 65824 209177 42607 88749 4592 296562 272668 179523 255687 30360 269077 76531 167248 9030 281782 134643 201939 129347 40381 173669 80180 142144 37965 276710 122758 262376 132933 190340 161526 100139 109633 62702 34801 295282 34467 160410 162383 183881 58257 98179 70...

output:

2685242 2685241 2685241 2685240 2685242 2685240 2685243 2685242 2685243 2685202 2685206 2685206 2685205 2685206 2685204 2685206 2685205 2685206 2685196 2685204 2685200 2685200 2685200 2685198 2685200 2685199 2685200 2685197 2685204 2685202 2685203 2685201 2685200 2685200 2685199 2685199 2685199 2685...

result:

ok single line: '2685242 2685241 2685241 268524...777189 2777187 2777235 2777235 '

Test #29:

score: 0
Accepted
time: 44ms
memory: 25756kb

input:

299999
105930 212862 21071 157050 113702 184087 124574 231608 38277 25763 10690 19888 214129 181674 171613 45263 141098 231952 172852 251745 261985 141691 227700 53264 96105 48865 268621 155281 161558 288366 61371 280278 130126 273509 111673 245641 50661 130042 9204 266706 245914 238704 10493 1506 1...

output:

2499235 2499231 2499232 2499231 2499232 2499231 2499233 2499228 2499233 2499231 2499231 2499231 2499231 2499233 2499231 2499231 2499231 2499231 2499248 2499248 2499264 2499284 2499282 2499283 2499282 2499283 2499281 2499307 2499307 2499301 2499330 2499316 2499317 2499311 2499312 2499310 2499311 2499...

result:

ok single line: '2499235 2499231 2499232 249923...822032 2822032 2822032 2822032 '

Test #30:

score: 0
Accepted
time: 40ms
memory: 24744kb

input:

300000
163822 58989 16780 215522 20501 12024 236573 262652 178873 123608 194105 120608 172509 183878 42132 146797 116759 156880 20102 144103 213635 195920 182228 53103 146480 238295 262599 48890 211538 298143 271113 182177 37283 184583 218820 73054 179455 196972 111684 112927 64407 230534 17226 1417...

output:

2600523 2600522 2600522 2600521 2600523 2600523 2600523 2600509 2600515 2600515 2600510 2600512 2600512 2600508 2600509 2600508 2600509 2600507 2600509 2600509 2600509 2600518 2600516 2600516 2600516 2600517 2600527 2600532 2600532 2600498 2600513 2600512 2600512 2600512 2600510 2600512 2600512 2600...

result:

ok single line: '2600523 2600522 2600522 260052...632471 2632471 2632471 2632502 '

Test #31:

score: -100
Wrong Answer
time: 44ms
memory: 54876kb

input:

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

output:

-42949372961 -42949372961 -42949372960 -42949372958 -42949372955 -42949372951 -42949372946 -42949372940 -42949372933 -42949372925 -42949372916 -42949372906 -42949372895 -42949372883 -42949372870 -42949372856 -42949372841 -42949372825 -42949372808 -42949372790 -42949372771 -42949372751 -42949372730 -...

result:

wrong answer 1st lines differ - expected: '299999 299999 300000 300002 30...9250005 44999550002 44999850000', found: '-42949372961 -42949372961 -429...49577045 2049877042 2050177040 '