AtCoder Petrozavodsk Contest 001 D – Forest 连通块+并查集+贪心
D - Forest My Solution 题意:给出一个由n个点m条边构成的森林,每个点有个权值val[i],额外加一条边…
D - Forest My Solution 题意:给出一个由n个点m条边构成的森林,每个点有个权值val[i],额外加一条边…
D. Too Easy Problems 二分+贪心 My Solution 题意:有m个题目,每个题目有个需要花费的时间ti,以…
B. New Year's Eve 贪心、构造、位运算、异或和 My Solution 题意:给出1~n这n个数,最多选k个数,…
C. Party Lemonade 贪心、优先队列 My Solution 题意:有n种饮料,每种的一份 2^(i-1)升花费ci 卢布…
E. Santa Claus and Tangerines 二分+贪心+记忆化搜索 My Solution 题意:有n个橘子,每个橘子可以…
CD Making 贪心法 Source The 5th UESTC Programming Contest Preliminary My Solution 秒杀…
C - Dean and Schedule 贪心、双端队列(deque)、队列(queue) Source UESTC 2016 Summer Training #1…
D. Green and Black Tea 数论+贪心 My Solution 题意:喝掉n袋茶,其中a袋绿茶b袋红茶,连续喝相同…
B. Sherlock and his girlfriend 素数筛法+贪心 My Solution 题意:给出一个n,表示有2、3、......n…
C. Okabe and Boxes 栈+last标记+贪心 My Solution 题意:有1~n这n个数,给出一个stack的push和pop…