11 2017 档案

codeforces 895B XKSegments
摘要:题意还是比较简单 n x k 然后n个数 求里面有多少个 ai <=aj ai<=y<=aj 正好有 K个满足 x|y ( i, j ) 枚举每个位子 二分最左边能组合的位子 二分最右边能组合的位子 计数 #include<stdio.h> #include<algorithm> #include< 阅读全文

posted @ 2017-11-27 16:34 HelloWorld!--By-MJY 阅读(206) 评论(0) 推荐(0)

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 阅读(157) 评论(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 阅读(126) 评论(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 阅读(145) 评论(0) 推荐(0)

hihocoder #1566 : 皇室成员的名字
摘要:把每个罗马数字转化成 阿拉伯数字 其实每次做做最长匹配就行 然后sort #include<cstdio> #include<cstring> #include<map> #include<iostream> #include<algorithm> #include<math.h> #include 阅读全文

posted @ 2017-11-07 09:07 HelloWorld!--By-MJY 阅读(177) 评论(0) 推荐(0)

hihocoder #1509 : 异或排序
摘要:很有意思的题 中文 一开始拿到这个题没头绪 2^60的话 考虑相邻2个数 a 0 1 0 1 0 0 b 0 0 1 0 0 0 0 他们最高位不相同的 相同的异或同一个数还是相同所以考虑这位 0 1 那么s这位一定要是 0 , 0 1 就相反 然后都不能矛盾 这样就解决了 #include<cst 阅读全文

posted @ 2017-11-06 16:53 HelloWorld!--By-MJY 阅读(94) 评论(0) 推荐(0)

导航