E. 2023.6.2-TikTok春招(澳大利亚区域)-第五题

    Type: Default 1000ms 256MiB

2023.6.2-TikTok春招(澳大利亚区域)-第五题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

5. TikTok "Following" feed (Australia)

Introduction One of the features TikTok is renown for is its video feeds. Users can seamlessly swipe through many videos with next to no loading time, and the recommendation algorithm will take care of ordering them judiciously. The "Following Page' is one of them, and shows videos from accounts that the user follows.

Given n users identified by a unique id between 1 and n, a list of videos published by these users and a list of following/followed relationships, your task is to recreate each user's following' feed. Each feed is a list of at most 5 of the user's followed accounts' videos ordered by descending publication time (from newest to oldest). Note that some users may not follow anyone or not follow anyone who has posted a video, inwhich case their feed will be empty , in this case , you should ouput 'None'. lt is also possible that a user have published less than 5 videos, in which case their followers will see all of them.

Example

秋招模拟赛第30场|TikTok(Australia)|2023.06.2

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2023-6-25 19:00
End at
2023-6-25 21:00
Duration
2 hour(s)
Host
Partic.
7