上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 55 下一页
摘要: 牛客练习赛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)
摘要: CF GYM [2019 USP Try outs] 部分题解 "C Crystal Matryoshkas" 思路: 贪心策略: 首先使用$multiset$,这个优秀的容器来储存当前剩余的套娃重量。 假设当前要包含的套娃重量为$\mathit X$,那么: 如果存在比当前套碗重量轻的套娃,选择重 阅读全文
posted @ 2020-05-19 23:18 茄子Min 阅读(407) 评论(0) 推荐(0)
摘要: 第十七届同济大学程序设计预选赛暨高校网络友谊赛 C 张老师的旅行 链接:https://ac.nowcoder.com/acm/contest/5477/C 来源:牛客网 题目描述 张老师到了一个王国去旅游,王国有n个景点,张老师到达这个城市所在的车站恰好位于第x个景点,这个王国非常特别,恰好所有著 阅读全文
posted @ 2020-05-17 15:55 茄子Min 阅读(189) 评论(0) 推荐(0)
摘要: [Codeforces Round 642 (Div. 3)] ABCDEF题解 A. Most Unstable Array 思路: 当$n=1$时答案为$\text 0$, 当$n=2$时答案为$\mathit n$, 当$n=3$时答案为$2 n$, 代码: B. Two Arrays And 阅读全文
posted @ 2020-05-15 17:45 茄子Min 阅读(264) 评论(0) 推荐(0)
摘要: [NCD 2019] G. Ali and the Breakfast (解析几何) G. Ali and the Breakfast time limit per test 1 second memory limit per test 256 megabytes input standard in 阅读全文
posted @ 2020-05-07 01:03 茄子Min 阅读(234) 评论(0) 推荐(0)
摘要: [AtCoder Beginner Contest 165] E Rotation Matching (构造) Problem Statement You are going to hold a competition of one to one game called AtCoder Janken 阅读全文
posted @ 2020-05-05 21:49 茄子Min 阅读(314) 评论(0) 推荐(0)
摘要: [2019 ICPC Universidad Nacional de Colombia Programming Contest] 题解 A. Amazon Amazon has grown so much these days, it has decided to build its own sub 阅读全文
posted @ 2020-04-30 22:32 茄子Min 阅读(324) 评论(0) 推荐(0)
摘要: [Educational Codeforces Round 86 (Rated for Div. 2)] E. Placing Rooks (组合数学,容斥定律) E. Placing Rooks time limit per test 2 seconds memory limit per test 阅读全文
posted @ 2020-04-29 22:57 茄子Min 阅读(430) 评论(0) 推荐(0)
摘要: [AtCoder Beginner Contest 164] E Two Currencies (分层最短路) Problem Statement There are NN cities numbered 11 to NN, connected by MM railroads. You are no 阅读全文
posted @ 2020-04-28 01:30 茄子Min 阅读(456) 评论(0) 推荐(0)
摘要: 牛客算法周周练3 C 小雨坐地铁(分层最短路) 链接:https://ac.nowcoder.com/acm/contest/5338/C 来源:牛客网 思路: $dp[i][j]$ 表示到第$\mathit i$个节点时在第$\mathit j$个地铁上的最小花费。 然后$dijkstra$算法跑 阅读全文
posted @ 2020-04-24 16:40 茄子Min 阅读(362) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 55 下一页