2017年11月9日

hihocoder #1487 : 岛屿3

摘要: 面积 +1 周长 看旁边与之相邻的有几个 cnt 增加的变长 4-cc - cc 岛屿数目是否增加的话用并查集维护了 #include<cstdio> #include<cstring> #include<map> #include<iostream> #include<algorithm> #in 阅读全文

posted @ 2017-11-09 20:50 HelloWorld!--By-MJY 阅读(148) 评论(0) 推荐(0) 编辑

hihocoder #1486 : 物品价值

摘要: dp[i][j] 到第i个物品 状态为 j 的二进制串 能得到的最大价值 #include<cstdio> #include<cstring> #include<map> #include<iostream> #include<algorithm> #include<math.h> #include 阅读全文

posted @ 2017-11-09 20:04 HelloWorld!--By-MJY 阅读(121) 评论(0) 推荐(0) 编辑

hihocoder #1485 : hiho字符串

摘要: 求h i o前缀和 枚举每个位子 二分结束的位子 恰好是2个h 一个 i 一个 o #include<cstdio> #include<cstring> #include<map> #include<iostream> #include<algorithm> #include<math.h> #in 阅读全文

posted @ 2017-11-09 19:40 HelloWorld!--By-MJY 阅读(139) 评论(0) 推荐(0) 编辑

导航