传统题 700ms 64MiB

2024春-A-2 AI Comments

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

题目描述

In the competency assessment report of PAT (Professional Ability Test), AI (artificial intelligence) algorithm is used to automatically generate comments based on the examinee's performance. However, you are not asked to generate comments, but only to prepare the input data to invoke the algorithm. First of all, we already have the algorithm for calculating the competency indices in 5 dimensions for each examinee, namely: basic knowledge, advanced knowledge, proficiency, accuracy and professionalism. Let us number these dimensions from 1 to 5. Each competency index is an integer in the interval [0, 100]. You first need to obtain the median values of all the NN candidates in each dimension -- if NN is odd, the median is the (N+1)/2(N+1)/2-th largest number; or if NN is even, then the median the N/2N/2-th largest number. Then, for each examinee, compare his/her competency indices (v1,v2,,v5)(v_1, v_2, \cdots , v_5) with the corresponding medians (m1,m2,,m5)(m_1, m_2, \cdots , m_5). If vimiv_i \ge m_i, then his/her ii-th dimension index is recorded in the positive feedback class, otherwise it is recorded in the negative feedback class.

输入格式

Each input file contains one test case. For each case, two positive integers NN and MM (1<MN1051<M\le N\le 10^5) are given in the first line, which are the number of examinees and the number of queries, respectively. Then NN lines follow, each gives the information of an examinee, in the format:

RegID v1 v2 v3 v4 v5

where RegID (registration ID number) is a string of no more than 12 characters which are English letters and numbers, and is followed by 5 competency indices of the examinee. Finally there are MM lines, each gives a query, which is the RegID of an examinee.

输出格式

For each query, output in a line the feedback information for the examinee. The format is: first print all the dimension numbers in the positive feedback class, in non-increasing order of vimiv_i - m_i; then print all the dimension numbers in the negative feedback class, in non-decreasing order of mivim_i - v_i, with the negative sign - in front of each number. If there is a tie within a class, output in increasing order of the dimension number. All the numbers in a line must be separated by exactly 1 space, and there must be no extra space at the beginning or the end of the line. If the RegID does not exit, output Not Found instead.

样例

5 3
A20190289 98 74 35 88 60
B20018372 86 86 86 72 60
A19873001 62 48 55 20 35
T27346900 76 54 68 81 70
B00247834 92 68 78 50 66
T27346900
F19993001
B20018372
5 4 3 -1 -2
Not Found
2 3 1 4 5

限制

对于所有的测试用例,限制为700 ms, 64 MB

PAT2024春季重现赛

未参加
状态
已结束
规则
IOI
题目
11
开始于
2025-8-17 14:00
结束于
2025-8-17 17:30
持续时间
3.5 小时
主持人
参赛人数
46