#644. [Wf2014]Buffed Buffet

[Wf2014]Buffed Buffet

Samples

2 15
D 4 10 1
C 6 1
40.500000000