Main.cpp: In function ‘int main()’:
Main.cpp:40:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
40 | for(int i=0;i<=n+1;i++)nxt[i]=i+1,pre[i]=i-1,mp[a[i]]=i;n++;
| ^~~
Main.cpp:40:65: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
40 | for(int i=0;i<=n+1;i++)nxt[i]=i+1,pre[i]=i-1,mp[a[i]]=i;n++;
| ^
Main.cpp:39:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
39 | scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~
Main.cpp:39:50: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
39 | scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
Main.cpp:45:33: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
45 | int op,x,y;scanf("%d%d",&op,&x);
| ~~~~~^~~~~~~~~~~~~~~
Main.cpp:48:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
48 | scanf("%d",&y),n++,a[n]=y,mp[y]=n;y=n;
| ~~~~~^~~~~~~~~