打n个怪兽,怪兽和勇士都有k个属性,只有每个属性都大于等于怪兽时才能将怪兽击败,
打败怪兽可以增加对应的属性值,问最多能击败多少个怪兽以及最终自己的属性值分别是多少
这道题还要什么输入挂??
Swordsman
Lawson is a magic swordsman with kk kinds of magic attributes v1,v2,v3,…,vkv1,v2,v3,…,vk. Now Lawson is faced with nn monsters and the ii-th monster also has kkkinds of defensive attributes ai,1,ai,2,ai,3,…,ai,kai,1,ai,2,ai,3,…,ai,k. If v1≥ai,1v1≥ai,1 and v2≥ai,2v2≥ai,2 and v3≥ai,3v3≥ai,3 and …… and vk≥ai,kvk≥ai,k, Lawson can kill the ii-th monster (each monster can be killed for at most one time) and get EXP from the battle, which means vjvj will increase bi,jbi,j for j=1,2,3,…,kj=1,2,3,…,k.
Now we want to know how many monsters Lawson can kill at most and how much Lawson's magic attributes can be maximized.
Input
There are multiple test cases. The first line of input contains an integer TT, indicating the number of test cases. For each test case:
The first line ha