You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default checker used atm is wcmp which is great to compare tokens and ignore trailing whitespaces and EOL (also similar checkers are commonly used on several platforms, primarily Codeforces).
But another common checker is using decimal numbers and allowing some margin for mistake (1e-7).
Proposoal: Use an hybrid of wcmp where if token comparation fails, try to read both token as doubles and check whether precision is below some threshold. This idea rarely will give some false positive, and will automatically work for test cases that requires a decimal number where some error is allowed.
The text was updated successfully, but these errors were encountered:
Why do you think that would be the case? The idea is that for every token we compare if they are equal, if that check fails, then we try to convert to double and check if both are at most some epsilon apart from each other, if it fails to convert to double or they are not that close, then we finish checker and report Wrong Answer.
I propose to use same code from wcmp but adding this one more check. I don't think it will create any noticeable overhead.
Default checker used atm is wcmp which is great to compare tokens and ignore trailing whitespaces and EOL (also similar checkers are commonly used on several platforms, primarily Codeforces).
But another common checker is using decimal numbers and allowing some margin for mistake (
1e-7
).Proposoal: Use an hybrid of
wcmp
where if token comparation fails, try to read both token asdoubles
and check whether precision is below some threshold. This idea rarely will give some false positive, and will automatically work for test cases that requires a decimal number where some error is allowed.The text was updated successfully, but these errors were encountered: