题目链接 题意不难理解,解法具体看代码及注释吧.. #include<bits/stdc++.h> using namespace std; typedef long long LL; ; int n,k; int ql,qr; int pos; //当前要出队的人在剩余人中排在第几靠左的地方 struct node { int l,r; int pre; //记录区间中剩余的最靠右的人在所有剩余人中的位置 int lz; //lazy标记 } a[maxn<<]; void pu…
Problem Description In order to remember history, King plans to play losephus problem in the parade gap.He calls n(1≤n≤5000) soldiers, counterclockwise in a circle, in label 1,2,3...n. The first round, the first person with label 1 counts off, and th…
3832: [Poi2014]Rally Time Limit: 20 Sec Memory Limit: 128 MBSec Special JudgeSubmit: 168 Solved: 84[Submit][Status][Discuss] Description An annual bicycle rally will soon begin in Byteburg. The bikers of Byteburg are natural long distance cyclists…