摘要:
题意:n个点,m条边的无向图,每条边abc,点a到点b的权值是c。p(0#include#include#include#include#include#include#include#include#include#include#define tree int o,int l,int r#define lson o<<1,l,mid#define rson o<<1|1,mid+1,r#define lo o<<1#define ro o<<1|1#define ULL unsigned long long#define LL long lo 阅读全文
摘要:
题目大意:判断一堆人能否分成两组,组内人都互相认识。思路:不认识的人一定不在一起!#include#include#include#include#include#include#include#include#include#include#include#include#define tree int o,int l,int r#define lson og[N]; while(scanf("%d",&n)==1) { for(int i=0;i<=n;i++) { g[i].clear();//WA f[... 阅读全文