fireworks.cpp: In function 'void it(long long int)':
fireworks.cpp:17:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < adj[i].size(); ++j) {
~~^~~~~~~~~~~~~~~
fireworks.cpp:25:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < adj[i].size(); ++j) if (p.second != j) {
~~^~~~~~~~~~~~~~~
fireworks.cpp:30:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0; j < adj[i].size() - 1; ++j) r[i] += pq[i].top(), pq[i].pop();
~~^~~~~~~~~~~~~~~~~~~
fireworks.cpp: In function 'int main()':
fireworks.cpp:42:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld %lld", &N, &M);
~~~~~^~~~~~~~~~~~~~~~~~~~~
fireworks.cpp:43:82: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i = 1; i < N + M; ++i) scanf("%lld %lld", &a, &b), adj[--a].push_back(i), l[i] = b;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~