#include #include int n; char cur[1048576], nxt[1048576]; void rev_str(char *x) { int i, j; char tmp; for(i=0, j=strlen(x)-1;i