Try to add avoiding Trailing spaces while comparing.
blueedgetechno opened this issue · 2 comments
blueedgetechno commented
There should be an option to avoid trailing spaces behind every line of the answer.
Basic implementation will be like
with open("output.txt","r") as f:
ans=f.read()
s=s.split("\n")
s=[x.rstrip(" ") for x in s if len(x)]
compare(s) # maybe
kmyk commented
You are talking about how to decide whether it's AC or WA, right?
Adding an option to ignore whitespaces sounds good. Could you make a pull request for this?
By the way, there are many problems which don't accept superfluous whitespaces, so we cannot make it the default behavior. We should avoid situations that users get AC on oj
but get WA on actual submissions.
blueedgetechno commented
But actually it works for codeforces cause they don't care about the trailing whitespaces.