Scar头像

C++ 最小生成树模板 Kruskal算法

#设置Tag是个好习惯 最小生成树 Kruskal算法还有一个Prim算法,以后补上#include <iostream> #include <algorithm> #define debug(x) cout <<&nbs...

Scar头像

C++ 并查集模板

#设置Tag是个好习惯 #include <iostream> #include <algorithm> #define MAXN 1000 #define debug(x) (cout << #x&...

Scar头像

C++ 二进制枚举模板(求n的所有子集)

#设置Tag是个好习惯 #include <bits/stdc++.h> using namespace std; int main() {     int n;    &nbsp...

Scar头像

C++ Groups 分组排班

#设置Tag是个好习惯 题意:教师想在5个工作日中选择不同的两天,给学生们上课。给定个n学生们的空闲时间,是偶数。并将学生们分为均等的两组,然后选择其中2天,使得当天上课的所有同学都有空。来源:https://codeforces.com/contest/1598/problem/B代码:...