摘要:
View Code #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int maxnode = 50; const int maxedge = 2000; struct edge { int start; int end; }; edge ArrayEdge[maxedge]; int degree[maxnode]; int start; int NodeNum, EdgeNum; int anStack[maxedge], pIn 阅读全文
摘要:
这题目跟hdu2894差不多,只不过求出序列之后要求算出对应第k个长度为n的字段所代表的数字#include<iostream>#include<string>using namespace std;int flag[(1<<15)+1],n,cnt,ans[(1<<15)+1],sum[(1<<15)+1];void dfs(int u){ int t=((u<<1)&((1<<n)-1)); if(!flag[t]) { flag[t]=1; dfs(t); ans[cnt++]=0; } if(! 阅读全文