Chat in a Circle
单纯写自己看的
题目链接
题目意思就不说了,直接说解题思路
除了数组中最大的数字只能用一次外,每个数字都可以用两次
比如1,2,3,4,5
对应3, 4, 4, 5, 0
根据这个思路 代码如下
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
const int N = 2e5+5;
int a[N];
int main()
{...
原创
2020-07-24 04:10:15 ·
282 阅读 ·
0 评论