// URL: https://codeforces.com/contest/1536/problem/C // Memory Limit: 256 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://) #include<bits/stdc++.h> #defineILinline #definexfirst #defineysecond typedeflonglongll; usingnamespacestd; constintN=500010; intsum[N]; m...