QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#48269#3964. Junior price robotHuangHanShengAC ✓37ms4800kbC++17375b2022-09-12 17:11:482022-09-12 17:11:51

详细

Test #1:

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

input:

6
9 10 11 9 12 11

output:

3

result:

ok single line: '3'

Test #2:

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

input:

3
1 2 3

output:

infinity

result:

ok single line: 'infinity'

Test #3:

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

input:

19
2 1 3 1 4 4 4 4 2 1 4 1 4 4 1 4 3 2 1

output:

1

result:

ok single line: '1'

Test #4:

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

input:

19
2 3 3 12 6 10 9 7 2 19 6 14 13 17 12 18 15 17 9

output:

8

result:

ok single line: '8'

Test #5:

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

input:

19
249524 621430 570666 136759 387927 960438 633257 497082 656116 609068 68712 635018 13808 952966 878150 492026 271953 577540 245714

output:

3

result:

ok single line: '3'

Test #6:

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

input:

17
4 5 2 7 8 3 2 2 1 2 2 3 8 7 2 5 4

output:

2

result:

ok single line: '2'

Test #7:

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

input:

19
653160 267854 777821 375952 833821 723986 988231 882389 775840 683705 967128 555788 30415 881169 488241 813652 989182 261151 680500

output:

1

result:

ok single line: '1'

Test #8:

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

input:

17
831878 601694 861882 84484 508596 799243 274331 38612 474 38612 274331 799243 508596 84484 861882 601694 831878

output:

1

result:

ok single line: '1'

Test #9:

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

input:

19
999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999

output:

1

result:

ok single line: '1'

Test #10:

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

input:

19
8 12 13 5 7 2 3 5 8 17 7 13 1 15 16 15 13 16 19

output:

3

result:

ok single line: '3'

Test #11:

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

input:

19
485499 643003 391446 280111 145270 195188 908656 709513 6748 354761 527206 486248 941934 634073 84741 350250 581195 981872 646605

output:

2

result:

ok single line: '2'

Test #12:

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

input:

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

output:

infinity

result:

ok single line: 'infinity'

Test #13:

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

input:

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

output:

1

result:

ok single line: '1'

Test #14:

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

input:

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

output:

16

result:

ok single line: '16'

Test #15:

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

input:

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

output:

1

result:

ok single line: '1'

Test #16:

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

input:

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

output:

7

result:

ok single line: '7'

Test #17:

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

input:

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

output:

1

result:

ok single line: '1'

Test #18:

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

input:

17
3 5 6 6 8 7 1 8 3 1 8 7 5 6 5 4 2

output:

6

result:

ok single line: '6'

Test #19:

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

input:

17
4 2 9 8 7 5 7 4 1 2 4 7 8 8 2 1 3

output:

1

result:

ok single line: '1'

Test #20:

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

input:

18
5 5 9 9 9 1 4 5 4 7 7 9 9 9 2 1 4 7

output:

1

result:

ok single line: '1'

Test #21:

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

input:

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

output:

2

result:

ok single line: '2'

Test #22:

score: 0
Accepted
time: 22ms
memory: 4652kb

input:

400000
2 3 1 3 2 1 4 4 1 1 2 3 4 4 4 2 2 3 3 3 4 1 4 4 1 2 2 1 2 1 1 2 3 3 3 3 2 1 1 3 2 2 2 1 1 3 3 2 3 4 2 3 4 2 2 4 1 2 4 3 2 1 1 2 4 2 2 1 1 3 1 3 4 4 1 2 1 4 3 1 1 1 1 3 3 1 3 1 1 2 2 1 2 1 2 3 2 4 3 1 4 1 2 2 2 2 1 3 2 4 2 1 4 4 1 2 2 3 4 1 3 2 3 3 2 1 1 3 1 4 3 3 4 4 1 1 4 2 1 1 3 1 2 3 3 1 1...

output:

2

result:

ok single line: '2'

Test #23:

score: 0
Accepted
time: 28ms
memory: 4712kb

input:

400000
86482 219150 361637 219169 332923 147460 251187 113254 248852 268675 96250 264810 276588 123762 1668 7404 194536 306899 224496 36315 75981 393909 121768 122000 363814 22196 229039 387286 213265 322904 231652 17863 172454 283194 260861 363812 60718 340167 193173 12177 81167 388509 46381 65472 ...

output:

14

result:

ok single line: '14'

Test #24:

score: 0
Accepted
time: 14ms
memory: 4756kb

input:

400000
951440 147188 254403 24764 642869 468854 193204 736053 126450 775520 683065 921306 362435 831077 932762 83527 242999 282346 52074 334970 630344 187838 977365 578813 718548 768741 968727 450900 742513 926507 50794 605180 924181 22355 618195 276796 325773 441995 199369 189301 891089 116988 6111...

output:

1

result:

ok single line: '1'

Test #25:

score: 0
Accepted
time: 14ms
memory: 4724kb

input:

399999
76000 21903 4477 155197 80412 111083 99402 138960 93869 34159 190305 50331 70093 116543 3690 57945 162572 119285 6493 27761 22486 186125 130611 110428 5133 134384 164539 192469 113062 94109 15088 53904 9257 154436 96759 172468 45071 162790 56635 192732 95104 148251 199174 96649 149959 73735 1...

output:

1

result:

ok single line: '1'

Test #26:

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

input:

400000
746946 401459 880594 611088 191462 228871 175458 203524 177602 703476 714764 96246 740175 794545 158650 845555 740887 297137 759641 966976 803150 13330 462819 490483 907829 756054 666032 121209 29539 542004 176844 515176 775055 886273 465786 714975 319398 524036 999326 89254 720613 797501 266...

output:

1

result:

ok single line: '1'

Test #27:

score: 0
Accepted
time: 37ms
memory: 4652kb

input:

399999
395274 805817 971809 884513 884419 16084 224444 976197 914053 319556 667379 496576 44452 899724 999264 794175 268104 36407 320761 592171 444681 100822 617102 900340 130435 603873 720034 764390 872668 206711 537206 833053 991155 655339 330830 864879 963205 189729 575444 376101 538699 492196 55...

output:

5

result:

ok single line: '5'

Test #28:

score: 0
Accepted
time: 28ms
memory: 4652kb

input:

400000
999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999 999999...

output:

1

result:

ok single line: '1'

Test #29:

score: 0
Accepted
time: 35ms
memory: 4796kb

input:

400000
340000 251597 367720 145343 149934 102972 38771 34273 133382 282887 174623 132600 195232 211237 96121 129939 125740 257515 37402 382594 334268 300417 343008 41279 320233 222935 219104 388062 27637 344735 230416 183350 6346 336986 250878 132613 72105 321098 177122 319827 340952 119261 369229 2...

output:

1

result:

ok single line: '1'

Test #30:

score: 0
Accepted
time: 27ms
memory: 4796kb

input:

400000
118445 778415 137209 572162 626274 746683 186695 237405 138933 668923 486643 800753 437852 221168 223692 151327 410704 170786 883178 137471 635859 196699 211003 29147 426770 251540 72923 99600 440815 941498 329835 730363 865401 135726 184960 947913 978186 531055 544973 724120 758000 694386 83...

output:

23

result:

ok single line: '23'

Test #31:

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

input:

400000
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:

infinity

result:

ok single line: 'infinity'

Test #32:

score: 0
Accepted
time: 26ms
memory: 4672kb

input:

400000
400000 399999 399998 399997 399996 399995 399994 399993 399992 399991 399990 399989 399988 399987 399986 399985 399984 399983 399982 399981 399980 399979 399978 399977 399976 399975 399974 399973 399972 399971 399970 399969 399968 399967 399966 399965 399964 399963 399962 399961 399960 399959...

output:

1

result:

ok single line: '1'

Test #33:

score: 0
Accepted
time: 25ms
memory: 4796kb

input:

399999
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:

399998

result:

ok single line: '399998'

Test #34:

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

input:

399999
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959...

output:

1

result:

ok single line: '1'

Test #35:

score: 0
Accepted
time: 26ms
memory: 4800kb

input:

400000
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 101 1...

output:

199998

result:

ok single line: '199998'

Test #36:

score: 0
Accepted
time: 28ms
memory: 4728kb

input:

400000
2 1 200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 19...

output:

1

result:

ok single line: '1'

Test #37:

score: 0
Accepted
time: 34ms
memory: 4648kb

input:

399999
5 4 4 6 6 8 10 10 13 10 15 14 15 18 15 18 17 22 19 20 24 24 23 26 28 26 27 29 31 30 32 34 34 38 35 39 39 38 41 41 45 42 44 48 48 49 49 51 53 53 51 54 57 57 59 60 57 58 61 64 64 62 63 67 68 67 70 71 69 72 75 73 74 78 76 76 77 78 79 81 81 83 86 88 89 86 90 92 90 94 93 96 96 97 95 99 101 102 101...

output:

1

result:

ok single line: '1'

Test #38:

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

input:

399999
2 199999 199998 199999 199996 199995 199998 199994 199993 199993 199993 199991 199992 199989 199990 199985 199988 199986 199985 199984 199982 199982 199979 199980 199977 199975 199978 199976 199973 199975 199972 199970 199971 199971 199968 199969 199965 199963 199966 199964 199963 199960 1999...

output:

399995

result:

ok single line: '399995'

Test #39:

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

input:

400000
8 5 10 11 8 11 13 15 12 16 18 17 19 20 21 20 20 21 25 23 28 27 28 30 32 33 32 35 32 37 38 36 40 40 38 39 40 45 44 43 48 46 46 49 50 53 51 51 52 54 56 56 60 59 62 59 62 63 63 66 65 66 68 71 68 72 73 71 76 73 76 76 76 80 79 81 82 81 82 84 84 89 87 91 89 93 92 94 92 97 95 99 98 98 99 99 101 104 ...

output:

1

result:

ok single line: '1'

Test #40:

score: 0
Accepted
time: 34ms
memory: 4760kb

input:

400000
6 5 1 200000 1 1 199999 199996 199999 199995 199997 199994 199993 199992 199991 199992 199989 199989 199989 199987 199984 199986 199981 199984 199982 199979 199980 199980 199976 199974 199976 199974 199975 199974 199973 199968 199968 199969 199965 199966 199963 199963 199964 199960 199959 199...

output:

1

result:

ok single line: '1'

Test #41:

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

input:

9
1 2 3 4 5 6 7 8 9

output:

infinity

result:

ok single line: 'infinity'

Test #42:

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

input:

2
0 0

output:

1

result:

ok single line: '1'

Test #43:

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

input:

5
7 8 9 8 7

output:

4

result:

ok single line: '4'

Test #44:

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

input:

2
0 1

output:

infinity

result:

ok single line: 'infinity'

Test #45:

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

input:

9
8 7 6 5 4 3 2 1 0

output:

1

result:

ok single line: '1'

Test #46:

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

input:

2
3 2

output:

1

result:

ok single line: '1'