https://code.google.com/codejam/contest/3274486/dashboard Problem The kitchen at the Infinite House of Pancakes has just received an order for a stack of K pancakes! The chef currently has N pancakes available, where N ≥ K. Each pancake is a cylinder…
题目大意:给你\(A\)个a,\(B\)个b,\(C\)个c,要你构造一个字符串,使它的最小循环表示法最大.求这个表示法.解题思路:不知道怎么证,但把a.b.c当做单独的字符串扔进容器,每次把字典序最小的和字典序最大的两个字符串合并就是答案.容器用multiset即可. C++ Code: #include<cstdio> #include<set> #include<string> using namespace std; multiset<string>…