摘要:
View Code #include <iostream>#include <cstdio>#include <queue>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int MM = 111111; //处理字符串的最大长度#define debug puts("wrong")int Wa[MM], Wb[MM], Wv[MM], Ws[MM];int ran[MM], height[M 阅读全文
摘要:
http://poj.org/problem?id=1469View Code //POJ1469#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int MM=100010;int P,N;bool vis[MM];int pre[MM];int head[MM], NE;struct Edge{int v,next;}edge[MM];void add_edge(int u,int v) { edge[NE].v=v; edge[NE].next 阅读全文
摘要:
View Code //POJ 1204#include <iostream>#include <cstdio>#include <cstring>using namespace std;#define ROOT 0#define debug puts("wrong")const int MM=1010;const int MAX_NODE=100100;const int CHI=26;int L,C,W;int cnt;int len[MM];int ansx[MM], ansy[MM], ansk[MM];char text[MAX 阅读全文