segments.cpp: In function 'int main()':
segments.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%d %d",&N,&M);
| ~~~~~^~~~~~~~~~~~~~~
segments.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
14 | scanf("%d",&a);
| ~~~~~^~~~~~~~~
segments.cpp:17:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d %d",&l,&r);
| ~~~~~^~~~~~~~~~~~~~~
segments.cpp:26:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
26 | scanf("%d",&l);
| ~~~~~^~~~~~~~~
segments.cpp:31:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
31 | scanf("%d %d %d",&l,&r,&t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~