摘要: 思路:和黑书上的跳舞机类似#include#include#include#include#include#include#include#include#include#include#include#define Maxn 31#define Maxm 100010#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x<<1)#define rson(x) (x<<1|1)#define inf 0x7fffffff#define Mod 1000000007using names 阅读全文
posted @ 2013-08-23 22:26 fangguo 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 思路:黑书的例题#include#include#include#include#include#include#include#include#include#include#include#define Maxn 110#define Maxm 100010#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x<<1)#define rson(x) (x<<1|1)#define inf 0x7fffffff#define Mod 1000000007using namespace 阅读全文
posted @ 2013-08-23 21:52 fangguo 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 思路:枚举能是A,B,C在一条简单路径上的中点。 计算多少个几何能满足。在用总数减去#pragma comment(linker, "/STACK:16777216")#include#include#include#include#include#include#include#include#include#include#include#define Maxn 200010#define Maxm 300010#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x son[Maxn] 阅读全文
posted @ 2013-08-23 15:36 fangguo 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 思路:主要就是模拟这些操作,用链表果断超时。改用堆栈模拟就过了#include#include#include#include#include#include#include#include#include#include#include#include#define Maxn 1000010#define Maxm 300010#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x br,af;int main(){ int i,j,u,v,n,x; char str[3]; int brz,a... 阅读全文
posted @ 2013-08-23 15:31 fangguo 阅读(175) 评论(0) 推荐(0) 编辑