文件名称:1-1
介绍说明--下载内容均来自于网络,请自行研究使用
描述
教练员 A、B 和 C 将要从编号为1到n的队员中挑选自己的队员。为公平起见,每个教练都根据自己的喜好程度将队员排序;你负责根据以下规则为他们分配队员。
你拿到的数据是 a、b、c 三个数组,表示三个教练对队员的喜好程度排序,每个数组都是数字 1 到 n 的一个排列,下标越小表示教练越喜欢该队员(例如教练 A 最喜欢编号为 a[0] 的队员,其次是编号为 a[1] 的队员)。你的分组规则是,从还未被分配的队员中找一个教练A最喜欢的队员分到 A 组;然后,在未分配的队员中分配教练B最喜欢的队员到 B 组;然后是教练 C;再是教练 A、B......依次类推直到所有队员分配完毕。
现在队员 k 希望知道自己被分配给哪位教练,请你来告诉他。
输入
共 5 行。
第 1 行包含一个整数 n。
第 2 至 4 行依次是数组 a、b 和 c,每行都是整数 [1, n] 的一个排列。
第 5 行包含一个整数 k。
输出
仅一个字符,A、B 或 C,表示队员 k 被分配给哪位教练。(descr iption
Trainers A, B and C will pick their team members from among those numbered 1 to n. To be fair, each coach sorts team members according to their preference; you are responsible for assigning team members to them according to the following rules.
You get the data is a, b, c three arrays, said three coaches on the level of preferences of players, each array is a number from 1 to n per array, the smaller subscr ipt coach said the more like the player ( For example, coach A prefers player a [0], followed by player a [1]). Your grouping rule is to find a coach A from the unassigned team members, and then to group B the unassigned team member's favorite team member B. Then, coach C ; Then coaches A, B ... and so on until all players have been assigned.
Now player k wants to know which coach he is assigned to. Please tell him.)
教练员 A、B 和 C 将要从编号为1到n的队员中挑选自己的队员。为公平起见,每个教练都根据自己的喜好程度将队员排序;你负责根据以下规则为他们分配队员。
你拿到的数据是 a、b、c 三个数组,表示三个教练对队员的喜好程度排序,每个数组都是数字 1 到 n 的一个排列,下标越小表示教练越喜欢该队员(例如教练 A 最喜欢编号为 a[0] 的队员,其次是编号为 a[1] 的队员)。你的分组规则是,从还未被分配的队员中找一个教练A最喜欢的队员分到 A 组;然后,在未分配的队员中分配教练B最喜欢的队员到 B 组;然后是教练 C;再是教练 A、B......依次类推直到所有队员分配完毕。
现在队员 k 希望知道自己被分配给哪位教练,请你来告诉他。
输入
共 5 行。
第 1 行包含一个整数 n。
第 2 至 4 行依次是数组 a、b 和 c,每行都是整数 [1, n] 的一个排列。
第 5 行包含一个整数 k。
输出
仅一个字符,A、B 或 C,表示队员 k 被分配给哪位教练。(descr iption
Trainers A, B and C will pick their team members from among those numbered 1 to n. To be fair, each coach sorts team members according to their preference; you are responsible for assigning team members to them according to the following rules.
You get the data is a, b, c three arrays, said three coaches on the level of preferences of players, each array is a number from 1 to n per array, the smaller subscr ipt coach said the more like the player ( For example, coach A prefers player a [0], followed by player a [1]). Your grouping rule is to find a coach A from the unassigned team members, and then to group B the unassigned team member's favorite team member B. Then, coach C ; Then coaches A, B ... and so on until all players have been assigned.
Now player k wants to know which coach he is assigned to. Please tell him.)
(系统自动生成,下载前可以参看下载内容)