0_0_39988643_22930.cpp:8:14: error: 'uint64_t' does not name a type
8 | static const uint64_t BASE = 131542391ULL;
| ^~~~~~~~
0_0_39988643_22930.cpp:5:1: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
4 | #include <unordered_set>
+++ |+#include <cstdint>
5 |
0_0_39988643_22930.cpp: In function 'int main()':
0_0_39988643_22930.cpp:24:16: error: 'uint64_t' was not declared in this scope
24 | vector<uint64_t> power(n + 1, 1ULL);
| ^~~~~~~~
0_0_39988643_22930.cpp:24:16: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
0_0_39988643_22930.cpp:24:24: error: template argument 1 is invalid
24 | vector<uint64_t> power(n + 1, 1ULL);
| ^
0_0_39988643_22930.cpp:24:24: error: template argument 2 is invalid
0_0_39988643_22930.cpp:24:43: error: expression list treated as compound expression in initializer [-fpermissive]
24 | vector<uint64_t> power(n + 1, 1ULL);
| ^
0_0_39988643_22930.cpp:26:18: error: invalid types 'int[int]' for array subscript
26 | power[i + 1] = power[i] * BASE;
| ^
0_0_39988643_22930.cpp:26:33: error: invalid types 'int[int]' for array subscript
26 | power[i + 1] = power[i] * BASE;
| ^
0_0_39988643_22930.cpp:26:39: error: 'BASE' was not declared in this scope
26 | power[i + 1] = power[i] * BASE;
| ^~~~
0_0_39988643_22930.cpp:29:24: error: template argument 2 is invalid
29 | vector<uint64_t> prefixHash(n + 1, 0ULL);
| ^
0_0_39988643_22930.cpp:29:48: error: expression list treated as compound expression in initializer [-fpermissive]
29 | vector<uint64_t> prefixHash(n + 1, 0ULL);
| ^
0_0_39988643_22930.cpp:31:23: error: invalid types 'int[int]' for array subscript
31 | prefixHash[i + 1] = prefixHash[i] * BASE + (unsigned char)(S[i]);
| ^
0_0_39988643_22930.cpp:31:43: error: invalid types 'int[int]' for array subscript
31 | prefixHash[i + 1] = prefixHash[i] * BASE + (unsigned char)(S[i]);
| ^
0_0_39988643_22930.cpp:31:49: error: 'BASE' was not declared in this scope
31 | prefixHash[i + 1] = prefixHash[i] * BASE + (unsigned char)(S[i]);
| ^~~~
0_0_39988643_22930.cpp: In lambda function:
0_0_39988643_22930.cpp:35:30: error: invalid types 'int[int]' for array subscript
35 | return prefixHash[start + L] - prefixHash[start] * power[L];
| ^
0_0_39988643_22930.cpp:35:54: error: invalid types 'int[int]' for array subscript
35 | return prefixHash[start + L] - prefixHash[start] * power[L];
| ^
0_0_39988643_22930.cpp:35:69: error: invalid types 'int[int]' for array subscript
35 | return prefixHash[start + L] - prefixHash[start] * power[L];
| ^
0_0_39988643_22930.cpp: In function 'int main()':
0_0_39988643_22930.cpp:40:24: error: template argument 2 is invalid
40 | vector<uint64_t> A(lenA);
| ^
0_0_39988643_22930.cpp:42:14: error: invalid types 'int[int]' for array subscript
42 | A[i] = getBlockHash(i);
| ^
0_0_39988643_22930.cpp:49:28: error: template argument 2 is invalid
49 | vector<uint64_t> B;
| ^
0_0_39988643_22930.cpp:51:19: error: request for member 'push_back' in 'B', which is of non-class type 'int'
51 | B.push_back(A[r + x * L]);
| ^~~~~~~~~
0_0_39988643_22930.cpp:51:30: error: invalid types 'int[int]' for array subscript
51 | B.push_back(A[r + x * L]);
| ^
0_0_39988643_22930.cpp:55:35: error: template argument 2 is invalid
55 | unordered_set<uint64_t> windowSet;
| ^
0_0_39988643_22930.cpp:55:35: error: template argument 3 is invalid
0_0_39988643_22930.cpp:55:35: error: template argument 4 is invalid
0_0_39988643_22930.cpp:58:47: error: request for member 'size' in 'B', which is of non-class type 'int'
58 | for(int right = 0; right < (int)B.size(); right++){
| ^~~~
0_0_39988643_22930.cpp:59:27: error: request for member 'insert' in 'windowSet', which is of non-class type 'int'
59 | windowSet.insert(B[right]);
| ^~~~~~
0_0_39988643_22930.cpp:59:35: error: invalid types 'int[int]' for array subscript
59 | windowSet.insert(B[right]);
| ^
0_0_39988643_22930.cpp:63:31: error: request for member 'erase' in 'windowSet', which is of non-class type 'int'
63 | windowSet.erase(B[left]);
| ^~~~~
0_0_39988643_22930.cpp:63:38: error: invalid types 'int[int]' for array subscript
63 | windowSet.erase(B[left]);
| ^
0_0_39988643_22930.cpp:68:61: error: request for member 'size' in 'windowSet', which is of non-class type 'int'
68 | if (right - left + 1 == M && (int)windowSet.size() == M) {
| ^~~~
|