Output one line and one number to indicatethe minimum cost under the condition.
3 2 80 90 100 60 80 100 0.7 0.8 0.9 220 250
300 440