long_mansion.cpp: In function 'int main()':
long_mansion.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
long_mansion.cpp:17:30: 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",&c[i]);
~~~~~^~~~~~~~~~~~
long_mansion.cpp:19:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf("%d",&x);
~~~~~^~~~~~~~~
long_mansion.cpp:21:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int y; scanf("%d",&y);
~~~~~^~~~~~~~~
long_mansion.cpp:68:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int q; scanf("%d",&q);
~~~~~^~~~~~~~~
long_mansion.cpp:70:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x, y; scanf("%d %d",&x,&y);
~~~~~^~~~~~~~~~~~~~~