synchronization.cpp: In function 'void solve(int, int)':
synchronization.cpp:29:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(i<add[u].size() && add[u][i].X <= x) sum += add[u][i++].Y;
~^~~~~~~~~~~~~~
synchronization.cpp: In function 'int main()':
synchronization.cpp:38:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&n,&m,&q);
~~~~~^~~~~~~~~~~~~~~~~~~
synchronization.cpp:40:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int u,v; scanf("%d%d",&u,&v);
~~~~~^~~~~~~~~~~~~~
synchronization.cpp:46:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf("%d",&x);
~~~~~^~~~~~~~~
synchronization.cpp:56:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf("%d",&x);
~~~~~^~~~~~~~~
synchronization.cpp:60:7: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized]
solve(root,0);
~~~~~^~~~~~~~