arrow.cpp: In function 'int main()':
arrow.cpp:14:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0; j<v[i].size(); j++) {
~^~~~~~~~~~~~
arrow.cpp:16:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else if(j == v[i].size() - 1) ans += 1LL * (v[i][j] - v[i][j-1]);
~~^~~~~~~~~~~~~~~~~~
arrow.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
arrow.cpp:10:57: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1, x, y; i<=N; i++) scanf("%d %d", &x, &y), v[y].push_back(x);
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~