我的剪贴板
//file headers start
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fileop(s) freopen(#s".in", "r", stdin), freopen(#s".out", "w", stdout)
#define rep(i, j, k) for(int i = (j); i <= (k); ++i)
#define per(i, j, k) for(int i = (j); i >= (k); --i)
#define clrsz(x) memset(x, 0, sizeof x)
int read(){
int f = 1, ans = 0; char c = getchar();
while(!isdigit(c)) {
if(c == '-') f = -1;
c = getchar();
}
while(isdigit(c)) {
ans = ans * 10 + c - '0';
c = getchar();
}
return ans * f;
}
void put(int num) { printf("%d\n", num); }
void testread() { while(1) { int k = read(); put(k); if(!k) break;}}
//file headers end
network flow : http://www.cs.princeton.edu/~wayne/kleinberg-tardos
https://www.cnblogs.com/SYCstudio/p/7260613.html
http://101.96.10.64
7.胡伯涛《最小割模型在信息学竞赛中的应用》
[数论]线性求所有逆元的方法
扩展欧几里得算法与(扩展)中国剩余定理
//玄学优化
https://paste.ubuntu.com/p/JWWSsCbwmM/
https://send.firefox.com/download/ccd7a42e03/#lus2iLNPaTKyZCi69zRIHg
#!/bin/bash
while true; do
./gen > tst.in
./my < tst.in > my.out
./std < tst.in > std.out
if diff my.out std.out -b ; then
printf "AC\n"
else
printf "WA\n"
exit 0
fi
done
[二分图相关定理及其证明(最小点覆盖+最小路径覆盖+最大独立集+最小覆盖集)
](https://blog.csdn.net/qq_34564984/article/details/52778763)
如何生成随机数
Gedit 编译运行脚本
#!/bin/sh
dir=$GEDIT_CURRENT_DOCUMENT_DIR
name=$GEDIT_CURRENT_DOCUMENT_NAME
pre=${name%.*}
g++ $dir/$name -o $pre -g -Wall
if test $? -eq 0; then
gnome-terminal -x bash -c "time $dir/$pre;echo;read;"
fi
https://blog.csdn.net/weixin_34402408/article/details/93817915