Main.cpp: In function 'void append(int, int)':
Main.cpp:24:18: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
24 | if(o>=2&&(o&o-1)==0)eh[i]=(int*)realloc(eh[i],2*o*sizeof**eh);
| ~^~
Main.cpp: In function 'void shuffle()':
Main.cpp:35:9: warning: unused variable 'st' [-Wunused-variable]
35 | int st=at[g1];
| ^~
Main.cpp: In function 'int main()':
Main.cpp:45:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
45 | scanf("%d%d",&n,&q);
| ~~~~~^~~~~~~~~~~~~~
Main.cpp:47:31: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
47 | for(int i=1;i<=n;++i)scanf("%d",a+i),at[a[i]]=i;
| ~~~~~^~~~~~~~~~
Main.cpp:52:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
52 | for(int t,p,i=0;i<q;++i) scanf("%d%d",&t,&p),append(t<n+1?t:n+1,i),append(t<n+1?t:n+1,p);
| ~~~~~^~~~~~~~~~~~~~