摘要: 矩形嵌套时间限制:3000 ms | 内存限制:65535 KB难度:4描述有n个矩形,每个矩形可以用a,b来描述,表示长和宽。矩形X(a,b)可以嵌套在矩形Y(c,d)中当且仅当a<c,b<d或者b<c,a<d(相当于旋转X90度)。例如(1,5)可以嵌套在(6,2)内,但不能嵌套在(3,4)中。你的任务是选出尽可能多的矩形排成一行,使得除最后一个外,每一个矩形都可以嵌套在下一个矩形内。输入第一行是一个正正数N(0<N<10),表示测试数据组数,每组测试数据的第一行是一个正正数n,表示该组测试数据中含有矩形的个数(n<=1000)随后的n行,每行有两 阅读全文
posted @ 2012-02-26 13:35 mtry 阅读(325) 评论(0) 推荐(0)
摘要: Under AttackTime Limit: 10 Seconds Memory Limit: 65536 KBDoctor serves at a military air force base. One day, the enemy launch a sudden attack and the base is under heavy fire. The fighters in the airport must take off to intercept enemy bombers. However, the enemies know this clearly and they now . 阅读全文
posted @ 2012-02-26 13:27 mtry 阅读(292) 评论(0) 推荐(0)