segway.cpp: In function 'int main()':
segway.cpp:10:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int N; scanf("%d",&N);
~~~~~^~~~~~~~~
segway.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &a[i], &b[i], &c[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
segway.cpp:15:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int M; scanf("%d",&M);
~~~~~^~~~~~~~~
segway.cpp:17:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int foo; scanf("%d", &foo);
~~~~~^~~~~~~~~~~~