Codeforces A. Salem and Sticks Codeforces Round #533 (Div. 2) 533A 1105A


Problem link

Firstly, we must find the value of t and it can easily proven that t is less than or equal to 100, so we can iterate over all possible value of t from 1 to 100 and calculate the cost of making all the sticks almost good for that t.
That works in 100n.

A solution in c++


Post a Comment

0 Comments