Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve floor_sum #88

Merged
merged 3 commits into from
Jan 17, 2021
Merged

Improve floor_sum #88

merged 3 commits into from
Jan 17, 2021

Conversation

rsk0315
Copy link
Contributor

@rsk0315 rsk0315 commented Dec 16, 2020

current ACL code: https://atcoder.jp/contests/practice2/submissions/18804905 (101 ms)
improved code (this PR): https://atcoder.jp/contests/practice2/submissions/18805092 (70 ms)

The number of operations (per function call) could be more reduced, but the performance does not seem better.
slower code: https://atcoder.jp/contests/practice2/submissions/18805259 (75 ms)

Reference: https://rsk0315.hatenablog.com/entry/2020/12/13/231307

@rsk0315
Copy link
Contributor Author

rsk0315 commented Dec 16, 2020

Resubmission of this-PR one: 79 ms
and the latter one: 76 ms

We may use the latter one?

@rsk0315
Copy link
Contributor Author

rsk0315 commented Dec 16, 2020

Non-recursive one is not so fast.
A submission with current PR code is here (72 ms).

@yosupo06
Copy link
Collaborator

Yeah, this change makes sense for me, thanks!

@yosupo06 yosupo06 merged commit c9838af into atcoder:master Jan 17, 2021
@rsk0315 rsk0315 deleted the improve/floor_sum branch January 17, 2021 13:26
kzrnm added a commit to FKbelm/ac-library-csharp-old that referenced this pull request Apr 4, 2021
mizar added a commit to mizar/ac-library-rs that referenced this pull request Jan 21, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Jan 21, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Jan 22, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Mar 26, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Mar 26, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Mar 26, 2023
mizar added a commit to mizar/ac-library-rs that referenced this pull request Mar 27, 2023
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.

2 participants