本文共 1373 字,大约阅读时间需要 4 分钟。
Problem Description
Professor Zhang has a number sequence . However, the sequence is not complete and some elements are missing. Fortunately, Professor Zhang remembers some properties of the sequence:Professor Zhang wants to know the maximum value of among all the possible sequences.
Input
There are multiple test cases. The first line of input contains an integer , indicating the number of test cases. For each test case:The first contains two integers and – the length of the sequence and the number of known elements.
In the next lines, each contains two integers and , indicating that .
Output
For each test case, output the answer as an irreducible fraction “/”, where , are integers, .Sample Input
2 2 0 3 1 3 1Sample Output
1/1 200/201题意很简单,前两个数要尽可能大,后面的数要尽可能小,序列又是非递增的,最大值为200
#include#include #include #include #include #include #include
转载地址:http://gicvb.baihongyu.com/