• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
tmeteorj
Nothing is so big that it is impossible to get over, and hurt only serves to make us stronger. 没有什么事是大到无法战胜的,痛苦也只会让我们变得更加坚强。
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2012年9月2日

POJ 3436
摘要: 虽然一次秒过六级,但还是觉得这种冗长的题目非常蛋疼~3进制位压缩以进行判断是否有边,接着就是一次最大流,判断最后经过了哪些边只用考虑拆点后右边的点发出去的通往左边的点的那些边里初始流量减去现在流量是否等于0即可。View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 const int N=200,M=20000; 6 const int inff=10000000; 7 int head[N],nc; 8 struct e 阅读全文
posted @ 2012-09-02 12:13 tmeteorj 阅读(217) 评论(0) 推荐(0)
 
POJ 3498
摘要: 拆点+最大流,对与拆开的点建立容量为最多跳几次的边,在建立源点到每个点的边,容量为那有多少只企鹅,最后让互相能到的点建立边。View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 const int N=800,M=100000; 6 const int inff=1<<29; 7 const double eps=1e-8; 8 int head[N],nc; 9 struct edge 10 { 11 int 阅读全文
posted @ 2012-09-02 10:46 tmeteorj 阅读(146) 评论(0) 推荐(0)
 
POJ 2570
摘要: 可以看成floyd,用bool变量标记公司View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<set> 4 using namespace std; 5 bool ss[300][300][30]; 6 void floyd(int n) 7 { 8 for(int k=1;k<=n;k++) 9 {10 for(int i=1;i<=n;i++)11 {12 if(ss[i][k][26])13 {14 ... 阅读全文
posted @ 2012-09-02 09:33 tmeteorj 阅读(178) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3