|
||||||||||
Level upTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 207 Accepted Submission(s): 13 Problem Description Zty has met a big problem.His X Gu Niang was kidnaped by a secret organization.The organization only left Zty a letter: "If you can beat our boss ,we will give her the freedom,or..." The boss of the organization was so secret that no one knows his name.We only know that he was so powerful,and Zty is not powerful enough now,what he need to do is to train and to get more experience(Exp).Then he found a place wonderful for traning,There are N enemies there with different Exp,and Zty has M power ball,the number of power ball he used will effect the probability he beat the enemy.These probabilities are given as percentages pij, where i (with 1 ¡Ü i ¡Ü N) is the number of the enemy and j is the quantity of power balls used on it.One power ball can be used only once. Zty has to level up to 99,then he will be able to beat the boss.Of cause he is level 1 at the begining.He want to know weather the maximal expected Exp he can get is enough.The expected Exp is calculated as Sum(P(i)*Exp) where P is the probability. The Exp Zty need to level up one level is K/100 , and K will be given. Notice that: If Zty doesn't used a power ball,the probability he beat the enemy is 0. ^_^ Input The first line contain a T ,then T cases followed.Each test case has the following format: One line with one integer K <= 100000: as the description means. One line with one integer N with 1 ¡Ü N ¡Ü 100: the number of enemies. One line with one integer M with 0 ¡Ü M ¡Ü 100: the maximal number of available power ball. One line with N integers indicating the Exp of the N enemies. N lines, each line corresponding to a enemy i, containing n integers pi1, pi2, ¡, pim (the percentages, with 0 ¡Ü pi1, pi2, ¡, pim ¡Ü 100). Output If the maximal expected Exp Zty can get is enough for him to level up tp 99,then ouput "Love you Ten thousand years.",else ouput"Cry,men,not crime." Sample Input
Sample Output
Author teddy Source | ||||||||||
|