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 1116. Piecewise Constant Function

how do it more simply
Posted by 👑TIMOFEY👑 31 Oct 2022 17:44
u can search for intersections instead of looking for cutouts, just invert the segments of the second function
use min max instead of a lot of conditions and you get a very simple code :)
Re: how do it more simply
Posted by bashNewbie 27 Oct 2023 01:13
Simpler is to brute-force