ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2111. Plato

Problems I have encountered before getting accepted
Posted by Catsae 29 Feb 2020 09:25
1. If time limit exceeded, use a better sorting algorithm. In my case, insertion sort spent barely over a second, while merge sort spent only 0.6 of a second.

2. used long long. Also, before multiplying a long long and an int together, convert the int first.
Re: Problems I have encountered before getting accepted
Posted by qumusabel 1 Jul 2020 00:45
Sorting the input is a waste of time, quite frankly. Try some of your own inputs, the solution can be very simple & fast.