Skip to content

Update magic constant for unordered_map_killer#1340

Merged
maspypy merged 1 commit into
yosupo06:masterfrom
imsuck:test/associative_array
Jul 21, 2025
Merged

Update magic constant for unordered_map_killer#1340
maspypy merged 1 commit into
yosupo06:masterfrom
imsuck:test/associative_array

Conversation

@imsuck

@imsuck imsuck commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

Previous magic constant generated from ideone is only for C++14 (and below?). I have updated it to a new constant which would work from C++17 to C++23. Checked the constant locally, through Library Checker's hacks and on onlinegdb.

Resolves #1338.

@imsuck imsuck changed the title Update magic constant for unordered_map_killer Update magic constant for unordered_map_killer Jul 21, 2025
@maspypy

maspypy commented Jul 21, 2025

Copy link
Copy Markdown
Collaborator

I really appreciate it.
However, it would be helpful if you could address it by adding new test cases rather than modifying the existing ones. In general, we do not delete existing test cases.

One approach is:
int MAGIC = vector({256279, 218971, 205759, 172933})[seed % 4];
and setting the number of test cases to 4 by editing info.toml.

@imsuck
imsuck force-pushed the test/associative_array branch from 812840e to a482364 Compare July 21, 2025 13:10
@maspypy

maspypy commented Jul 21, 2025

Copy link
Copy Markdown
Collaborator

thank you!

@maspypy
maspypy merged commit f366043 into yosupo06:master Jul 21, 2025
6 checks passed
@imsuck
imsuck deleted the test/associative_array branch August 4, 2025 12:27
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.

Weak test case for Associative Array

2 participants