摘要:
考试的时候一看就把大概的思路想出来了,结果tarjan缩点还没看,mmdd 思路:tarjian求强连通分量+缩点连边+SPFA最长路 code如下 cpp include define re register int using namespace std; int n, m, t, cnt, s 阅读全文
摘要:
思路:IDA +迭代加深 cpp include define re register int using namespace std; int t,n,bj,deep,a[25]; int read() { int ans=0; char w=' ',ch=getchar(); while(ch' 阅读全文
摘要:
~~硬是没看出来网络流和SPFA算法的写法~~ 正解:SPFA(最短路)+分层图 我的乱搞算法:BFS+二进制状态压缩 考试的时候脑糊了,毕竟调了一上午,~~自闭了~~ 巨坑:同一个单元格可能有多把钥匙 ~~XSL~~ 蒟蒻的乱搞代码 cpp include define re register i 阅读全文
摘要:
```cpp long long read() { long long ans=0; char last=' ',ch=getchar();//last用来存正负号,并消去那些换行符,空格 while(ch'9') { last=ch;ch=getchar();//如果不是数字类型字符,就一直读入(一直爽) } while(ch>='... 阅读全文