随笔分类 - 贪心
摘要:Maximal GCD 题目链接:http://codeforces.com/problemset/problem/735/D ——每天在线,欢迎留言谈论。 题目大意: 给你一个n(2≤n≤2e9) 代表一个人的收入。 他需要交税,规则:交税金额为n的最大公约数(本身不算) 他想通过把钱分成几份,然
阅读全文
摘要:Tennis Championship 题目链接:http://codeforces.com/problemset/problem/735/C ——每天在线,欢迎留言谈论。 题目大意: 给你一个 n (2≤n≤10^18),代表一共有n位参加比赛的选手。 游戏规则: ①每次比赛,输的选手将离开赛场
阅读全文
摘要:The Smallest String Concatenation 题目链接:http://codeforces.com/problemset/problem/632/C ——每天在线,欢迎留言谈论。 题目大意: 给你n个字符串,相加后 字典序最小 思路: 只需要保证每个相邻的两个字符串组合后 s1
阅读全文
摘要:Magazine Ad 题目链接:http://codeforces.com/contest/803/problem/D ——每天在线,欢迎留言谈论。 题目大意: 给你一个数字k,和一行字符 例: 4garage for sa-le 其中这行字符串能够在 ' '与'-'的后面分割。例如分割为:(点代
阅读全文
摘要:Children's Game Problem Description There are lots of number games for children. These games are pretty easy to play but not so easy to make. We will
阅读全文