1-3

所属分类:Windows编程
开发工具:Dev C++
文件大小:450KB
下载次数:3
上传日期:2017-12-16 00:08:34
上 传 者关林
说明:  描述   某公司在对应聘者做过一轮笔试之后,从中选出n 人继续进行面试,每位应聘者被分配了一个整数ID。   为公平起见,组织者决定利用会议室外的圆桌,按以下方法“随机”确定面试顺序:第一个到达的应聘者在圆桌周围任意选择一个位置坐下;此后到达的每位应聘者都从前一应聘者出发,沿逆时针方向围圆桌走过m 人(前一应聘者算作走过的第1 人,同一人可能经过多次),并紧邻第m 人右侧就座;所有应聘者到齐后,从最后到达者出发,绕圆桌以顺时针方向为序进行面试。   这里假定应聘者到达的时刻互异,且相对的就坐位置确定后,左、右两人之间总能插入一把椅子。   试编写一个程序,确定面试顺序。 输入   共2行。   第1行包含两个整数, n和m。   第2行包含n个整数,表示先后到达的n个应聘者的ID。 输出   共1行。以空格分隔的n个整数,分别表示顺次进行面试的应聘者的ID。
(After a company has done a written test of the candidate, n people are selected to continue the interview. Each candidate is assigned an integer ID. To be fair, the organizers decided to use the round table outside the conference room to "randomly" determine the interview sequence as follows: The first candidate who arrives at a random place around the round table sits down; each candidate arrives thereafter Candidates starting from the round table counterclockwise around m people (the previous candidate counted as walking through the first person, the same person may go through many times), and the m-th right seat; all candidates to Qi, starting from the last arrivals, around the round table in order to conduct an interview in the clockwise direction. Here assume that candidates arrive at different times, and the relative seating position is determined, the left and right can always insert a chair between the two.)

文件列表:
List.h (1525, 2017-10-06)
ListNode.h (782, 2017-10-06)
main.cpp (851, 2017-10-05)
main.o (9695, 2017-10-06)
Makefile.win (1164, 2017-10-06)
项目1.dev (1252, 2017-10-06)
项目1.exe (1924733, 2017-10-06)
项目1.layout (222, 2017-10-06)

近期下载者

相关文件


收藏者