S

Правка en1, от KKOrange, 2023-04-05 14:35:18

Let's first establish the order we should buy the snacks. Suppose we want to buy a snack of type $$$i$$$ and a snack of type $$$j$$$ ($$$i < j$$$), which one should we buy first? Note that the total value of the snacks dispensed doesn't depend on the order we buy these two snacks. However, if there is only one snack of type $$$i$$$ we cannot buy snack $$$j$$$ first. So we can assume that snacks should be bought in non-descending order (i.e. from left to right).

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en12 Английский KKOrange 2023-04-06 07:47:28 13
en11 Английский KKOrange 2023-04-05 17:24:49 3
en10 Английский KKOrange 2023-04-05 17:24:25 0 (published)
en9 Английский KKOrange 2023-04-05 17:23:04 775
en8 Английский KKOrange 2023-04-05 17:14:10 1586 Tiny change: '_i$.\n\n![ ](/predow' -> '_i$.\n\n![Snacks ](/predow'
en7 Английский KKOrange 2023-04-05 16:58:53 69
en6 Английский KKOrange 2023-04-05 16:55:17 486
en5 Английский KKOrange 2023-04-05 16:47:12 73
en4 Английский KKOrange 2023-04-05 16:46:37 166
en3 Английский KKOrange 2023-04-05 16:44:26 481
en2 Английский KKOrange 2023-04-05 16:36:48 1852
en1 Английский KKOrange 2023-04-05 14:35:18 452 Initial revision (saved to drafts)