Last active
December 17, 2015 11:39
-
-
Save k3kaimu/5603730 to your computer and use it in GitHub Desktop.
gen_legendre_sequence
・全要素が1となる
・速度遅い
のを修正したコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void gen_legendre_sequence() | |
{ | |
int i; | |
for(i = 0; i < 10223; ++i) | |
legendre[i] = 1; | |
for(i = 0; i < 10224; ++i) | |
legendre[(i * i) % 10223] = -1; | |
legendre[0] = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment