trading.cpp:22:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main()
^
trading.cpp: In function 'int main()':
trading.cpp:24:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
trading.cpp:28:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &l, &r, &x);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~