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 listMay 17, 2026 01:18M-RochatM-RochatError
Source Code

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

Challenge History

No challenges yet.

Run Statistics
#DateScoreWall TimeCPU UserCPU SystemMemoryError
1May 17, 2026 01:180511,790,795497,931,0002,122,0002,113,536expected "1022897 ", got "n=300364274 lines=30000000 hist=0,2587,170458,2059799,2314285,2305972,2329204,2306783,2309079,2317849,2295722,2318608,2317817,2313436,2327999,2310402,0,0 uniq1_4=66,4341,68989,79041 first=[SR6Zwz][JHwc][xeAz#B7][aAGm0][VP2O006...
2May 17, 2026 01:180509,330,547498,451,0002,088,0002,113,536expected "1022787 ", got "n=300373907 lines=30000000 hist=0,2579,169605,2061905,2307762,2319415,2307017,2314172,2304764,2317117,2308392,2334371,2307818,2314854,2317545,2312684,0,0 uniq1_4=66,4343,69120,78741 first=[s7lC4D7IhklBO][*tPB%][SBewwO][MMueHuw...
3May 17, 2026 01:180516,720,163504,089,0002,040,0002,113,536expected "1021615 ", got "n=300377506 lines=30000000 hist=0,2646,170453,2058767,2295476,2318946,2316876,2325224,2319236,2299188,2316828,2319677,2317599,2302601,2320358,2316125,0,0 uniq1_4=65,4342,69092,78431 first=[Zq2cb6CUznAf][i@GSNqNW][x@V6uqskOMMpC...