帮我翻译一下,看看这道题讲的是什么意思?
看不懂题的意思,特别是输入输出那.请高手帮忙指教一下什么意思?Updogpreparedtoenjoyhisdelicioussupper.Attheverytimehe...
看不懂题的意思,特别是输入输出那.请高手帮忙指教一下什么意思?
Updog prepared to enjoy his delicious supper. At the very time he was ready to eat, a serious accident occurred—GtDzx appeared!! GtDzx declared his hadn't eaten anything for 3 days (obviously he was lying) and required Updog to share the cake with him. Further more, he threatened Updog that if Updog refused him, he would delete Updog's account in POJ! Thus Updog had no choice.
Updog intended to cut the cake into s (s ≥ 1) pieces evenly, and then gave t(0≤ t ≤ s) pieces to GtDzx. Apparently GtDzx might get different amount of cake for different s and t. Note that s = 12, t = 4 and s = 6, t = 2 will be regarded as the same case since GtDzx will get equal amount in the two cases. Updog wouldn't separate the cake into more than N pieces.
After sorted all available cases according to the amount of cake for GtDzx, in the first case no cake to gave to GtDzx (t = 0) and in the last case GtDzx would get the whole cake (s = t). Updog wondered that how much cake GtDzx would get in the k-th case.
Input
The first line of the input file contains two integers N (1 ≤ N ≤ 5000) and C(0 ≤ C≤ 3000). The following C lines each contains a positive integer describe C query respectively. The i-th query ki is to ask GtDzx's share of whole cake in the ki-th case .
Output
Answer each query in a separated line, according to the order in the input.
Sample Input
5 4
1
7
11
12
Sample Output
0/1
3/5
1/1
No Solution 展开
Updog prepared to enjoy his delicious supper. At the very time he was ready to eat, a serious accident occurred—GtDzx appeared!! GtDzx declared his hadn't eaten anything for 3 days (obviously he was lying) and required Updog to share the cake with him. Further more, he threatened Updog that if Updog refused him, he would delete Updog's account in POJ! Thus Updog had no choice.
Updog intended to cut the cake into s (s ≥ 1) pieces evenly, and then gave t(0≤ t ≤ s) pieces to GtDzx. Apparently GtDzx might get different amount of cake for different s and t. Note that s = 12, t = 4 and s = 6, t = 2 will be regarded as the same case since GtDzx will get equal amount in the two cases. Updog wouldn't separate the cake into more than N pieces.
After sorted all available cases according to the amount of cake for GtDzx, in the first case no cake to gave to GtDzx (t = 0) and in the last case GtDzx would get the whole cake (s = t). Updog wondered that how much cake GtDzx would get in the k-th case.
Input
The first line of the input file contains two integers N (1 ≤ N ≤ 5000) and C(0 ≤ C≤ 3000). The following C lines each contains a positive integer describe C query respectively. The i-th query ki is to ask GtDzx's share of whole cake in the ki-th case .
Output
Answer each query in a separated line, according to the order in the input.
Sample Input
5 4
1
7
11
12
Sample Output
0/1
3/5
1/1
No Solution 展开
展开全部
updog准备享受其美味的晚餐。在非常的时间,他愿意吃,严重的事故发生- gtdzx出现! gtdzx宣布,他没有吃过任何东西三天(显然他是在说谎) ,并要求updog分享蛋糕与他。此外,他还威胁updog ,如果updog拒绝他,他会删除updog的帐户在poj !因此, updog别无选择。
updog打算削减蛋糕到s ( ≥ 1 )件均匀,然后给吨( 0 ≤吨≤ )件gtdzx 。显然gtdzx可能得到不同数额的蛋糕,不同的S和汤匙请注意, = 12 ,吨= 4和S = 6 ,吨= 2 ,将被视为同一案件以来, gtdzx将得到同等数额在该两宗案件。 updog不会分开蛋糕到以上n件。
后整理所有可用的情况下,根据数额蛋糕为gtdzx ,在第一宗案件中没有蛋糕,以给gtdzx性( t = 0 ) ,并在最后一例gtdzx会得到整个蛋糕( =吨) 。 updog不知道说了多少蛋糕gtdzx会得到,在k次的情况。
投入
第一行输入文件包含两个整数N (下1 ≤ n ≤ 5000 )和C ( 0 ≤ c ≤ 3000 ) 。下面的C线,每个包含一个正整数描述c分别查询。的I -次查询其是要求gtdzx的份额在整个蛋糕的Ki -次的情况。
输出
答案每个查询在一个分离的路线,根据该命令,在输入。
样本输入
4月5日
1
7
11
12
示例输出
0 / 1
3 / 5
1 / 1
没有办法
updog打算削减蛋糕到s ( ≥ 1 )件均匀,然后给吨( 0 ≤吨≤ )件gtdzx 。显然gtdzx可能得到不同数额的蛋糕,不同的S和汤匙请注意, = 12 ,吨= 4和S = 6 ,吨= 2 ,将被视为同一案件以来, gtdzx将得到同等数额在该两宗案件。 updog不会分开蛋糕到以上n件。
后整理所有可用的情况下,根据数额蛋糕为gtdzx ,在第一宗案件中没有蛋糕,以给gtdzx性( t = 0 ) ,并在最后一例gtdzx会得到整个蛋糕( =吨) 。 updog不知道说了多少蛋糕gtdzx会得到,在k次的情况。
投入
第一行输入文件包含两个整数N (下1 ≤ n ≤ 5000 )和C ( 0 ≤ c ≤ 3000 ) 。下面的C线,每个包含一个正整数描述c分别查询。的I -次查询其是要求gtdzx的份额在整个蛋糕的Ki -次的情况。
输出
答案每个查询在一个分离的路线,根据该命令,在输入。
样本输入
4月5日
1
7
11
12
示例输出
0 / 1
3 / 5
1 / 1
没有办法
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询