arrow.cpp: In function 'int main()':
arrow.cpp:27:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < P[i].size(); j++)
~~^~~~~~~~~~~~~
arrow.cpp:30:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else if (j == P[i].size() - 1) ans += abs(P[i][j] - P[i][j - 1]);
~~^~~~~~~~~~~~~~~~~~
arrow.cpp:11:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
arrow.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &pos, &color);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~