coach.cpp: In function 'int main()':
coach.cpp:7:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int X, N, M, W, T; scanf("%d%d%d%d%d",&X,&N,&M,&W,&T);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coach.cpp:8:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1; i<=N; i++) scanf("%d",&S[i]);
~~~~~^~~~~~~~~~~~
coach.cpp:9:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1; i<=M; i++) scanf("%d%d",&D[i],&C[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~