Best Cow Line ---- 贪心算法

Time Limit: 1000MS   Memory Limit: 65536K
Total Submissions: 10071   Accepted: 3051

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 cows in a line and herds them past the judges.

The contest organizers adopted a new registration scheme this year: simply register the initial letter of every cow in the order they will appear (i.e., If FJ takes Bessie, Sylvia, and Dora in that order he just registers BSD).

你可能感兴趣的:(C,&&,C++,算法)