Petrozavodsk Winter Camp, Day 8, 2014, Fine Brochures
1的个数-块的个数+多减的个数+flag多减的只会在一个循环末尾出现#includeusingnamespacestd;#definerep(i,j,k)for(inti=int(j);i=int(k);--i)typedeflonglongLL;LLk,m,n;LLgcd(LLa,LLb){if(!b)returna;returngcd(b,a%b);}intmain(){cin>>k>>m>>