首页 > TAG信息列表 > Uva133

UVa133

题目描述 代码 #include<stdio.h> #define maxn 25 int n, k, m, a[maxn]; // n 是人数,官员 A 从 1 开始逆时针数数,数 k 个然后停下来,官员 B 从 n 开始数数,数 m 个停下来 // 逆时针走 t 步,步长是 d (-1 表示顺时针走),返回新位置,从 p 出发 int go(int p, int d, int t) { whi

Uva133

The Dole Queue UVA - 133 In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants will be placed in a large circle, facing inwards. Some

UVA133

这是一道很好的练习链表的题目 先给出我写的代码 #include<cstdio> using namespace std; const int maxn = 20+3; struct person { int index; person *clockwise; person *con_clockwise; }Node[maxn]; person *off, *off_con;//删除了第一个节点怎么办 int N,k,m;