摘要:
#include<cstdio>#include<iostream>#include<stdlib.h>#include<queue>using namespace std;typedef struct BTree{ int data; BTree *lchild; BTree *rchild; } 阅读全文
摘要:
#include<cstdio> #include<vector> using namespace std; const int maxn=20; int n,k,x,maxSumSqu=-1,A[maxn]; vector<int>temp,ans; void DFS(int index,int 阅读全文
摘要:
#include<cstdio> const int maxn=30; int n,V,maxValue=0; int w[maxn],c[maxn]; void DFS(int index,int sumW,int sumC) { if(index==n) { return; } DFS(inde 阅读全文
摘要:
#include<cstdio> const int maxn=30; int n,V,maxValue=0; int w[maxn],c[maxn]; void DFS(int index,int sumW,int sumC) { if(index==n) { if(sumW<=V&&sumC>m 阅读全文
摘要:
void BFS(int s) { queue<int>q; q.push(s); while(!q.empty()) { //取出队首元素top //访问队首元素top //将队首元素出队 //将top的下一次结点中未曾入队的结点全部入队,标记层号为now的层号+1并设置为已入队 } } 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<cstring> #include<queue> using namespace std; const int maxn=100; struct node { int x,y; int step; }S,T, 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<queue> using namespace std; const int maxn=100; struct node { int x,y; } Node; int n,m; int matrix[maxn][ 阅读全文
摘要:
#include<iostream> #include<vector> #include<cstdio> #include<cstring> using namespace std; const int maxsize=16; int a[maxsize][maxsize]= {0}; bool b 阅读全文