| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Name |
|---|



make your own hashing method, but it can't be less than O(len of string) for each key as you would need to iterate through each letter. I don't think this is what you wanted to know that is to avoid O(length) but I don't think it is possible
I was asking for some type of optimisation we can do by some sort of precomputation or some optimised way of using hashing to check the match between two strings.I know we can't do better than O(n or nlogn) but i get TLE too many times using it even its complexity is not that much, But because of its high constant factor as computation needed for calculating hash is very much costly leading to high constant factor of time complexity.
You can (but only if you get TLE) forget about the modulo. By storing all the values on
unsigned long long, all the operations will be done modulo $$$2^{64}$$$. This will be a lot faster since%is generally very slow. On the other side you will have a bad modulo...OK>>