The input contains multiple cases The first line of the input contains a single integer T(1≤T≤50) the number of cases
For each case the first line of the input contains a single integer m(1≤m≤50) denoting the upper bound of n
The second line contains m integers a 1 a 2--am(1小于等于Ai≤100,Ai小于等于Ai+1) the i-th of which denotes the running time of the intended solution when n=i
The third line contains m integers b1 B2--bm(1小于等于Bi≤100 Bi≤Bi+1) the i-th of which denotes the running time of the when n=i
For each case print a single line containing a single integer denoting the minimum possible value of n If there is no solution print -1 instead
有会acm竞赛的吗用的python3,是真的不会写 好急的
里面的----就是...的意思从a1一直到am A,B都是小写的意思因为他不能相似的词汇一直出现
题目的意思就是有一行好的方法和一行不好的方法,不好的方法是暴力求解他不想用不好的方法所以设定了时间不能超过三倍超过三倍的话就print -1 用的if但是具体的我写不出来
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,超出我们目前的服务范围,暂时无法为您解答。
问答VIP目前服务范围为 :Python、Java、MySQL、Redis、MongoDB、HBase、Zookeeper、Kafka、Linux领域专业问题解答,为您提供解决问题的思路和指导。
不提供源码代写、项目文档代写、论文代写、安装包资源发送或安装指导等服务。
本次提问扣除的有问必答次数,会为您补发到账户,我们后续会持续优化,扩大我们的服务范围,为您带来更好地服务。