摘要:
题意 平面上有 n (2 ≤ n ≤ 15) 个点,现用平行于坐标轴的矩形去覆盖所有点,每个矩形至少盖两个点,矩形面积不可为0,求这些矩形的最小面积。 Input The input consists of several test cases. Each test cases begins wit 阅读全文
摘要:
题意 n头牛,m个房间,每头牛有自己喜欢的房间,问每头牛都住进自己喜欢的房间有多少种分配方法? Input In the first line of input contains two integers N and M (1 <= N <= 20, 1 <= M <= 20). Then come 阅读全文
摘要:
题意 给出一个整数列,求一段子序列之和最接近所给出的t。输出该段子序列之和及左右端点。 Input The input file contains several test cases. Each test case starts with two numbers n and k. Input is 阅读全文
摘要:
题意 有一个竖直的管子内有n个小球,小球的半径为r,最下面的小球距离地面h高度,让小球每隔一秒自由下落一个,小球与地面,小球与小球之间可视为弹性碰撞,让求T时间后这些小球的分布 Input The first line of the input contains one integer C (C ≤ 阅读全文
摘要:
题意: 有n头奶牛排成一排,有的朝前(F)有的朝后(B),现在你可以使k头奶牛一次性翻转朝向(n>=k>=1),问你最少的翻转次数和此时对应的k值。 Input Line 1: A single integer: N Lines 2.. N+1: Line i+1 contains a single 阅读全文