Problem 1004 题目描述有误

xushu | 2017-08-05 17:13:53Author
加和相等时选字典序最大的
1508180145 | 2017-08-05 22:28:12# 11
这道题使用背包做吗?
arkbriar | 2017-08-05 22:42:36# 12
> 先选长的,长度相同就从第一个元素比较下来,遇到第一个较大元素时选择那个方案 这个不叫字典序... 我还特地试了下字典序大的... Lexicographical comparison is a operation with the following properties: + Two ranges are compared element by element. + The first mismatching element defines which range is lexicographically less or greater than the other. + If one range is a prefix of another, the shorter range is lexicographically less than the other. + If two ranges have equivalent elements and are of the same length, then the ranges are lexicographically equal. + An empty range is lexicographically less than any non-empty range. + Two empty ranges are lexicographically equal. 还有如果数组是和我一样倒着存的...注意一下
dealdeath | 2017-08-05 23:07:42# 13
12楼,正确的字典序,应该是比较前缀min(n1,n2)长度的位数,中间发现不同则确定大小,如果相同前缀则看位数确定大小,是这样吧?
arkbriar | 2017-08-05 23:10:34# 14
是的
lgking | 2017-08-06 12:55:49# 15
感谢8楼和9楼,这组数据我对不上,改下就AC了。我是按字典序最小做的。
qiuxueming | 2017-08-06 13:10:47# 16
大佬输出几行啊,PE到哭了