摘要:
#include using namespace std; int n; int map[21][21]; int c1[21],c2[21]; int count1,count2; int maxsum; void dfs(int step,int count1, int count2) { if(step==n) { int sum=0; f... 阅读全文
摘要:
#include #define MAX 100001 int john,cow; int queue[MAX]; int vis[MAX]; int ans; void bfs() { int tail,head; tail=head=0; int start=john; queue[tail++]=start; vis[start]=1; w... 阅读全文