随笔分类 -  贪心

摘要:[Educational Codeforces Round 99 (Rated for Div. 2)]-E. Four Points(枚举,贪心,思维) 题面: 题意: 每组数据给定四个二维平面上的点,每一次操作:你可以选择一个点将其移动到上下左右四个方向中的一个点。 现在问你最少多少次操作,可以 阅读全文
posted @ 2020-12-01 17:29 茄子Min 阅读(443) 评论(0) 推荐(4)
摘要:2020ICPC·小米 网络选拔赛第二场 A-2020(二分答案) 题面: 题意: 给定一个只含有$0,1,2$的字符串,现在问你可以把字符串最多分成多少个互不相交的子序列,其中每一个子序列是$2020$. 思路: 在区间$[0,\frac{4}]$ 中二分答案,对于当前的需要check的答案$mi 阅读全文
posted @ 2020-10-31 21:35 茄子Min 阅读(242) 评论(0) 推荐(0)
摘要:[Educational Codeforces Round 82 (Rated for Div. 2)] D. Fill The Bag (二进制拆分,贪心) D. Fill The Bag time limit per test 2 seconds memory limit per test 25 阅读全文
posted @ 2020-02-14 23:09 茄子Min 阅读(192) 评论(0) 推荐(0)
摘要:[Educational Codeforces Round 81 (Rated for Div. 2) C. Obtain The String(序列自动机,贪心) C. Obtain The String time limit per test 1 second memory limit per 阅读全文
posted @ 2020-01-30 23:30 茄子Min 阅读(350) 评论(0) 推荐(0)
摘要:Codeforces Round 615 (Div. 3) F. Three Paths on a Tree 题目链接:https://codeforces.com/contest/1294/problem/F time limit per test 2 seconds memory limit p 阅读全文
posted @ 2020-01-28 17:47 茄子Min 阅读(326) 评论(0) 推荐(0)
摘要:牛客练习赛48 A· 小w的a+b问题 链接:https://ac.nowcoder.com/acm/contest/923/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K Special Judge, 64bit IO Forma 阅读全文
posted @ 2019-11-03 23:42 茄子Min 阅读(366) 评论(0) 推荐(0)
摘要:C. Vasily the Bear and Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasily th 阅读全文
posted @ 2019-10-25 18:51 茄子Min 阅读(186) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/1114/E来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 老瞎眼有一个长度为 n 的数组 a, 阅读全文
posted @ 2019-10-23 20:28 茄子Min 阅读(239) 评论(0) 推荐(0)
摘要:G. Castle Defense time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output Today you are going 阅读全文
posted @ 2019-10-19 21:15 茄子Min 阅读(203) 评论(0) 推荐(0)
摘要:Diagonal Walking v.2 "CodeForces 1036B " Mikhail walks on a Cartesian plane. He starts at the point (0,0)(0,0), and in one move he can go to any of ei 阅读全文
posted @ 2019-09-13 01:51 茄子Min 阅读(320) 评论(0) 推荐(0)
摘要:A tourist hiked along the mountain range. The hike lasted for n days, during each day the tourist noted height above the sea level. On the i th day he 阅读全文
posted @ 2019-08-26 15:56 茄子Min 阅读(395) 评论(0) 推荐(0)
摘要:B. Mislove Has Lost an Array time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Mislove had an a 阅读全文
posted @ 2019-08-21 01:15 茄子Min 阅读(329) 评论(0) 推荐(0)
摘要:Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 833 Accepted Submission(s): 200 Problem Des 阅读全文
posted @ 2019-08-18 21:28 茄子Min 阅读(399) 评论(0) 推荐(0)
摘要:A long time ago, in a galaxy far far away two giant IT corporations Pineapple and Gogol continue their fierce competition. Crucial moment is just arou 阅读全文
posted @ 2019-08-13 15:09 茄子Min 阅读(309) 评论(0) 推荐(0)
摘要:E. Byteland, Berland and Disputed Cities time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The 阅读全文
posted @ 2019-07-30 19:08 茄子Min 阅读(195) 评论(0) 推荐(0)
摘要:D1. RGB Substring (easy version) time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The only di 阅读全文
posted @ 2019-07-26 01:01 茄子Min 阅读(383) 评论(0) 推荐(0)
摘要:链接:https://ac.nowcoder.com/acm/contest/897/J 来源:牛客网 Binary Number 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 As a pr 阅读全文
posted @ 2019-07-20 18:15 茄子Min 阅读(284) 评论(0) 推荐(0)
摘要:Kiki likes traveling. One day she finds a magic lamp, unfortunately the genie in the lamp is not so kind. Kiki must answer a question, and then the ge 阅读全文
posted @ 2019-07-19 21:16 茄子Min 阅读(295) 评论(0) 推荐(0)
摘要:There are N schedules, the i th schedule has start time si and end time ei (1 题意: 思路: 先把每一个任务按照起始时间排序,然后用一个multiset维护每一个机器在做任务的终止时间, 对于每一个任务,我们去multis 阅读全文
posted @ 2019-07-13 15:04 茄子Min 阅读(306) 评论(0) 推荐(0)
摘要:B. Split a Number time limit per test2 seconds memory limit per test512 megabytes inputstandard input outputstandard output Dima worked all day and wr 阅读全文
posted @ 2019-06-16 21:19 茄子Min 阅读(531) 评论(0) 推荐(0)