
位运算
文章平均质量分 86
做不完的ACM
加油,努力
展开
-
ACM 位运算
转载至:http://blog.youkuaiyun.com/mtrix/article/details/61200302 给集合里的元素一个顺序,那么就可以用整数表示集合,某一位为1表示对应元素被选取。 设x为表示集合的整数,那么这个整数有如下性质: x的子集整数y在数值上不会比x大。因为x的子集y只是保留了x某些位置上的1,所以y总可以加上一个非负的转载 2018-01-29 16:15:41 · 273 阅读 · 0 评论 -
CodeForces333E Summer Earnings
题目链接:http://codeforces.com/contest/333/problem/E题面:Many schoolchildren look for a job for the summer, and one day, when Gerald was still a schoolboy, he also decided to work in the summer. But as Gera...原创 2018-03-08 22:45:52 · 286 阅读 · 0 评论 -
SPOJ:Harbinger vs Sciencepal(分配问题&不错的DP&bitset优化)
题目链接:https://vjudge.net/problem/SPOJ-R6PLRainbow 6 is a very popular game in colleges. There are 2 teams, each having some members and the 2 teams play some matches against each other. The team which ...原创 2018-04-24 12:23:48 · 198 阅读 · 0 评论 -
SPOJ:Ada and Orange Tree (LCA+Bitset)
题目链接:https://vjudge.net/problem/SPOJ-ADAORANGAda the Ladybug lives near an orange tree. Instead of reading books, she investigates the oranges. The oranges on orange tree can be in up to 5*50 Shades o...原创 2018-04-24 19:21:15 · 304 阅读 · 0 评论