Unique strings Sergey Svistunov

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 listFeb 17, 2025 09:07Ian MckibbenIan MckibbenError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1Feb 17, 2025 09:0700000Error: expected "1018248 ", got "Hash duration: 260578773 Insert duration: 427212558 1: 771129 2: 144201 3: 50829 4: 22910 5: 11795 6: 6459 7: 3953 8: 2360 9: 1486 10: 990 11: 647 12: 432 13: 280 14: 221 15: 166 16: 117 17: 72 18: 56 19: 40 20: 25 21: ...stderr