Skip to content

Conversation

@harry7557558
Copy link

Improve the time complexity of +plot points from $O(N^2\log(N))$ (according to comment) to $O(N)$.

Speed comparison of +plot points Xyene d zhouzixiang2004 with the bot running on my local machine:
Before: 7.15s
After: 5.74s
Iterating through the DB without doing anything (continue at line 202): 5.50s

Seems like DMOJ doesn't consider a partial AC as a solved problem in point calculation. Update the code to match DMOJ's result. The solved problem count by the code still deviates from the site's problem count for users like Xyene and I still don't know why.

Another change is eliminating the "linear interpolation" error in graph plotting.

Before:

After:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant