摘要: Programming Contest 题目链接:F - Programming Contest (atcoder.jp) 题目大意 ​用T分钟的时间去解决N道题,每道题需要相应的时间。可以选择其中的任意道,使剩下的时间最少。 解题思路 ​最容易想到的就是递归遍历所有的可能,然后取满足条件的最大值。 阅读全文
posted @ 2020-11-23 20:11 凰琊 阅读(66) 评论(0) 推荐(0) 编辑
摘要: String Transformation 1 题目链接:Codeforces Round #659(div2) C.String Transformation 1 题目描述 Koa the Koala has two strings A and B of the same length n (|A 阅读全文
posted @ 2020-07-25 11:07 凰琊 阅读(247) 评论(1) 推荐(1) 编辑
摘要: Harder Gcd Problem 题目描述 After solving the Basic Gcd Problem, ZYB gives you a more difficult one: Given an integer n, find two subset A and B of {1,2,. 阅读全文
posted @ 2020-07-23 20:55 凰琊 阅读(165) 评论(0) 推荐(1) 编辑
摘要: 农场派对 ====== 题目描述 N(1≤N≤1000)头牛要去参加一场在编号为x(1≤x≤N)的牛的农场举行的派对。有M(1≤M≤100000)条有向道路,每条路长Ti(1≤Ti≤100);每头牛都必须参加完派对后回到家,每头牛都会选择最短路径。求这N头牛的最短路径(一个来回)中最长的一条的长度。 阅读全文
posted @ 2020-05-01 09:48 凰琊 阅读(292) 评论(0) 推荐(1) 编辑
摘要: Mahmoud and a Message 题目链接: Codeforces Round #396 (Div. 2) C. Mahmoud and a Message 题目描述 Mahmoud wrote a message s of length n. He wants to send it as 阅读全文
posted @ 2020-04-28 21:48 凰琊 阅读(156) 评论(0) 推荐(1) 编辑
摘要: Friends ====== 题目描述 给定一个字符串S,先将字符串S复制一次(变成双倍快乐),得到字符串T,然后在T中插入一个字符,得到字符串U。 给出字符串U,重新构造出字符串S。 所有字符串只包含大写英文字母。 输入描述 第一行一个整数N,表示字符串U的长度。 N include using 阅读全文
posted @ 2020-04-23 23:03 凰琊 阅读(143) 评论(0) 推荐(1) 编辑