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 1644. A Whole Lot of Walnuts

java AC
Posted by esbybb 16 Jun 2015 05:24
Messages should not contain correct solutions.

i use 2 TreeSet<Integer>, nope, ok
nope is prepopulated with 2, ok is prepopulated with 10

in cycle i read counts into one of them with checking if other one does not contain new value has been read recently

if nope.last()>=ok.first() then the result is ok.first()
Re: java AC
Posted by esbybb 16 Jun 2015 05:28
nope.last>=ok.first ("g" instead of "ge" because they are never equal)