编程介的小学生 2017-12-10 07:03 采纳率: 20.5%
浏览 638
已采纳

Level up

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
2
1000
2
4
8 975
85 94 93 100
0 0 100 100
1000
1
4
979
0 0 0 100

Sample Output
Love you Ten thousand years.
Cry,men,not crime.

  • 写回答

1条回答 默认 最新

  • threenewbee 2018-11-10 15:36
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!