QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#535390#4585. Greedy KnapsackDennisTran#TL 673ms5668kbC++201.7kb2024-08-28 00:46:222024-08-28 00:46:23

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 10
10 1 2 3 4
1 1 1 1 1

output:

3

result:

ok single line: '3'

Test #2:

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

input:

5 10000000000
10 1 2 3 4
30 2 15 7 11

output:

65

result:

ok single line: '65'

Test #3:

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

input:

5 20
4 9 5 1 3
203 175 131 218 304

output:

900

result:

ok single line: '900'

Test #4:

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

input:

1 1
1
1

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 16ms
memory: 5468kb

input:

100000 200000
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100002

result:

ok single line: '100002'

Test #6:

score: 0
Accepted
time: 673ms
memory: 5384kb

input:

92455 883403359
82193 96168 42737 25557 5699 8922 41136 82789 26249 74241 57030 29989 41743 78491 37281 60598 23165 51802 13911 88911 55220 25398 60154 2879 14519 61138 16806 15952 83710 44076 43551 41425 11055 3321 59105 34722 60133 13735 36785 73444 92250 3613 35787 10798 35612 9564 42531 49012 83...

output:

881743221

result:

ok single line: '881743221'

Test #7:

score: 0
Accepted
time: 244ms
memory: 5668kb

input:

95787 282807627
71790 93372 34507 85540 25871 70820 42496 67633 50879 43192 861 57228 54094 91534 94590 24032 52665 82236 52010 45017 15045 76804 39159 72380 28162 89590 31125 21390 37395 34002 26585 2985 90847 12060 63128 73061 34524 61847 69734 53329 39554 90867 13357 18202 63266 44796 64191 40066...

output:

287223570

result:

ok single line: '287223570'

Test #8:

score: 0
Accepted
time: 15ms
memory: 5492kb

input:

100000 100001
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100001

result:

ok single line: '100001'

Test #9:

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

input:

100000 200000
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100002

result:

ok single line: '100002'

Test #10:

score: 0
Accepted
time: 17ms
memory: 5496kb

input:

100000 101603
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100001

result:

ok single line: '100001'

Test #11:

score: 0
Accepted
time: 16ms
memory: 5468kb

input:

100000 200000
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100002

result:

ok single line: '100002'

Test #12:

score: 0
Accepted
time: 16ms
memory: 5568kb

input:

100000 109258
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 999...

output:

100001

result:

ok single line: '100001'

Test #13:

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

input:

100000 200000
100000 99997 99994 99991 99988 99985 99983 99980 99977 99974 99972 99969 99966 99963 99961 99958 99955 99952 99950 99947 99944 99942 99939 99936 99933 99930 99928 99926 99923 99920 99917 99914 99912 99909 99906 99904 99901 99899 99897 99894 99891 99889 99886 99883 99881 99879 99876 998...

output:

100003

result:

ok single line: '100003'

Test #14:

score: 0
Accepted
time: 17ms
memory: 5432kb

input:

100000 104441
100000 99997 99994 99991 99988 99985 99983 99980 99977 99974 99972 99969 99966 99963 99961 99958 99955 99952 99950 99947 99944 99942 99939 99936 99933 99930 99928 99926 99923 99920 99917 99914 99912 99909 99906 99904 99901 99899 99897 99894 99891 99889 99886 99883 99881 99879 99876 998...

output:

100002

result:

ok single line: '100002'

Test #15:

score: 0
Accepted
time: 39ms
memory: 5660kb

input:

100000 200000
100000 99993 99987 99978 99972 99965 99960 99954 99948 99944 99941 99931 99929 99919 99910 99904 99894 99888 99877 99871 99863 99858 99852 99850 99843 99839 99829 99823 99812 99807 99795 99791 99780 99774 99766 99755 99750 99742 99731 99725 99718 99711 99702 99696 99693 99689 99678 996...

output:

100002

result:

ok single line: '100002'

Test #16:

score: 0
Accepted
time: 42ms
memory: 5504kb

input:

100000 100220
100000 99993 99987 99978 99972 99965 99960 99954 99948 99944 99941 99931 99929 99919 99910 99904 99894 99888 99877 99871 99863 99858 99852 99850 99843 99839 99829 99823 99812 99807 99795 99791 99780 99774 99766 99755 99750 99742 99731 99725 99718 99711 99702 99696 99693 99689 99678 996...

output:

100001

result:

ok single line: '100001'

Test #17:

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

input:

1 1
2
100000

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 77ms
memory: 5656kb

input:

100000 200000
100000 99991 99969 99958 99945 99932 99930 99912 99899 99891 99875 99857 99845 99830 99814 99802 99783 99766 99754 99733 99729 99726 99713 99696 99675 99665 99646 99642 99625 99621 99612 99605 99590 99585 99569 99566 99559 99552 99543 99528 99513 99497 99485 99478 99476 99457 99435 994...

output:

100003

result:

ok single line: '100003'

Test #19:

score: 0
Accepted
time: 81ms
memory: 5468kb

input:

100000 100012
100000 99991 99969 99958 99945 99932 99930 99912 99899 99891 99875 99857 99845 99830 99814 99802 99783 99766 99754 99733 99729 99726 99713 99696 99675 99665 99646 99642 99625 99621 99612 99605 99590 99585 99569 99566 99559 99552 99543 99528 99513 99497 99485 99478 99476 99457 99435 994...

output:

100002

result:

ok single line: '100002'

Test #20:

score: 0
Accepted
time: 10ms
memory: 5496kb

input:

100000 104768
42198 63876 70289 97679 99129 99383 99678 99811 99998 99999 99999 99999 100000 100000 100000 12433 8169 3583 222 37 35 9 2 1 1 1 1 1 1 1 65163 81308 91468 93404 95453 99894 99909 99998 99999 99999 99999 99999 100000 100000 100000 23740 11045 4364 2504 1858 1225 1157 1071 505 76 5 2 2 2...

output:

45

result:

ok single line: '45'

Test #21:

score: 0
Accepted
time: 15ms
memory: 5432kb

input:

100000 104790
66799 77219 97947 99699 99727 99872 99924 99980 99989 99991 100000 100000 100000 100000 100000 37709 33873 24409 1661 1157 1097 410 252 224 122 94 14 7 4 4 58118 97059 99179 99309 99324 99815 99829 99932 99933 99942 99971 99972 99992 99995 99995 71139 43023 15781 14293 3416 975 325 163...

output:

104790

result:

ok single line: '104790'

Test #22:

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

input:

100000 200000
59927 72467 75688 92437 93614 94992 97911 98151 98487 98938 99612 99947 99956 99995 99999 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...

output:

632

result:

ok single line: '632'

Test #23:

score: 0
Accepted
time: 10ms
memory: 5432kb

input:

100000 200000
86758 94096 95161 96612 98162 98338 98548 99356 99854 99996 99999 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100...

output:

200000

result:

ok single line: '200000'

Test #24:

score: 0
Accepted
time: 15ms
memory: 5376kb

input:

100000 150000
3841 4238 30552 47243 50833 93202 96257 97547 98352 98668 99000 99932 99987 99991 99992 99997 99998 99998 99998 99999 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...

output:

3855

result:

ok single line: '3855'

Test #25:

score: 0
Accepted
time: 12ms
memory: 5668kb

input:

100000 150000
10723 22346 89189 97960 99966 99968 99969 99985 99994 99994 99997 99997 99997 99999 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000...

output:

150000

result:

ok single line: '150000'

Test #26:

score: -100
Time Limit Exceeded

input:

90108 9829673297
3 3 5 5 5 5 5 7 9 11 13 15 15 17 17 19 20 22 22 22 22 24 25 25 25 27 28 30 30 31 32 34 34 35 35 36 37 38 39 41 42 44 44 46 48 49 49 50 51 52 53 55 55 56 57 59 61 63 65 67 69 70 71 72 72 73 75 76 77 77 78 78 80 80 80 80 81 81 81 81 82 82 82 84 86 87 89 89 90 90 90 90 92 94 95 97 99 1...

output:


result: