3617专题

POJ 3617 字典序最小

题目链接 错误解法: 例如 CBAC 得到的将是  CBAC 正确应为 CABC 错误原因 是 每次只比较 首尾两个元素 而忽略了总体字典序最小的问题 此种 当C相等时应继续比较 B A 进而选择右侧的C而不是当C相等时随便选取一个C for(i = 0, j = n-1; i <= j; ){if(S[i] < S[j]){// res[count++] = S[i++];

poj 3617 Best Cow Line

Best Cow Line Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14718 Accepted: 4188 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" compe

Pku oj 3617 Best Cow Line(贪心)

Best Cow Line Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16209 Accepted: 4575 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" comp