AtCoder Petrozavodsk Contest 001 D – Forest 连通块+并查集+贪心

D - Forest My Solution 题意:给出一个由n个点m条边构成的森林,每个点有个权值val[i],额外加一条边…

  • ACM-ICPC题解图论贪心
  • 2018/2/5
  • 196
  • Codeforces Hello 2018 D. Too Easy Problems 二分+贪心

    D. Too Easy Problems 二分+贪心 My Solution 题意:有m个题目,每个题目有个需要花费的时间ti,以…

  • ACM-ICPC题解二分法贪心
  • 2018/1/13
  • 157
  • Codeforces Round #456 (Div. 2) B. New Year’s Eve 贪心、构造、位运算、异或和

    B. New Year's Eve 贪心、构造、位运算、异或和 My Solution 题意:给出1~n这n个数,最多选k个数,…

  • ACM-ICPC题解贪心
  • 2018/1/13
  • 155
  • Codeforces Hello 2018 C. Party Lemonade 贪心、优先队列

    C. Party Lemonade 贪心、优先队列 My Solution 题意:有n种饮料,每种的一份 2^(i-1)升花费ci 卢布…

  • ACM-ICPC题解贪心
  • 2018/1/13
  • 159
  • Codeforces Round #389 (Div. 2) E. Santa Claus and Tangerines 二分+贪心+记忆化搜索

    E. Santa Claus and Tangerines 二分+贪心+记忆化搜索 My Solution 题意:有n个橘子,每个橘子可以…

  • ACM-ICPC题解二分法
  • 2017/11/9
  • 139
  • UESTC 65 CD Making 贪心法

    CD Making 贪心法 Source The 5th UESTC Programming Contest Preliminary My Solution 秒杀…

  • ACM-ICPC题解贪心
  • 2017/10/31
  • 136
  • URAL 2026 Dean and Schedule 贪心、双端队列(deque)、队列(queue)

    C - Dean and Schedule 贪心、双端队列(deque)、队列(queue) Source UESTC 2016 Summer Training #1…

  • ACM-ICPC题解贪心
  • 2017/9/22
  • 143
  • Codeforces Round #386 (Div. 2) D. Green and Black Tea 数论+贪心

    D. Green and Black Tea 数论+贪心 My Solution 题意:喝掉n袋茶,其中a袋绿茶b袋红茶,连续喝相同…

  • ACM-ICPC题解数学题
  • 2017/8/12
  • 152
  • Codeforces Round #400 (Div. 1 + Div. 2, combined) B. Sherlock and his girlfriend 素数筛法+贪心

    B. Sherlock and his girlfriend 素数筛法+贪心 My Solution 题意:给出一个n,表示有2、3、......n…

  • ACM-ICPC题解数学题贪心
  • 2017/8/2
  • 112
  • Codeforces Round #420 (Div. 2) C. Okabe and Boxes 栈+last标记+贪心

    C. Okabe and Boxes 栈+last标记+贪心 My Solution 题意:有1~n这n个数,给出一个stack的push和pop…

  • ACM-ICPC题解数据结构
  • 2017/7/23
  • 149