Description: Description: There are two boats, carrying capacity are c1, c2, n containers, the weight wi (i = 1 ... n), and the total weight of all containers of not more than c1+ c2. Determine whether it is possible to load two ships full of all containers. Input: number of test cases, test cases each accounted for two lines of input. The first line time is c1, c2, and n (n < = 10) the second line of n integers that wi (i = 1 ... n). n = 0 marks the end of input. Output: For each test cases in a separate line in the output Yes or No. Input sample: 7828779288000 output sample: Yes No
To Search:
File list (Check if you may need any files):
baoleiwenti.cpp