brunhilda.cpp: In function 'int main()':
brunhilda.cpp:9:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&m,&q);
~~~~~^~~~~~~~~~~~~~~
brunhilda.cpp:10:52: 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("%i",&p[i]),Add(p[i],i),cnt[0]++;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
brunhilda.cpp:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&n[i]);
~~~~~^~~~~~~~~~~~