Ordering Pizza
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
It's another Start[c]up finals, and that means there is pizza to order for the onsite contestants. There are only 2 types of pizza (obviously not, but let's just pretend for the sake of the problem), and all pizzas contain exactly S slices.
It is known that the i-th contestant will eat si slices of pizza, and gain a