C. Sequence
Time Limit: 1 Sec
Memory Limit: 256 MB
题目连接
http://codeforces.com/gym/100114Description
Integer sequences are very interesting mathematical objects. Let us examine a seque ...……
1 #include amp;amp;lt;iostreamamp;amp;gt;
2 using namespace std;
3 int main()
4 {
5 const int a = 1;
6 const int b = 2;
7 int array = {0};
8 for (int i = 0; i amp;amp;lt; sizeof array / siz ...……
bool DFS(Node n, int d){
if (d == 4){//路径长度为返回true,表示此次搜索有解
return true;
}
for (Node nextNode in n){//遍历跟节点n相邻的节点nextNode,
if (!visit){//未访问过的节点才能继续搜索
//例如 ...……