比赛时虽然贪了心,不过后面没想到怎么处理和set的排序方法忘了- -,其实是和优先队列的仿函数一样的... 比赛后用set pair过了... #include <bits/stdc++.h> using namespace std; #define ll long long const int N = 200005; const ll mod = 1e9 + 7; const double eps = 1e-12; ll a[N]; struct node1 { ll d, dm, pos;…