fireworks.cpp: In function 'void dfs(int)':
fireworks.cpp:51:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<gph[x].size(); i++){
~^~~~~~~~~~~~~~
fireworks.cpp:55:2: error: 'sort' was not declared in this scope
sort(gph[x].begin(), gph[x].end(), cmp);
^~~~
fireworks.cpp:55:2: note: suggested alternative: 'short'
sort(gph[x].begin(), gph[x].end(), cmp);
^~~~
short
fireworks.cpp: In function 'int solve(int)':
fireworks.cpp:66:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1; i<gph[x].size(); i++){
~^~~~~~~~~~~~~~
fireworks.cpp: In function 'int main()':
fireworks.cpp:80:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
fireworks.cpp:81:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=2; i<=n+m; i++) scanf("%d%lld", p+i, c+i);
~~~~~^~~~~~~~~~~~~~~~~~~~