catalystgma's blog

By catalystgma, history, 5 years ago, In English

Hi,

I tried to solve problem G from the 65th educational round: http://codeforces.me/contest/1167/problem/G

However, I get WA on test 1 because the difference between my answer and the expected one is 10^-7, instead of 10^-9: http://codeforces.me/contest/1167/submission/54524130

On my PC (ubuntu) the answer I get is 1.570796326796 with an error of -4.0001336*10^-12, which should pass the test.

What causes the difference and how can I solve it?

Thanks!

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

| Write comment?
»
5 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Are you using same things to compile code in ubuntu and windows?

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    codeblocks 16.01 with gnu c++11. The difference between the results is noticeably smaller for c++17 compared to c++11 on codeforces somehow