#P15698. [2018 KAIST RUN Spring] Segmentation
[2018 KAIST RUN Spring] Segmentation
题目描述
ZOYI is developing a tool called Channel which offers a tool to talk with online users in the site. Recently, ZOYI introduced a RF (Recency / Frequency) Model to distinguish users who are using the Channel and decided to classify the users through following calculations.
:::align{center}
:::
Figure: Distinguishing users in RF Channel. Horizontal axis represents Recency, while vertical axis represents Frequency.
$(0 < f_1 < f_2 < f_3 < f_4, 0 < r_1 < r_2 < r_3 < r_4, \text{all } f_i \text{ and } r_i \text{ are integers.})$
axis represents Recency and axis represents Frequency. All online users are given values , by their connection record, and are classified into one of twelve conditions shown below.
- “New Customer”
- “Promising”
- “About to Sleep”
- “Hibernating”
- “Lost”
- “Potential Loyalist”
- “Need Attention”
- “About to Leave”
- “Champion”
- “Loyal Customer”
- “Can't Lose Them”
- “None”
Among those, “None” means the user has no connection record to the server. If is located on two or more classification boundaries, it follows the classification of . For example, if the value of is it is classified as “Hibernating”, while if the value is , it is classified as “Loyal Customer”.
You want to investigate a user status of whom interested in RUN, so you are trying to install the program in the following way:
- : if the current time is ,
- : number of visited times
Given events of site users, make a program which classifies the users following the given picture above.
输入格式
First line contains four space-separated integers .
Second line consists four space-separated integers .
Third line contains a single integer .
Next lines contains events in time order, where th element represents the event held at time .
Each event is given as space-separated and , where is the username which contains no whitespace with at most 10 alphabets. has a value of 1 or 2, where 1 means the user entered the site while 2 means you should print how the user is classified.
输出格式
For events which is 2, print how the user is classified in each line (without quotes).
1 2 3 4
1 2 3 4
8
1 RUN
1 Alex
2 Alex
1 RUN
1 RUN
1 Alex
2 Alex
2 RUN
New Customer
Potential Loyalist
Need Attention
提示
The connection status of Alex is (first visit), (time ) at time 3. Thus, Alex is classified as “New Customer”.
At time 7, the connection status of Alex is (second visit), (time ). Thus, Alex is classified as “Potential Loyalist”.
At time 8, the connection status of RUN is (third visit), (time ). Thus, RUN is classified as “Need Attention”.