This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#### 1、约瑟夫环可以使用队列来模拟。
> 测试用例:
5 3 3
> 答案:
2 4 5 7 8
#### 2、输入 x,y,k 怎么理解?x:男生人数,y:女生人数,k:走到几出列,比如3
```c++
cin>>x>>y>>k;
```
#### 3、队列初始化
queue<int> q;
balabala
#### 4、操作队列
int cnt=0;
while(剩余x个位置){
auto t=q.front();
q.pop();
cnt++;
是k的倍数,则干掉,不重新入队列,否则重新入队列 balabala
}
#### 5、输出男同学的位置
while(队列不空){
输出弹出的位置号
#### 6、需要排序
int a[N],idx;
while(q.size()){
a[++idx]=t;
sort(a+1,a+1+x);
for(int i=1;i<=x;i++>)
cout<<a[i]<<" ";