版本比较
题解:AT_cf17_exhibition_b Increment and Swap
正文
增加 2 行删除 2 行
42 行未改动4344454647474849505158 行未改动11011111211311411411511611711842 行未改动#include<bits/stdc++.h>using namespace std;#define ll long longconst int inf=1.1e9;bool _u; bool _u;struct node{ int ls,rs; int tag; pair<int,int> mn;58 行未改动 cin>>x; pair<int,int> res=query(rt,1,inf,x,inf); ans+=res.first-x; if(res.second>1) add(rt,1,inf,1,res.second-1,1);// cout<<res.first<<"\n"; // cout<<res.first<<"\n"; } cout<<ans<<"\n";}```