QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#421235#8645. Growing Vegetables is Fun 5egypt_ioi2024_10#30 167ms35472kbC++20794b2024-05-25 15:47:312024-05-25 15:47:32

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 1ms
memory: 3628kb

input:

5
71039844 102827355 217531548 220229557 237972610 314010999 309303025 282414480 227324750 127910276
355992665 573821998 974848115 193721993 786455947
602158296 281786121 321727541 140763116 455641294

output:

660837116

result:

ok single line: '660837116'

Test #2:

score: 4
Accepted
time: 0ms
memory: 3856kb

input:

4
1705 9199 9245 9297 9785 8486 3596 2031
356 2834 9555 4667
1881 4772 9778 4863

output:

4427

result:

ok single line: '4427'

Test #3:

score: 4
Accepted
time: 0ms
memory: 3568kb

input:

3
1 1 1 1 1 1
6 4 7
4 2 6

output:

6

result:

ok single line: '6'

Test #4:

score: 4
Accepted
time: 1ms
memory: 3572kb

input:

2
2 2 10 6
9 2
9 2

output:

3

result:

ok single line: '3'

Test #5:

score: 4
Accepted
time: 0ms
memory: 3624kb

input:

1
349142605 778700270
168051580
502698453

output:

276001817

result:

ok single line: '276001817'

Test #6:

score: 4
Accepted
time: 1ms
memory: 3620kb

input:

5
17 17 18 18 19 20 19 19 18 17
16 21 17 15 22
16 15 12 17 19

output:

5

result:

ok single line: '5'

Test #7:

score: 4
Accepted
time: 1ms
memory: 3568kb

input:

5
4 7 8 8 9 9 8 5 5 4
8 5 6 6 9
7 7 8 1 7

output:

3

result:

ok single line: '3'

Test #8:

score: 4
Accepted
time: 0ms
memory: 3544kb

input:

4
6 7 8 8 10 10 8 7
10 9 4 6
6 6 8 7

output:

2

result:

ok single line: '2'

Test #9:

score: 4
Accepted
time: 1ms
memory: 3860kb

input:

5
1 285389468 292069311 556395360 725450787 931668868 448264980 368730609 214990111 201747487
1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000

output:

999999999

result:

ok single line: '999999999'

Test #10:

score: 4
Accepted
time: 1ms
memory: 3620kb

input:

5
662886918 684753078 783767220 920694140 923464013 1000000000 885337163 779952619 739901312 687764518
1 1 1 1 1
1 1 1 1 1

output:

999999999

result:

ok single line: '999999999'

Test #11:

score: 4
Accepted
time: 0ms
memory: 3860kb

input:

5
463408857 467609229 473997928 477395329 481525188 519068288 507259005 493795251 483097019 477045791
467609229 481525188 463408857 477395329 473997928
483097019 493795251 507259005 519068288 477045791

output:

0

result:

ok single line: '0'

Test #12:

score: 4
Accepted
time: 0ms
memory: 3620kb

input:

3
1 3 5 6 4 2
2 3 4
5 6 7

output:

1

result:

ok single line: '1'

Subtask #2:

score: 5
Accepted

Dependency #1:

100%
Accepted

Test #13:

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

input:

10
773135427 774332767 785123517 817394834 818143902 821137578 833844052 845124168 848733309 857691141 862029826 854157076 847018323 843060840 826855175 800318737 796404138 789256510 783695157 776861639
403498898 659393782 937645583 797482218 969577314 91539882 712627349 314393029 277704717 44148171...

output:

748030905

result:

ok single line: '748030905'

Test #14:

score: 5
Accepted
time: 1ms
memory: 3616kb

input:

9
2058 3355 3467 4778 5458 5969 6041 6118 7343 8215 8122 6915 6167 6012 5563 4897 4206 2499
4946 4522 9879 3499 4152 4279 3059 3530 7545
5485 9668 3847 1946 2897 5648 3124 8377 9390

output:

2259

result:

ok single line: '2259'

Test #15:

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

input:

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

output:

2

result:

ok single line: '2'

Test #16:

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

input:

10
28 29 31 31 33 34 37 37 39 40 50 49 48 42 39 34 33 30 29 28
34 34 26 29 35 32 32 23 31 33
47 40 38 50 47 41 44 40 30 30

output:

5

result:

ok single line: '5'

Test #17:

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

input:

10
2 4 6 7 10 12 14 17 19 21 21 20 16 12 12 11 10 9 6 5
6 16 21 2 5 8 10 12 14 15
2 16 4 3 20 13 13 18 3 19

output:

4

result:

ok single line: '4'

Test #18:

score: 5
Accepted
time: 1ms
memory: 3784kb

input:

9
1 1 1 2 2 3 3 3 5 5 4 3 3 3 2 2 2 1
5 1 8 8 1 3 1 1 2
2 2 1 3 1 4 2 5 5

output:

3

result:

ok single line: '3'

Test #19:

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

input:

8
15 15 15 16 16 17 18 19 19 18 17 17 17 17 16 15
11 12 24 13 22 15 13 15
11 21 21 14 9 16 17 18

output:

6

result:

ok single line: '6'

Test #20:

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

input:

10
1 13280914 96613242 127812270 158437352 259641463 436482346 505230087 549623141 554037556 590408520 388492212 334223975 312683258 264691487 217880860 193182063 174018234 171453258 147939223
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000000...

output:

999999999

result:

ok single line: '999999999'

Test #21:

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

input:

10
326424629 353378674 597744285 634314932 677996941 757848432 769253696 942511855 949304023 988319620 1000000000 868204345 842188353 821725662 716151066 631684281 559658741 511768003 456818334 357276475
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

output:

999999999

result:

ok single line: '999999999'

Test #22:

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

input:

10
57143744 133393297 398910072 401484623 474217555 757601927 774658022 800636343 849390123 876553996 920840636 769125109 719072497 523840378 481733548 355770208 344383282 310868559 234051801 173516705
133393297 474217555 173516705 234051801 398910072 57143744 310868559 757601927 344383282 401484623...

output:

0

result:

ok single line: '0'

Test #23:

score: 5
Accepted
time: 1ms
memory: 3628kb

input:

10
63403651 210510858 210510858 210510858 210510858 210510858 210510858 210510858 210510858 210510858 225130956 210510858 210510858 210510858 210510858 210510858 210510858 210510858 210510858 210510858
236486230 236486230 236486230 236486230 236486230 89379023 236486230 236486230 236486230 236486230...

output:

25975372

result:

ok single line: '25975372'

Test #24:

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

input:

10
1 3 5 7 9 11 13 15 17 19 20 18 16 14 12 10 8 6 4 2
2 3 4 5 6 7 8 9 10 11
12 13 14 15 16 17 18 19 20 21

output:

1

result:

ok single line: '1'

Test #25:

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

input:

9
1 3 5 7 9 11 13 15 17 18 16 14 12 10 8 6 4 2
2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19

output:

1

result:

ok single line: '1'

Subtask #3:

score: 21
Accepted

Dependency #2:

100%
Accepted

Test #26:

score: 21
Accepted
time: 154ms
memory: 35364kb

input:

2000
190093831 190101306 190130208 190130264 190130464 190142913 190155510 190186226 190187425 190239978 190246876 190313521 190318845 190368652 190389086 190397011 190398293 190400652 190406542 190410139 190449447 190459539 190491822 190510982 190539531 190561710 190579926 190592705 190592734 19059...

output:

768578381

result:

ok single line: '768578381'

Test #27:

score: 21
Accepted
time: 153ms
memory: 35360kb

input:

2000
330367 330422 330476 330535 330735 331208 331362 331437 331560 331800 332021 332053 332069 332174 332283 332359 332441 332478 332598 332682 332765 333155 333207 333367 333743 334103 334346 334637 335113 335124 335392 335481 335720 335808 335841 335909 336397 336553 336605 337089 337300 337645 3...

output:

361152

result:

ok single line: '361152'

Test #28:

score: 21
Accepted
time: 89ms
memory: 35408kb

input:

1999
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 1...

output:

36

result:

ok single line: '36'

Test #29:

score: 21
Accepted
time: 1ms
memory: 3744kb

input:

100
17 17 17 18 18 18 18 20 20 20 21 21 21 23 23 24 24 25 25 25 26 26 26 26 26 26 27 27 28 28 28 28 28 29 29 29 30 30 31 33 33 34 35 35 36 36 37 37 38 38 38 39 39 39 39 39 39 40 40 40 40 40 41 41 41 41 42 42 42 42 42 44 45 46 46 46 47 47 47 48 48 48 48 48 49 49 49 50 50 50 51 52 52 52 53 53 53 53 54...

output:

45

result:

ok single line: '45'

Test #30:

score: 21
Accepted
time: 158ms
memory: 35396kb

input:

2000
350843244 350878017 350923036 351063064 351209654 351211808 351254174 351613048 352015188 352553488 352624700 352652270 352679713 352932525 353197312 353246919 353252277 353271126 353457632 353602903 353783914 353850160 354018331 354311288 354648146 354913061 355167810 355196919 355347509 35544...

output:

31621

result:

ok single line: '31621'

Test #31:

score: 21
Accepted
time: 159ms
memory: 35392kb

input:

1999
43596 43600 43606 43623 43653 43668 43706 43737 43794 43795 43814 43827 43828 43830 43843 43851 43866 43874 43884 43921 43938 43957 43958 44031 44040 44060 44061 44072 44075 44075 44102 44141 44142 44158 44167 44179 44221 44224 44232 44253 44264 44279 44280 44297 44304 44308 44310 44331 44350 4...

output:

244

result:

ok single line: '244'

Test #32:

score: 21
Accepted
time: 33ms
memory: 11724kb

input:

1001
6315 6315 6316 6316 6316 6316 6317 6317 6317 6317 6317 6318 6318 6318 6318 6318 6318 6318 6319 6319 6319 6319 6320 6320 6322 6322 6322 6323 6323 6325 6325 6325 6326 6326 6326 6326 6327 6327 6328 6328 6328 6328 6329 6329 6330 6330 6330 6330 6331 6331 6332 6332 6332 6332 6333 6333 6333 6333 6334 ...

output:

98

result:

ok single line: '98'

Test #33:

score: 21
Accepted
time: 10ms
memory: 5908kb

input:

500
259 259 259 266 269 270 272 274 274 276 276 282 286 286 289 289 290 291 293 295 297 297 299 300 301 303 303 307 307 308 310 310 311 312 314 314 317 317 318 321 322 323 324 326 327 329 330 330 330 330 331 332 333 333 334 336 338 338 339 340 340 342 346 352 353 355 356 356 360 360 361 362 362 362 ...

output:

26

result:

ok single line: '26'

Test #34:

score: 21
Accepted
time: 167ms
memory: 35332kb

input:

2000
1 60 72859 154827 236884 325052 436400 473708 549118 808443 833282 932599 973136 1129201 1147009 1192152 1452828 1468248 1582413 1600307 1674529 1677758 1724718 1747870 1757548 1813461 1874237 2024621 2187224 2213059 2291067 2296273 2392518 2416236 2478154 2524630 2592789 2630087 2689614 273165...

output:

999999999

result:

ok single line: '999999999'

Test #35:

score: 21
Accepted
time: 153ms
memory: 35400kb

input:

1998
133393383 133932583 134243854 134551224 134843355 135608488 136534290 136614639 136967781 136996872 137191496 137324480 137515794 137853863 138077590 138098732 138578175 138662365 139574744 139790753 139991134 140269877 141046757 141283120 141291469 141550391 141812143 142528647 143114802 14381...

output:

999999999

result:

ok single line: '999999999'

Test #36:

score: 21
Accepted
time: 167ms
memory: 35276kb

input:

2000
12508505 13182646 13817037 13971021 14561541 14977589 15006750 15065860 15185281 15330435 15344599 15896759 16096817 16123555 16226379 16404245 16454896 16918885 17316938 17615566 17928228 18112068 18317986 18362964 18446475 18595621 18909471 19078393 19268167 19486182 19595497 21078646 2161024...

output:

0

result:

ok single line: '0'

Test #37:

score: 21
Accepted
time: 77ms
memory: 35344kb

input:

2000
100727793 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 144308464 14430...

output:

17421808

result:

ok single line: '17421808'

Test #38:

score: 21
Accepted
time: 82ms
memory: 35400kb

input:

1998
32025041 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 42353890 4235389...

output:

150822514

result:

ok single line: '150822514'

Test #39:

score: 21
Accepted
time: 103ms
memory: 35296kb

input:

1999
505492694 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 511367919 528448976 528448976 528448976 52844...

output:

281897757

result:

ok single line: '281897757'

Test #40:

score: 21
Accepted
time: 150ms
memory: 35472kb

input:

1999
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

output:

1

result:

ok single line: '1'

Subtask #4:

score: 0
Time Limit Exceeded

Test #41:

score: 0
Time Limit Exceeded

input:

300000
619 2319 3493 3715 4353 4926 8022 14367 18919 23666 25565 25582 27245 27303 28880 29568 29918 31815 34986 36861 40022 40147 47041 52120 55624 57816 58553 59319 60056 63512 66442 68907 68915 69471 69714 71129 76758 76761 77220 78196 84558 87950 88697 88782 89810 90113 92091 95040 97273 99148 1...

output:


result:


Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%