#include #include #include using namespace std; typedef long long LL; const LL maxn=65536; const LL maxm=1e6+5; LL L,R,p[maxn],v[maxn],pcnt; bool flg[maxm]; LL tot,num[maxm]; void solve() { memset(flg,1,sizeof(flg)); for(LL i=0;irb-lb) lb=num[i],rb=num[i+1]; } printf("%lld,%lld are closest, %lld,%lld are most distant.\n",la,ra,lb,rb); } int main() { #ifdef local freopen("pro.in","r",stdin); #endif for(LL i=1;i