摘要: 最小生成树#include #include #include #include #include using namespace std;const int Maxn=110;struct Pex{ double x,y,z; double r;};Pex pt[Maxn];int n;doubl... 阅读全文
posted @ 2014-08-26 20:20 chenjunjie1994 阅读(159) 评论(0) 推荐(0) 编辑
摘要: DLX的题,做过这题才算是会吧。这道题转化成了精确覆盖模型来做,一开始,只是单纯的要覆盖完行列和斜线,WA。后来醒悟了,不能这样,只要覆盖全部行或列即可。虽然如此,但某些细节地方很关键不能考虑到。特别要注意的是for(int i=R[c];i;i=R[i]){ if(i>ne) break; if(... 阅读全文
posted @ 2014-08-26 19:38 chenjunjie1994 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 精确覆盖#include #include #include #include #include using namespace std;const int maxn=920;const int maxnode=920*550;const int maxr=550;int ans;struct DL... 阅读全文
posted @ 2014-08-26 09:23 chenjunjie1994 阅读(232) 评论(0) 推荐(0) 编辑
摘要: WA了好久,第一次用重覆盖的模型做题。感觉这题有个陷阱,那就是当去掉某些边后,若因为这个边去掉而被破环的正方形还存在,那么就会造成覆盖不完全,WA.所以,在去掉边后,必定有些正方形是不存在的,须重新计算。另外,计算一个正方形有哪些边也很困难。#include #include #include #i... 阅读全文
posted @ 2014-08-26 00:03 chenjunjie1994 阅读(176) 评论(0) 推荐(0) 编辑