2
10000000001 3
23 51 100
10000000001 3
100 52 22 
			Case #1: 100000004
Case #2: IMPOSSIBLE
 
Explanation
In the first example, the optimal strategy is to use 2 boards of length 23, 5 boards of length 51,
 and 99999997 boards of length 100. Of course, you could use just 100000001 boards of length 100 
to get a total greater than L, but that is not allowed.
In the second example, it is only possible to get even lengths.
鸣谢成都七中Zxytim