夏夜、

心若平似镜、何题不AC。

02 2014 档案

usaco PROB Checker Challenge 搜索
摘要:搜索的过程中用2进制保存状态,通过位运算判断可行性。//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#defin 阅读全文

posted @ 2014-02-20 19:18 BMan、 阅读(228) 评论(0) 推荐(0)

usaco Superprime Rib 搜索
摘要:按位搜索//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define 阅读全文

posted @ 2014-02-20 18:37 BMan、 阅读(183) 评论(0) 推荐(0)

usaco Number Triangles DP
摘要:DP入门题。//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#defi 阅读全文

posted @ 2014-02-20 17:14 BMan、 阅读(202) 评论(0) 推荐(0)

usaco Arithmetic Progressions
摘要:预处理全部q2+p2有20000多个。枚举任意两个的差,并以这个差扩展找到连续的有几个为了避免重复浪费时间,只需判断无法向左扩展的一对数,具体见代码。//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typed 阅读全文

posted @ 2014-02-20 16:31 BMan、 阅读(197) 评论(0) 推荐(0)

usaco the clocks DFS
摘要:迭代加深搜索,预处理9个move.//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) p 阅读全文

posted @ 2014-02-20 14:12 BMan、 阅读(182) 评论(0) 推荐(0)

usaco Packing Rectangles
摘要:太恶心了//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#define 阅读全文

posted @ 2014-02-18 16:32 BMan、 阅读(198) 评论(0) 推荐(0)

LightOj 1016 - Brush (II) 排序贪心
摘要:按Y轴排序后贪心//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair pii;#define pb(a) push(a)#de 阅读全文

posted @ 2014-02-18 10:11 BMan、 阅读(228) 评论(0) 推荐(0)

uva 127 "Accordian" Patience 简单模拟
摘要:#include#include#include#include#include#include#includeusing namespace std;char da[55][55][5];int num[55];int pilenum;void erase(int idx){ for(int i=idx;i3) { if(da[i][num[i]][0]==da[i-3][num[i-3]][0]|| da[i][num[i]][1]==da[i-3][num[i-3]][1]) { ... 阅读全文

posted @ 2014-02-17 11:06 BMan、 阅读(145) 评论(0) 推荐(0)

导航