11790 - Secret Letter   

Description

 

To any distressed people:

 

        My name is Arc. I am a “Time Traveler”. I know that many people are having trouble in solving HT Chen’s final exam. Thus, I traveled back to yesterday and overheard some hints in TAs’ chat. Moreover, I secretly hack NTHU OJ System and submit these hints to you. Since all TAs aren’t as smart as me, they can't delete this letter.

 

PA - Homework

Difficulty: ★★★★★

        I think it is the most difficult question in this exam, so I can’t remember how to solve it. However, I heard that TAs said the two of four cases of (n, min) are (5, 2) (sample) and (100, 73). If you can calculate MAX appropriately, then you can pass these two cases with some techniques.

 

PB - Christmas

Difficulty: ★☆☆☆☆

        I'm only informed that this question can be easily solved by specific mathematical rules.

 

PC - Withdrawal

Difficulty: ★★★★☆

        TAs solved it with for-loops and many lines within. However, I think I can solve it by recursion with several lines. If you can solve it by recursion, you must be better than all TAs.

 

PD - Grade

Difficulty: ☆☆☆☆☆

       In TAs’ chat, they didn’t say anything about this question.

 

PE - Rotation

Difficulty: ★★★☆☆

        I think it requires no special skill to solve it. You need to shift length of string times to judge if it satisfy the condition. Just do it!

 

PF - 2018 (Bonus)

Difficulty: ? ? ? ? ?

        What?! I didn’t hear anything about the bonus question yesterday. Maybe it appeared in this morning…

 

 

        I heard another important hint from TAs. It is that except for bonus question, the first case of each question is sample input! Anyway, hope that this letter can help you pass the exam!

 

Sincerely,

Arc

 

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss