摘要:
A.Specific Tastes of Andre 题意:要求输出一个长为n的序列,要求每个非空子数组的权值和能被长度整除。 题解:输出n个1即可。 #include<bits/stdc++.h> using namespace std; int main() { int T; cin>>T; w 阅读全文
摘要:
A 牛逼队友写的,貌似卡常? #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<map> using namespace std; typedef lo 阅读全文
摘要:
题解:对于每个强连通分量一定是半连通子图,对于每条线上的所有强连通的分量的所有点而言也是半连通子图。因此只需要先缩点记录每个强连通分量的大小,然后倒序(拓扑图)在新图跑最长路+计数即可。 1 #include<bits/stdc++.h> 2 #define ll long long 3 using 阅读全文
摘要:
题解:源点向单位建容量为单位人数的边,桌子向汇点建容量为桌子最多容纳多少人的边,单位向所有桌子连容量为1的边,跑最大流。 如果最大流等于单位总人数则有解,输出满流边即为方案。 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N 阅读全文