CodeForces 660B Seating On Bus
模拟。
#include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<algorithm> using namespace std; int main() { int n,m; scanf("%d%d",&n,&m); for(int i=1;i<=2*n;i++) { if(2*n+i<=m) printf("%d ",2*n+i); if(i<=m) printf("%d ",i); } printf("\n"); return 0; }