版本比较
3.27总结
正文
增加 6 行删除 6 行
21 行未改动222324252626272829302 行未改动3334353637373839404119 行未改动616263646565666768696869707172739 行未改动8384858687878889909134 行未改动21 行未改动 op.push(n); op.push(op.front()); op.pop(); n-=1; } } while(op.size()) { a[++cnt]=op.front(); op.pop();2 行未改动 { cout<<a[i]<<' '; } return 0;} }```### P8641###### 题意:有一圈无序的卡片,上面写着1到n。你可以选任意一个位置开始,然后顺时针数。###### 1.如果你的数正好等于当前卡片的数字,就把这张卡片拿走,然后从下一张开始重新数1。19 行未改动 a[i]=a[i-n]; } for(int i=1;i<=n;++i) { queue <long long>op; queue <long long>op; for(int j=i;j<=i+n-1;++j) { op.push(a[j]); } op.push(a[j]); } int now=0,sum=0; while(op.size()!=0 && now<=n) { now++;9 行未改动 op.pop(); } } maxi=max(maxi,sum); } } cout<<maxi; return 0;}```34 行未改动