Unique strings v2 Sergey Svistunov

Same problem as Unique strings, but with 3 CPUs available and scoring based on wall time instead of CPU time.

Count the exact number of unique tokens as fast as possible.

Input

One token per line on STDIN:

JWXcKKaWzvFL5
Rof
3ztCpA
5wHcGN
*UiEMthaTS*g

Output

Print the exact count of unique tokens to STDOUT.

Constraints

  • Character set: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@#%*
  • Maximum token length: 16
  • Approximately 1,000,000 unique tokens
Back to listSep 28, 2021 19:07robotomizerobotomizeError
Source Code

Source code access is restricted. Log in to request access.

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Sep 28, 2021 19:0700000Error: Exit with code 2: panic: runtime error: index out of range [4107219] with length 2500000 goroutine 1 [running]: main.hyperLogLog.Add({{0xc000100000, 0x2625a0, 0x2625a0}, 0x2625a0, 0x16}, {0xc001420000, 0x7f759ac77170, 0x563c4c36a911}) /tmp/sol...stderr