tuna.cpp: In function 'int main()':
tuna.cpp:6:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n%d",&n,&x);
~~~~~^~~~~~~~~~~~~~~~
tuna.cpp:8:13: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("\n%d %d",&p[i],&q[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~
tuna.cpp:12:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("\n%d",&r[i]);
~~~~~^~~~~~~~~~~~~~