Блог пользователя rajutsav1234

Автор rajutsav1234, история, 5 лет назад, По-английски

I was solving problem link . My code runs fine on my other compilers. But It fails on same testcases on CF online Judge. Here is my solution link.[submission:112599418][submission:112599418] In the code, at one line I had checked if a double is integer or not. I am not able to figure out why is it happening so. Please help.

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Uh i don't think its a reliable check, you should check against floor as well. ceil(1+1e-10)=2. Inconsistency is probably caused by excess precision which is enabled by default on 32 bit mingw.