#include #include #include #define MN 20000 #define MS 200000 int n,st[MN+5],len[MN+5]; bool vis[MN+5]; struct data{ int t,p,id; bool operator < (const data &that)const{ if(this->t != that.t) return this->t < that.t; return this->p < that.p; } }d[MS+5]; void solve(){ scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&len[i]); st[i] = st[i-1] + len[i-1]; for(int j=0;j