摘要:
巨水。。。直接回溯暴力居然过了。。。#include #include #include #define N 110char s[6][5]= {"XXL","XL","L","M","S","XS"};int solve(char *str){ for(int i=0; in) return false; return true; } int u=ans[cur].u; int v=ans[cur].v; num[u]++; if(num[u]>n) num[u]-- 阅读全文
摘要:
判断是否有负环。。。Bellman_ford#include #include #include #define N 2200#define INF 9999999int v[N],w[N],u[N];int d[N];int n,m;bool Bellman_ford(){ for(int i=0; id[x]+w[i]) { printf("%d %d %d %d %d %d\n",x,y,d[y],d[x]+w[i],d[x],w[i]); return true; } } return false... 阅读全文