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 1617. Flat Spots

C++ Hint
Posted by 0blivium 1 Oct 2018 21:55
You can solve this problem quickly by using the multiset and set data structures. To find the answer, use the set iterator.
Re: C++ Hint
Posted by Pearl 2 Oct 2018 09:32
My solution is similar: map x to x - 600 and use array to count its frequency. Then accumulate all the freq[x] / 4 and just print the sum. As the diameter is constrained in [600,700], there will be at most 101 different values.