Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

yoshi_avx's blog

By yoshi_avx, history, 7 months ago, In English

Preparing a lookup table in binary GCD can be somewhat effective if the inputs are small. I've seen a 30% time reduction with a 512x512 table (which consumes almost no memory and time) for inputs less than $$$2\times10^9$$$. It scales quite linearly with the log.

Code
  • Vote: I like it
  • +4
  • Vote: I do not like it

»
7 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Both I and the CPU would like it...