Best Cow Line Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 32687 Accepted: 8660 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his…
Best Cow Line Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 42701 Accepted: 10911 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges hi…
Best Cow Line Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26670 Accepted: 7226 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his…
Description 给定长度为n的字符串S,要构造一个长度为n的字符串T.起初,T是空串,随后反复进行下列任意操作: 1.从S的头部删除一个字符,加到T的尾部 2.从S的尾部删除一个字符,加到T的尾部 目标是构造字典序最小的字符串T(1<=n<=2000) Input 第一行为字符串长度n,之后n行每行一个字符,字符串只包含大写字母 Output 输出字典序最小的字符串T,输出时一行只能输出80个字符 Sample Input 6 A C D B C B Samp…