Dancepted

Dancing Acceped!

2019年1月8日

Codeforces1099F. Cookies(线段树+dp+贪心+博弈)

摘要: 题目链接:传送门 思路: 分析到处理节点时的吃cookie的顺序了,然鹅不会用线段树维护前缀和。技术门槛QAQ。。。 很容易想到可以从root开始搜索,每次深入消耗时间2*边权w。 然后对于深入到点u开始返回的话,想要尽量多地吃cookie,就要贪心地选择用时短的cookie,也就是: 当前节点为u 阅读全文

posted @ 2019-01-08 23:29 Danceped 阅读(334) 评论(0) 推荐(0) 编辑

2019年1月7日

Codeforces1099D.Sum in the tree(贪心)

摘要: 题目链接:传送门 思路: 一个节点放的数越大,那么以它为根的子树的节点权值之和就越小。 所以我们要在合法的范围内,使偶数层节点的权值尽可能地大。也就是说,令它的权值是子节点的最小值,这样保证了它的子节点权值为正。 因为奇数层的节点的s已知,所以修改偶数层的节点仅影响,向下一层的节点。(因为再往下的话 阅读全文

posted @ 2019-01-07 23:25 Danceped 阅读(118) 评论(0) 推荐(0) 编辑

叮,出现!

摘要: 期末考终于结束,回归训练。 阅读全文

posted @ 2019-01-07 22:41 Danceped 阅读(73) 评论(0) 推荐(0) 编辑

2018年12月1日

Codeforces1056E.Check Transcription(枚举+Hash)

摘要: 题目链接:传送门 题目: E. Check Transcription time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output One 阅读全文

posted @ 2018-12-01 21:28 Danceped 阅读(271) 评论(0) 推荐(0) 编辑

2018年11月27日

2018.11.25 AMC-ICPC 亚洲区域赛(焦作站)吊银

摘要: 11月23日 大清早,跟着wyb的脚步,早起跑过去听方伟的编译原理,然鹅一点都没听进去,在焦作胡辣汤群里疯狂灌水。。。 听说焦作那边冷得不行,前一天看天气预报说那边已经是2℃了,都快零下了,然鹅学校里正好都没有厚的衣服。看队友一个披着黑色大衣,另一个全身裹得严严实实,而我只有秋装三件套,外套毛衣T恤 阅读全文

posted @ 2018-11-27 15:52 Danceped 阅读(536) 评论(0) 推荐(0) 编辑

2018年11月18日

Gym101889J. Jumping frog(合数分解+环形dp预处理)

摘要: 比赛链接:传送门 题目大意: 一只青蛙在长度为N的字符串上跳跃,“R”可以跳上去,“P”不可以跳上去。 字符串是环形的,N-1和0相连。 青蛙的跳跃距离K的取值范围是[1, N-1],选定K之后不可改变。 要求青蛙最后能跳回起点(起点可以是0-N-1的任意一个位置),问K的取值有多少种选择。 3≤N 阅读全文

posted @ 2018-11-18 23:05 Danceped 阅读(396) 评论(0) 推荐(0) 编辑

Gym101889E. Enigma(bfs+数位)

摘要: 比赛链接:传送门 题目大意: 求一个十进制大数S(有部分数位为"?")能被N整除时的最小值,如果没有办法被N整除,输出"*"。 思路: 一个数位上的数值增加1后,对N取模时的贡献可以预处理出来。设为mod[MAX_N]。 先把整个十进制大数置成最小的合法状态,存在res中。(问号置为0或1) 此时的 阅读全文

posted @ 2018-11-18 22:45 Danceped 阅读(197) 评论(0) 推荐(0) 编辑

Gym101889B. Buggy ICPC(打表)

摘要: 比赛链接:传送门 题目: Problem B – Buggy ICPC Author : Gabriel Poesia, Brasil Alan Curing is a famous sports programmer. He is the creator of the theoretical mo 阅读全文

posted @ 2018-11-18 22:28 Danceped 阅读(491) 评论(0) 推荐(0) 编辑

2018年11月16日

Codeforces1076F. Summer Practice Report(贪心+动态规划)

摘要: 题目链接:传送门 题目: F. Summer Practice Report time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output V 阅读全文

posted @ 2018-11-16 20:51 Danceped 阅读(196) 评论(0) 推荐(0) 编辑

2018年11月15日

Codeforces1062D. Fun with Integers(埃氏筛)

摘要: 题目链接:传送门 题目: D. Fun with Integers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You ar 阅读全文

posted @ 2018-11-15 17:21 Danceped 阅读(212) 评论(0) 推荐(0) 编辑

导航