SUAPC 2024 Winter
Time limit1sMemory limit1024 MB
Given N, print how many problems the team ranked Nth on the SUAPC 2024 Winter scoreboard solved, followed by their problem letters in lexicographic order.
- Level
Easy2 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem

[Figure] SUAPC 2024 Winter scoreboard
SUAPC is a programming contest for undergraduate students and first-year graduate students at five universities in the Sinchon area: Sogang, Sookmyung, Yonsei, Ewha, and Hongik. The contest problems follow the problem-setting style of the Seoul Regional. Teams are ranked by how many problems they solve correctly within the time limit. The image above is the scoreboard of SUAPC 2024 Winter.
A team that solves more problems ranks higher. If several teams solve the same number of problems, the team with the smaller total penalty ranks higher. The rightmost number on the scoreboard is the total penalty of the problems each team solved.
The penalty for one problem is (time of the first correct submission) (number of wrong submissions before the first correct submission) .
Given a positive integer , find the number of problems solved and the problem numbers solved by the team ranked th in SUAPC 2024 Winter.
Input
The first line contains a positive integer . ()
Output
The first line prints the number of problems solved by the team ranked th in SUAPC 2024 Winter.
The second line prints the problem numbers solved by that team in lexicographic order, separated by spaces. Print the problem letters in uppercase.