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

[テストケース案] (Counting Primes) #1244

Closed
Mitsubachi-coder opened this issue Sep 13, 2024 · 1 comment
Closed

[テストケース案] (Counting Primes) #1244

Mitsubachi-coder opened this issue Sep 13, 2024 · 1 comment

Comments

@Mitsubachi-coder
Copy link
Contributor

Mitsubachi-coder commented Sep 13, 2024

Lucy DP を基にした #235301Hack #33Hack #34 で落ちる($N = 15, 35$ counting_primes_vector(n) のところ)

原因は $\frac{N}{i}$ の商を大小別に管理しているが,サイズの取り方や大小の指定を間違えると $\lfloor \sqrt{N} \rfloor$ から $\lfloor \frac{N}{\lfloor \sqrt{N} \rfloor} \rfloor$ の間が指定された時に壊れたりするため

おそらく $N = a^2 - 1$ みたいな形の $N$ を入れておくと良さそう?

@maspypy
Copy link
Collaborator

maspypy commented Sep 17, 2024

ありがとうございます、追加しました

@maspypy maspypy closed this as completed Sep 17, 2024
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

No branches or pull requests

2 participants