seri / gettc

TopCoder offline arena supporting multiple languages
http://seri.github.io/gettc/
99 stars 19 forks source link

Returns of type double was incorrectly evaluated #5

Closed bokertov closed 12 years ago

bokertov commented 12 years ago

For some problems that have double's as output, the tests of gettc can incorrectly fail. One example is http://community.topcoder.com/stat?c=problem_statement&pm=3561&rd=6519.

For the test case 3, the expected value was "7.637495090348122E7", and the result "76374950.9050914" was deemed incorrect. However, according to the FAQ (http://apps.topcoder.com/wiki/display/tc/SRM+Algorithm+Competition+FAQ), any answer with absolute or relative error of 1e-9 can still be deemed correct.

Thanks!

seri commented 12 years ago

I'm actually aware of this issue, but my initial approach was rather naive. Now I'm using the implementation found in that FAQ. You can just replace the ~/.gettc/include/cpp/topcoder file with downloaded_gettc/dist/include/cpp/topcoder, which will work the same as a re-installation. Hopefully this correctly handles your case.

bokertov commented 12 years ago

Yes. Now the results are judged correctly. Many thanks!