0≤ki≤n\color{red}0\color{black}\le k_i\le n0≤ki≤n。
80:\color{purple}80:80:
int f1=ls[cur.front()],f2=f1;
100:\color{green}100:100:
if(cur.size()==0) continue; int f1=ls[cur.front()],f2=f1;
用STL,谨防RE,警钟撅烂。