• 2024-08-04D37 2-SAT P3007 [USACO11JAN] The Continental Cowngress G
    视频链接:D372-SATP3007[USACO11JAN]TheContinentalCowngressG_哔哩哔哩_bilibili  P3007[USACO11JAN]TheContinentalCowngressG-洛谷|计算机科学教育新生态(luogu.com.cn)//O(n*n)#include<iostream>#include<cstring>#include<algorithm>usin
  • 2024-05-19P3007 [USACO11JAN] The Continental Cowngress G
    P3007[USACO11JAN]TheContinentalCowngressG题目链接思路:2-SAT模板,经典的或条件,那么直接建图即可,对于可行解,我们直接枚举每个方案支持和反对,然后染色判断即可。代码:#include<bits/stdc++.h>usingnamespacestd;#definefffirst#definesssecond#definepbpush_