liz.cpp:4:13: error: 'N' was not declared in this scope
int n, q, v[N], sum[N];
^
liz.cpp:4:21: error: 'N' was not declared in this scope
int n, q, v[N], sum[N];
^
liz.cpp:5:7: error: 'N' was not declared in this scope
int Z[N], lb[N*2];
^
liz.cpp:5:14: error: 'N' was not declared in this scope
int Z[N], lb[N*2];
^
liz.cpp:6:8: error: 'N' was not declared in this scope
char s[N];
^
liz.cpp: In function 'int main()':
liz.cpp:8:28: error: 's' was not declared in this scope
scanf("%d%d%s", &n, &q, s);
^
liz.cpp:9:32: error: 'v' was not declared in this scope
for(int i = 0; i < n; i++) v[i] = (s[i]=='T' ? 2 : 1);
^
liz.cpp:10:32: error: 'sum' was not declared in this scope
for(int i = 0; i < n; i++) sum[i+1] = sum[i] + v[i];
^~~
liz.cpp:10:32: note: suggested alternative: 'enum'
for(int i = 0; i < n; i++) sum[i+1] = sum[i] + v[i];
^~~
enum
liz.cpp:10:52: error: 'v' was not declared in this scope
for(int i = 0; i < n; i++) sum[i+1] = sum[i] + v[i];
^
liz.cpp:12:24: error: 'sum' was not declared in this scope
while(j < n && sum[j] < i) ++j;
^~~
liz.cpp:12:24: note: suggested alternative: 'enum'
while(j < n && sum[j] < i) ++j;
^~~
enum
liz.cpp:13:9: error: 'lb' was not declared in this scope
lb[i] = j;
^~
liz.cpp:16:9: error: 'Z' was not declared in this scope
Z[i] = max(0, min(r-i, Z[i-j]));
^
liz.cpp:17:29: error: 'v' was not declared in this scope
while(i+Z[i] < n && v[Z[i]] == v[i+Z[i]]) ++Z[i];
^
liz.cpp:20:5: error: 'Z' was not declared in this scope
Z[0] = n;
^
liz.cpp:23:9: error: 'cin' was not declared in this scope
cin >> k;
^~~
liz.cpp:23:9: note: suggested alternative: 'min'
cin >> k;
^~~
min
liz.cpp:24:17: error: 'lb' was not declared in this scope
int x = lb[k];
^~
liz.cpp:25:12: error: 'sum' was not declared in this scope
if(sum[x] == k) cout << 1 << ' ' << x << '\n';
^~~
liz.cpp:25:12: note: suggested alternative: 'enum'
if(sum[x] == k) cout << 1 << ' ' << x << '\n';
^~~
enum
liz.cpp:25:25: error: 'cout' was not declared in this scope
if(sum[x] == k) cout << 1 << ' ' << x << '\n';
^~~~
liz.cpp:32:16: error: 'v' was not declared in this scope
if(v[L] == 1)
^
liz.cpp:35:50: error: 'cout' was not declared in this scope
if(R >= n || sum[R+1] - sum[L] != k) cout << "NIE\n";
^~~~
liz.cpp:36:18: error: 'cout' was not declared in this scope
else cout << L+1 << ' ' << R+1 << '\n';
^~~~