liz.cpp: In function 'int main()':
liz.cpp:24:9: error: 'cin' was not declared in this scope
cin >> k;
^~~
liz.cpp:24:9: note: suggested alternative: 'min'
cin >> k;
^~~
min
liz.cpp:26:25: error: 'cout' was not declared in this scope
if(sum[x] == k) cout << 1 << ' ' << x << '\n';
^~~~
liz.cpp:36:50: error: 'cout' was not declared in this scope
if(R >= n || sum[R+1] - sum[L] != k) cout << "NIE\n";
^~~~
liz.cpp:37:18: error: 'cout' was not declared in this scope
else cout << L+1 << ' ' << R+1 << '\n';
^~~~
liz.cpp:9:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%s", &n, &q, s);
~~~~~^~~~~~~~~~~~~~~~~~~~~