标签 - 贪心

? 解题记录 ? ? Topcoder ? ? 构造 ? ? 二分答案 ? ? 贪心 ?    2019-03-09 09:17:46    628    0    0
Easy ForumPostEasy 题意:有一个论坛,告诉你一些文章发布的确切时间和模糊时间,让你推算当前可能的字典序最小的时间。 确切时间就是hh:mm:ss" role="presentation" style="position: relative;">hh:mm:sshh:mm:sshh:mm:ss表示时、分、秒。 模糊时间形如: few seconds ago" role="presentation" style="position: relative;">few seconds agofew s
? 解题记录 ? ? Topcoder ? ? 构造 ? ? 贪心 ? ? 状态压缩 ? ? 动态规划 ?    2019-03-02 10:12:10    598    0    0
Easy Lilypads 题意:一个n×m" role="presentation" style="position: relative;">n×mn×mn\times m的池塘,每一个格子有一片荷叶,一只青蛙从(x,y)" role="presentation" style="position: relative;">(x,y)(x,y)(x,y)开始跳,每一次可以向四个方向中的任何一个方向跳任意距离,但是不能两次往同一个方向跳,输出一种方案让青蛙经过每个格子恰好一次。 n,m≤50" role="presentation" sty
? 解题记录 ? ? Topcoder ? ? 贪心 ? ? 构造 ?    2019-03-01 19:55:13    337    0    0
Easy NextLuckyNumber 题意:给定整数x" role="presentation" style="position: relative;">xxx,找到比x" role="presentation" style="position: relative;">xxx大的数字d" role="presentation" style="position: relative;">ddd出现了a" role="presentation" style="position: relative;">aaa次的最小的整数。x≤1017,d&
? 解题记录 ? ? Atcoder ? ? 动态规划 ? ? 贪心 ?    2019-02-27 11:30:22    804    0    0
A Fairness 题意:三个人做游戏,每个人开始有一个数A,B,C" role="presentation" style="position: relative;">A,B,CA,B,CA,B,C。每一次一个人会用其它两个人的数的和替换自己的数,做k" role="presentation" style="position: relative;">kkk次操作,问最后A" role="presentation" style="position: relative;">AAA的减去B" role="presentation" style="position: relati
? 解题记录 ? ? Topcoder ? ? 贪心 ? ? 动态规划 ?    2019-02-26 11:24:38    319    0    0
Easy MaximizingGCD 题意:给你2n" role="presentation" style="position: relative;">2n2n2n个数,问把他们两两配对求和形成的n" role="presentation" style="position: relative;">nnn个数gcd" role="presentation" style="position: relative;">gcdgcdgcd最大是多少。n≤30,a≤109" role="presentation" style="positio
? 解题记录 ? ? Topcoder ? ? 贪心 ?    2019-02-26 08:15:15    340    0    0
Easy ModularQuadrant 题意:一个无限大的矩形,(r,c)位置的元素=max(r,c) mod3" role="presentation">(r,c)位置的元素=max(r,c) mod3(r,c)位置的元素=max(r,c) mod3(r,c)位置的元素=max(r,c)\ mod 3,查询一个子矩形内所有元素的和。 题解:格子内的值相当于到原点的切比雪夫距离模3" role="presentation">333
? 解题记录 ? ? Atcoder ? ? 贪心 ?    2019-02-18 15:01:45    334    0    1
A Candy Distribution Again 签到贪心,就不翻译了。 B Garbage Collector 题意:有n" role="presentation" style="position: relative;">nnn个垃圾排在线上,0" role="presentation" style="position: relative;">000处是垃圾桶,你要把n" role="presentation" style="position: relative;">nnn个垃圾捡到垃圾桶里面。拿着k" role="presentation" style
? 解题记录 ? ? Atcoder ? ? 线段树 ? ? 组合数 ? ? 贪心 ? ? 动态规划 ?    2019-02-16 15:14:38    586    0    0
A Two Abbreviations 签到题,就不翻译了 找两个串一段长度的gcd" role="presentation" style="position: relative;">gcdgcdgcd,判一判对应位置一不一样就可以了。 B Removing Blocks 题意:给你一个长度为N" role="presentation" style="position: relative;">NNN的序列,将N" role="presentation" style="position: relative;">NNN个数依次删掉。每一次删掉一个数的代价是这个数
? 解题记录 ? ? Atcoder ? ? 贪心 ? ? 最大流 ?    2019-02-14 15:49:52    684    0    0
A Irreversible operation 签到题,直接for" role="presentation" style="position: relative;">forforfor一遍就好了 B Powers of two 题意:给n" role="presentation" style="position: relative;">nnn个数字,要两两配对凑成和为2i" role="presentation" style="position: relative;">2i2i2^i的数对,问最多凑多少个。 题解:感觉上排个序从大往小匹配卡不掉,也不会证
? 解题记录 ? ? Atcoder ? ? 动态规划 ? ? 贪心 ? ? 卡特兰数 ?    2019-02-14 11:25:52    604    0    0
A Poisonous Cookies 没什么写头,纯贪心,随便贪贪心就行了。 B Tree Burning 题意:在一个长为L的环上,你一开始在0处。给定一些关键点的坐标。你可以重复做如下事情:选择一个方向,走到方向上第一个关键点停下并标记。当所有关键点都被标记时停止。问你最长能走多远。点数2×105" role="presentation" style="position: relative;">2×1052×1052\times 10^5 题解:直接考虑每一段被经过多少次不好考虑。可以把到一个关键点再回到0的过程看成一次操作。这样每一条路径