随笔分类 -  动态规划DP

摘要:牛客练习赛64 D 宝石装箱(容斥定律,背包) 链接:https://ac.nowcoder.com/acm/contest/5633/D 来源:牛客网 题意: n颗宝石装进n个箱子使得每个箱子中都有一颗宝石。第i颗宝石不能装入第ai个箱子。求合法的装箱方案对998244353取模。 两种装箱方案不 阅读全文
posted @ 2020-05-23 12:26 茄子Min 阅读(273) 评论(0) 推荐(0)
摘要:第十七届同济大学程序设计预选赛暨高校网络友谊赛 C 张老师的旅行 链接:https://ac.nowcoder.com/acm/contest/5477/C 来源:牛客网 题目描述 张老师到了一个王国去旅游,王国有n个景点,张老师到达这个城市所在的车站恰好位于第x个景点,这个王国非常特别,恰好所有著 阅读全文
posted @ 2020-05-17 15:55 茄子Min 阅读(189) 评论(0) 推荐(0)
摘要:AtCoder Beginner Contest 163 E Active Infants (DP) Problem Statement There are NN children standing in a line from left to right. The activeness of th 阅读全文
posted @ 2020-04-21 15:38 茄子Min 阅读(274) 评论(0) 推荐(0)
摘要:牛客算法周周练2 链接:https://ac.nowcoder.com/acm/contest/5203/B 来源:牛客网 Music Problem 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 阅读全文
posted @ 2020-04-17 18:04 茄子Min 阅读(395) 评论(0) 推荐(0)
摘要:[Educational Codeforces Round 83 ] E. Array Shrinking (区间DP) E. Array Shrinking time limit per test 2 seconds memory limit per test 256 megabytes inpu 阅读全文
posted @ 2020-03-10 22:27 茄子Min 阅读(306) 评论(0) 推荐(0)
摘要:[AtCoder Beginner Contest 158] F Removing Robots (线段树+DP) Problem Statement There are NN robots numbered 11 to NN placed on a number line. Robot ii is 阅读全文
posted @ 2020-03-09 20:10 茄子Min 阅读(308) 评论(0) 推荐(0)
摘要:[CodeCraft 20 (Div. 2)] E. Team Building (状压DP) E. Team Building time limit per test 3 seconds memory limit per test 256 megabytes input standard inpu 阅读全文
posted @ 2020-03-05 22:20 茄子Min 阅读(460) 评论(0) 推荐(0)
摘要:AtCoder Beginner Contest 155 D Pairs , E Payment 题解 D Pairs We have NN integers A1,A2,...,ANA1,A2,...,AN. There are N(N−1)2N(N−1)2 ways to choose two 阅读全文
posted @ 2020-02-17 15:47 茄子Min 阅读(532) 评论(0) 推荐(1)
摘要:Codeforces Round 612 (Div. 2) C. Garland 动态规划 题目链接: https://codeforces.com/contest/1287/problem/C ​ C. Garland time limit per test 1 second memory lim 阅读全文
posted @ 2020-01-18 16:55 茄子Min 阅读(362) 评论(0) 推荐(0)
摘要:2018 ACM 国际大学生程序设计竞赛上海大都会赛重现赛 J Beautiful Numbers (数位DP) 链接:https://ac.nowcoder.com/acm/contest/163/J?&headNav=acm来源:牛客网 时间限制:C/C++ 8秒,其他语言16秒 空间限制:C/ 阅读全文
posted @ 2019-11-07 17:17 茄子Min 阅读(196) 评论(0) 推荐(0)
摘要:"Educational Codeforces Round 63 (Rated for Div. 2)" D. Beautiful Array time limit per test 2 seconds memory limit per test 256 megabytes input standa 阅读全文
posted @ 2019-10-29 22:19 茄子Min 阅读(216) 评论(0) 推荐(0)
摘要:Removal 链接:https://ac.nowcoder.com/acm/contest/139/E来源:牛客网 题目描述 Bobo has a sequence of integers s1, s2, ..., sn where 1 ≤ si ≤ k. Find out the number 阅读全文
posted @ 2019-10-29 09:49 茄子Min 阅读(344) 评论(0) 推荐(0)
摘要:牛客练习赛53 超越学姐爱字符串 链接:https://ac.nowcoder.com/acm/contest/1114/A来源:牛客网 超越学姐非常喜欢自己的名字,以至于英文字母她只喜欢“c”和“y”。因此超越学姐喜欢只含有“c”和“y”的字符串,且字符串中不能出现两个连续的“c”。请你求出有多少 阅读全文
posted @ 2019-10-16 20:53 茄子Min 阅读(209) 评论(0) 推荐(0)
摘要:牛客练习赛52 | C | "烹饪" | | | | | | | 链接:https://ac.nowcoder.com/acm/contest/1084/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format 阅读全文
posted @ 2019-10-08 00:23 茄子Min 阅读(351) 评论(0) 推荐(0)
摘要:"D Yet Another Problem On a Subsequence" "CodeForces 1000D " The sequence of integers a1,a2,…,aka1,a2,…,ak is called a good array if a1=k−1a1=k−1 and 阅读全文
posted @ 2019-09-12 15:22 茄子Min 阅读(306) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/1072/L?&headNav=acm&headNav=acm 来源:牛客网 乘积最大 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format 阅读全文
posted @ 2019-08-13 19:25 茄子Min 阅读(189) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/160/B 来源:牛客网 题目描述 给一个含n个点m条边的有向无环图(允许重边,点用1到n的整数表示),每条边上有一个字符,问图上有几条路径满足路径上经过的边上的字符组成的的字符串去掉空格后以大写字母开头,句号 '.' 结 阅读全文
posted @ 2019-07-30 20:59 茄子Min 阅读(156) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/984/K 来源:牛客网 金币馅饼 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 最近,奶牛们热衷于把金币包在面粉 阅读全文
posted @ 2019-07-26 22:17 茄子Min 阅读(263) 评论(0) 推荐(0)
摘要:题目链接: https://www.cometoj.com/contest/29/problem/A?problem_id=414 Aqours 题目描述 Aqours 正在 LoveLive! 决赛中表演,舞台可以看作是一棵 nn 个点的有根树,其中根节点是 1 号点,ii 号点的父亲节点为 p_ 阅读全文
posted @ 2019-07-26 17:15 茄子Min 阅读(237) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/180/B 来源:牛客网 烟花 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 题目描述 小 阅读全文
posted @ 2019-07-26 02:10 茄子Min 阅读(253) 评论(0) 推荐(0)