| 29 | }; |
| 30 | |
| 31 | string random_string(int n, int cc) { |
| 32 | stringstream ss; |
| 33 | for (int i = 0; i < n; i++) { |
| 34 | ss << static_cast<char>(rng() % cc + 'a'); |
| 35 | } |
| 36 | |
| 37 | return ss.str(); |
| 38 | } |
| 39 | |
| 40 | void test() { |
| 41 | /* Field testing: Kattis stringmultimatching, Codeforces 366C */ |