摘要: A - Sorted Adjacent Differences 题意:给一个数组,对他重新排序,使其相邻两数的差值不断递增 题解:给数组从小到大排序,差值最小的是中间的两个数,然后再向两端延伸,能保证差值是增大的 然后再根据n的奇偶性判断一下 #include<iostream> #include< 阅读全文
posted @ 2020-05-30 21:40 Endeavo_r 阅读(172) 评论(0) 推荐(0)