----最短路-----
chen_zan_yu
一生所爱
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
B. Obtaining the String
题目链接:http://codeforces.com/problemset/problem/1015/B 题目大意: 给你两个字符串s、t,长度均为n,你每次只能将si-1与si交换位置,如果最终能将s交换成为t,则输出最小的交换次数,否则输出-1 思路:使用贪心的思想即可。 从1到n枚举t的每一位,若ti!=si,则寻找sj(j>i)于ti相同,若...原创 2018-09-10 23:29:23 · 236 阅读 · 0 评论 -
Frogger (18.9.10)
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sun...原创 2018-09-10 23:52:02 · 195 阅读 · 0 评论
分享