JOI2008HO C
JOI2008HO_C
https://gyazo.com/503913df0873f6aed45912d413fa40a1
Find the maximum value that does not exceed M out of 1000 values by selecting 4 or less and adding them.
Pre-enumerate the number of possible combinations of 0 to 2, sort, and find the largest number that does not exceed M when added together by a binary search.
#TODO I think you're wrong. ---
This page is auto-translated from /nishio/JOI2008HO C. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.