rope.cpp: In function 'int main()':
rope.cpp:25:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k = 0; k < p[i].size(); ++k) {
~~^~~~~~~~~~~~~
rope.cpp:39:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k = 0; k < go.size(); ++k) {
~~^~~~~~~~~~~
rope.cpp:45:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k = 0; k < go.size(); ++k) {
~~^~~~~~~~~~~
rope.cpp:50:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int k = 0; k < go.size(); ++k) val[go[k]] = 0;
~~^~~~~~~~~~~
rope.cpp:24:8: warning: unused variable 'sum' [-Wunused-variable]
int sum = 0;
^~~
rope.cpp:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
rope.cpp:16:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]); cnt[a[i]]++, p[a[i]].push_back(i);
~~~~~^~~~~~~~~~~~~