当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3676:Tomorrow Genius 2008

题目描述

Tomorrow Genius Contest is a traditional event of Daisy Hill Primary School for the purpose of promoting the spirit of its motto, "Mens et Manus" among the students. This year's rules are quite simple: Given N triangles, the contestants are asked to piece them together to make a rectangle with width W and height H as rapidly and possible. The contestants are allowed to move, rotate but not turn over the triangles. The first one who achieves the goal is the winner of the contest.

Of course the host doesn't want to hold a no-winner contest. So he asks you, the technology support of the contest, to determine whether a problem is solvable.

输入解释

The first line contains three integers, N (1 ≤ N ≤ 10), W (1 ≤ W ≤ 10), H (1 ≤ H ≤ 10).
The following N lines contain six integers x1, y1, x2, y2, x3, y3 (-100 ≤ xi, yi ≤ 100) each, describing the coordinates of the vertices of a triangle each.

输出解释

One line contains "YES" or "NO" indicating whether the problem is solvable.

输入样例
Sample Input 1

6 5 5
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 1 1 0
0 0 0 1 1 0

Sample Input 2

5 5 5
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 3 4 0
0 0 0 1 2 0
   

输出样例
Sample Output 1

YES

Sample Output 2

NO


该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3676

最后修改于 2020-10-29T07:07:56+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
5000 65536