题目地址:http://poj.org/problem?id=1703 Sample Input 1 5 5 A 1 2 D 1 2 A 1 2 D 2 4 A 1 4 Sample Output Not sure yet. In different gangs. In the same gang. 题目解读:T组数据,每组输入n m,n代表有n个人, m代表有m次操作.操作A x y:表示询问x y的关系是怎样的? 三中情况:不确定,属于同一个集合, 不属于同一个集合操作D x y:表示x y…
一.Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and…
题目:http://poj.org/problem?id=2411 Input The input contains several test cases. Each test case is made up of two integer numbers: the height h and the width w of the large rectangle. Input is terminated by h=w=0. Otherwise, 1<=h,w<=11. Output For eac…