Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: K Best
Description Demy has w._{i}Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. She has decided that she would keep . Demy would like to select such Input The first line of the input file contains The following w (0 ≤ _{i}v ≤ 10_{i}^{6}, 1 ≤ w ≤ 10_{i}^{6}, both the sum of all v and the sum of all _{i}w do not exceed 10_{i}^{7}).Output Output Sample Input 3 2 1 1 1 2 1 3 Sample Output 1 2 Source Northeastern Europe 2005, Northern Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator