QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#485312#2687. Free WeightsstoccfAC ✓152ms11548kbC++142.2kb2024-07-20 16:13:542024-07-20 16:13:54

詳細信息

Test #1:

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

input:

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

output:

10

result:

ok single line: '10'

Test #2:

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

input:

3
1 1 10000000
10000000 2 2

output:

10000000

result:

ok single line: '10000000'

Test #3:

score: 0
Accepted
time: 65ms
memory: 11532kb

input:

1000000
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 ...

output:

1000000

result:

ok single line: '1000000'

Test #4:

score: 0
Accepted
time: 60ms
memory: 11492kb

input:

1000000
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 ...

output:

999999

result:

ok single line: '999999'

Test #5:

score: 0
Accepted
time: 64ms
memory: 11468kb

input:

1000000
500000 499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960 49995...

output:

999999

result:

ok single line: '999999'

Test #6:

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

input:

100
81 67 92 1 49 69 86 51 41 7 38 81 65 70 72 78 79 11 47 37 38 22 11 56 34 36 90 63 61 5 51 58 12 83 97 17 2 48 31 63 39 86 87 71 85 93 34 13 88 42 66 58 40 15 15 18 56 7 61 80 3 76 91 50 99 32 71 26 54 40 84 75 19 25 55 31 23 68 21 6 44 39 28 36 90 32 100 4 96 98 23 28 16 64 57 20 46 9 5 54
33 35...

output:

100

result:

ok single line: '100'

Test #7:

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

input:

1000
946 102 538 157 206 987 922 25 655 571 60 136 14 98 172 683 331 343 872 68 639 685 277 376 642 819 271 218 936 505 143 789 188 58 110 847 36 970 379 123 879 682 768 344 387 63 957 956 20 29 325 244 185 937 790 842 273 524 200 901 434 800 772 259 173 147 111 243 803 263 618 639 202 868 115 225 2...

output:

999

result:

ok single line: '999'

Test #8:

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

input:

10000
2788 7694 9260 4089 5218 9289 5512 9105 397 9610 3577 1039 9956 6129 4911 8375 401 7997 4094 2497 9979 185 7559 1104 8511 1969 9038 4080 4169 7061 9404 8758 5400 8817 3978 1056 9400 7113 5075 7439 5625 9304 6205 6965 1953 473 5694 1696 6744 104 5990 281 2825 9104 9877 5324 5430 9536 6227 3181 ...

output:

10000

result:

ok single line: '10000'

Test #9:

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

input:

10000
1 10 100 1000 10000 1 10 100 1000 10000 2 20 200 2000 2 20 200 2000 3 30 300 3000 3 30 300 3000 4 40 400 4000 4 40 400 4000 5 50 500 5000 5 50 500 5000 6 60 600 6000 6 60 600 6000 7 70 700 7000 7 70 700 7000 8 80 800 8000 8 80 800 8000 9 90 900 9000 9 90 900 9000 11 110 1100 11 110 1100 21 210...

output:

9473

result:

ok single line: '9473'

Test #10:

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

input:

10000
1 10 100 1000 10000 1 10 100 1000 10000 2 20 200 2000 2 20 200 2000 3 30 300 3000 3 30 300 3000 4 40 400 4000 4 40 400 4000 5 50 500 5000 5 50 500 5000 6 60 600 6000 6 60 600 6000 7 70 700 7000 7 70 700 7000 8 80 800 8000 8 80 800 8000 9 90 900 9000 9 90 900 9000 11 110 1100 11 110 1100 21 210...

output:

9589

result:

ok single line: '9589'

Test #11:

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

input:

1
70
70

output:

70

result:

ok single line: '70'

Test #12:

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

input:

10
948605778 948605778 892433345 892433345 83550677 83550677 592027227 592027227 423747409 530088011
423747409 130302942 530088011 130302942 191997158 191997158 444573574 444573574 221039174 221039174

output:

530088011

result:

ok single line: '530088011'

Test #13:

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

input:

69
620991456 620991456 970735228 970735228 362792519 362792519 759786613 759786613 368683815 368683815 572046782 660532110 572046782 660532110 314391111 314391111 85736125 85736125 474066423 717914004 474066423 717914004 590609698 447451560 590609698 447451560 642378466 182029216 642378466 182029216...

output:

933578130

result:

ok single line: '933578130'

Test #14:

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

input:

368
86390609 898753494 86390609 898753494 876616114 863464072 876616114 863464072 497806485 673366677 776948229 497806485 776948229 673366677 605073552 319648865 291626675 605073552 291626675 349380172 319648865 349380172 302171754 959702693 302171754 959702693 387550221 341276975 341276975 41955945...

output:

981340689

result:

ok single line: '981340689'

Test #15:

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

input:

1498
287430983 287430983 435721775 435721775 674539068 968610859 674539068 968610859 876497393 876497393 63108541 128667967 63108541 128667967 651586461 651586461 207152999 207152999 583535449 583535449 509206261 509206261 544952601 544952601 349131619 349131619 910285687 293455937 910285687 2934559...

output:

900038550

result:

ok single line: '900038550'

Test #16:

score: 0
Accepted
time: 5ms
memory: 7876kb

input:

54066
65113292 65113292 793916212 328662764 793916212 73766496 328662764 73766496 566789119 324249030 324249030 82603138 566789119 71047560 754158986 82603138 71047560 316953297 754158986 381839267 316953297 381839267 719934283 910650796 719934283 821446316 910650796 121433 821446316 908398507 12143...

output:

994620821

result:

ok single line: '994620821'

Test #17:

score: 0
Accepted
time: 31ms
memory: 10964kb

input:

435700
491908644 491908644 148621618 148621618 815317077 815317077 989163380 989163380 33325571 442028505 442028505 33325571 722902707 722902707 317505249 795720467 514706931 795720467 317505249 615227748 615227748 113236475 514706931 113236475 593943122 593943122 634095563 672614375 634095563 67261...

output:

998215663

result:

ok single line: '998215663'

Test #18:

score: 0
Accepted
time: 94ms
memory: 11544kb

input:

1000000
184858142 184858142 731601917 731601917 197072682 197072682 186175199 186175199 813819370 813819370 69524371 69524371 315988823 315988823 354104008 354104008 75885981 75885981 681153337 681153337 685329938 685329938 592238922 592238922 792320331 792320331 396525409 396525409 169079004 169079...

output:

0

result:

ok single line: '0'

Test #19:

score: 0
Accepted
time: 67ms
memory: 11528kb

input:

1000000
999000000 999000001 999000002 999000003 999000004 999000005 999000006 999000007 999000008 999000009 999000010 999000011 999000012 999000013 999000014 999000015 999000016 999000017 999000018 999000019 999000020 999000021 999000022 999000023 999000024 999000025 999000026 999000027 999000028 99...

output:

999999999

result:

ok single line: '999999999'

Test #20:

score: 0
Accepted
time: 152ms
memory: 11396kb

input:

1000000
257434934 257434934 670452436 670452436 78184994 78184994 837969523 837969523 795968834 795968834 41510943 41510943 397355462 397355462 1756079 1756079 346342594 346342594 232693967 232693967 389987038 389987038 705358941 705358941 737665765 737665765 930847010 930847010 930275216 930275216 ...

output:

619329679

result:

ok single line: '619329679'

Test #21:

score: 0
Accepted
time: 74ms
memory: 11548kb

input:

1000000
390548901 390548901 622904785 622904785 395041514 395041514 187635190 187635190 81826456 81826456 570299137 570299137 974106686 974106686 577954698 577954698 267338684 267338684 502998849 502998849 856070957 856070957 797588712 797588712 688171043 688171043 323942457 323942457 568459076 5684...

output:

995206858

result:

ok single line: '995206858'

Test #22:

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

input:

1
1000000000
1000000000

output:

1000000000

result:

ok single line: '1000000000'

Test #23:

score: 0
Accepted
time: 72ms
memory: 11468kb

input:

1000000
37331301 37331301 257356000 257356000 615715936 615715936 803299485 202727340 803299485 202727340 366008693 890787359 366008693 890787359 398041103 586418578 398041103 563492315 586418578 976278361 976278361 572374613 563492315 572374613 331043762 831686305 831686305 331043762 846166573 9611...

output:

996992319

result:

ok single line: '996992319'

Test #24:

score: 0
Accepted
time: 64ms
memory: 11548kb

input:

1000000
884807193 344080492 667284414 278584042 101597323 344080492 957610091 982986976 370973790 957610091 667284414 389721991 278584042 564811517 564811517 506912634 269574940 884807193 101597323 67015469 451451543 67015469 299411145 71208822 269574940 389721991 419087060 982986976 674135970 29941...

output:

999718807

result:

ok single line: '999718807'

Test #25:

score: 0
Accepted
time: 117ms
memory: 11536kb

input:

1000000
366684916 366684916 653705539 653705539 329683981 329683981 756107865 756107865 333111988 333111988 335736291 335736291 371965454 371965454 339665361 339665361 356448140 356448140 182752894 182752894 377096516 377096516 26976942 26976942 433620630 433620630 180533750 180533750 553947362 5539...

output:

488494594

result:

ok single line: '488494594'

Test #26:

score: 0
Accepted
time: 68ms
memory: 11468kb

input:

1000000
307687747 307687747 852626695 852626695 592051934 592051934 462961893 462961893 881696015 881696015 497067214 497067214 595695607 595695607 809820587 809820587 643797457 643797457 263880459 263880459 690430743 690430743 850726975 850726975 223824740 223824740 348303279 348303279 684584619 68...

output:

999640960

result:

ok single line: '999640960'

Test #27:

score: 0
Accepted
time: 67ms
memory: 11400kb

input:

1000000
111435081 111435081 138783247 138783247 706197252 706197252 302256375 302256375 33997371 33997371 693257206 693257206 822519837 822519837 293951579 293951579 789273934 789273934 668036602 668036602 998976462 998976462 518149506 518149506 162240643 162240643 190970608 190970608 641717506 6417...

output:

995910223

result:

ok single line: '995910223'