WA on #14 #15 #18 QwQ #include <iostream> #include <algorithm> #define ll __int128 using namespace std; const int N = 2e6 + 10; int n, a[N], sz[N], f[N]; bool in[N]; ll ans; struct node { int x, id; bool operator < (const node &k) const { return x < k.x; } } b[N]; int rd() { in...