Window Pains】的更多相关文章

http://poj.org/problem?id=2585 Window Pains Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1614   Accepted: 806 Description Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running…
Window Pains Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2524   Accepted: 1284 Description Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he…
Window Pains Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1888   Accepted: 944 Description Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he u…
Window Pains Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1843   Accepted: 919 Description Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he u…
Window Pains Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2027   Accepted: 1025 Description Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he…
Description . . . and so on . . . Unfortunately, Boudreaux's computer is very unreliable and crashes often. He could easily tell if a crash occurred by looking at the windows and seeing a graphical representation that should not occur if windows were…
拓扑排序. 深刻体会:ACM比赛的精髓之处不在于学了某个算法或数据结构,而在于知道这个知识点但不知道这个问题可以用这个知识去解决!一看题目,根本想不到是拓扑排序.T_T...... #include<stdio.h> #include<string.h> #include<math.h> #include<vector> #include<algorithm> using namespace std; ][]; ]; int i, j, k, f…
链接:http://poj.org/problem?id=2585 题意: 某个人有一个屏幕大小为4*4的电脑,他很喜欢打开窗口,他肯定打开9个窗口,每个窗口大小2*2.并且每个窗口肯定在固定的位置上(见题目上的图),某些窗口可以覆盖另一些窗口(可以脑补).询问给出的电脑屏幕是否是合法的. 分析: 可以预先处理出每个格子应该有哪几个窗口在这上面,将最上面的窗口与其他窗口连边,得到一张图,用拓扑判环,因为这道题太简单了,所以我就写这么短的题解. 代码: #include<iostream> #i…
题意: 在4*4的格子中有9个窗体,窗体会覆盖它之下的窗体,问是否存在一个窗体放置的顺序使得最后的结果与输入同样. 分析: 在数据规模较小且不须要剪枝的情况下能够暴力(思路清晰代码简单),暴力一般分为枚举子集(for(s=0;s<1<<n;++s))和枚举排列(next_permutation). 代码: //poj 2585 //sep9 #include <iostream> #include <algorithm> using namespace std;…
题意: 一个屏幕要同时打开9个窗口,每个窗口是2*2的矩阵,整个屏幕大小是9*9,每个窗口位置固定. 但是是否被激活(即完整显示出来)不确定. 给定屏幕状态,问是否可以实现显示. 分析:拓扑排序,把完全出现的数字拿出来,位置置空,然后再找下一个完全出现的数,直到找完为止,若中途找不到,则不合法. 代码: #include<cstdio> #include<iostream> #include<cstring> using namespace std; ],pos[][]…