div1 250pt 题意:一个长度最多50的字符串,每次操作可以交换相邻的两个字符,问,经过最多MaxSwaps次交换之后,最多能让多少个相同的字符连起来 解法:对于每种字符,枚举一个“集结点”,让其他相同的字符尽可能和它连起来. // BEGIN CUT HERE // END CUT HERE #line 5 "ColorfulChocolates.cpp" #include<cstdio> #include<cstring> #include<cs…
首先我们来简单看一下这道题的statement Problem Statement Note that in the following problem statement, all quotes and angle brackets are for clarity A certain vending machine delves out its goods from a rotating cylinder, which can rotate around in both clockw…