Description 经过三十多个小时的长途跋涉,小Z和小D终于到了NOI现场——南山南中学.一进校园,小D就被花所吸引了(不要问我为什么),遍和一旁的种花园丁交(J)流(L)了起来. 他发现花的摆放竟有如此奥秘:圆形广场共有 N 个种花的位置,顺时针编号1到N.并且每个位置都有一个美观度ai ,如果在这里种花就可以得到这ai 的美观度.但由于地处南山土壤肥力欠佳,两株花不能种在相邻的位置(1号和N号也算相邻位置).校方一共给了 M 株花,经过园丁的精妙摆放,才能如此吸引小D.所以现在小D也想
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Given a consecutive number sequence S 1, S 2, S 3,