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

fix convolution constraint #159

Merged
merged 2 commits into from
Mar 26, 2023
Merged

fix convolution constraint #159

merged 2 commits into from
Mar 26, 2023

Conversation

yosupo06
Copy link
Collaborator

Current impelmentation can convolute small arrays (min(n, m) <= 60) for arbitrary mod, e.g. $10^9 + 7$.

I started to think this behavior is weird and may confuse participants by the following reasons, so let's fix.

  • "Code that only works for small data" is very dangerous in competitive programing, e.g. : uses convolution with $10^9 + 7$ -> works for samples -> submit -> got mysterious RE
  • 60 is just a magic number for the constant optimization. We may change this value in future.

@yosupo06 yosupo06 merged commit 198f33d into atcoder:master Mar 26, 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.

1 participant