Himitsu's blog

By Himitsu, history, 6 years ago, In English

This post is with respect to my other blog which I asked recently (link). Summary is that in one question the output that the codeforces judge is showing is coming different from what my terminal is showing (I am using ubuntu).

Now, I want to ask: is this not a genuine question?

If this happened in contest, then there is no way I would have gotten the solution (since it is running fine on my system!). What would you have done if you were in my situation? How will you debug the program if it is running fine on your system and not on the judge?

So, my question is why the downvotes? I think I have asked a genuine question.

I have seen the error message and it says: "Diagnostics detected issues [cpp.clang++-diagnose]: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\include\vector:1802:11: runtime error: addition of unsigned offset to 0x12500250 overflowed to 0x1250024c"

I seriously don't understand how my program is giving overflow and even if that were the case, why is my terminal showing the correct output.

I would appreciate if someone can give my any help regarding this.

Thank You.

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By Himitsu, history, 6 years ago, In English

Hello,

I am solving this question and it is failing in test case-3.

The test case is as follows:

8 2

Link to submission: http://mirror.codeforces.com/contest/1072/submission/44671042

Output on my terminal(on running the same code) is coming as the correct answer but judge is showing some other output.

I have no idea why this is happening. Can someone help? Thank You

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By Himitsu, history, 6 years ago, In English

Hello,

I was reading about Egyptian fractions and I could not understand the reason behind taking the ceiling of D/N (the original fraction is N/D) as the largest unit fraction using the Sylvester's sequence. Can someone explain in easier terms?

Thank You

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it