Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

mrittunjoysarkerakash's blog

By mrittunjoysarkerakash, history, 5 weeks ago, In English,

Hello Code forces,

I am trying this problem 1359C - Mixing Water. My IDE returns right values with my code, but CF judge said that function returns nothing(In test 2). So what should I do?

Here is my code
My submission

Please give me helpful suggestions.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

It seems that your code finished the while loop without ever executing the return f; statement. In that case the code expects you to return a value at the end of the function but there is no return statement.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Binsearch should return ll, but in your code it returns nothing