奇妙OLE求助,玄关
  • 板块题目总版
  • 楼主ncws
  • 当前回复9
  • 已保存回复9
  • 发布时间2025/8/3 16:19
  • 上次更新2025/8/3 21:10:41
查看原帖
奇妙OLE求助,玄关
1174964
ncws楼主2025/8/3 16:19
#include<bits/stdc++.h>
        		while(q--){
	            	scanf("%lld",&x);
					printf("%lld ",a[x%n+1]);
				}
			}else{
				while(q--){
	            	scanf("%lld",&x);
					printf("%lld ",(x%(n+1)?n+1:n));
				}
			}
			asd=1;
		}
		if(!flag2){
			while(q--){
            	scanf("%lld",&x);
				printf("%lld ",a[x%n+1]);
			}	
			asd=1;
		}
		if(!asd){
	        for(int i=1;i<=q;i++)scanf("%lld",&qwe[i]),qwe[i]++;
	        for(int j=0;j<3;j++)
				for(int i=1;i<=n;i++){
		            if(a[i]==n+1&&!j)st.push(i);
		            if(a[i]==n-1&&st.size()&&!sum[i]){
		            	int tp=st.top();
						sum[i]=sum[tp]=(i+n-tp)%n;
						st.pop();
					}
	        	}
	        for(int i=1;i<=q;i++){
	            if(qwe[i]<=n)printf("%lld ",a[qwe[i]]);
	            else{
		            now=x=(qwe[i]-1)%n+1;
		            if(a[x]==n-1&&pd)printf("%lld ",n-1);
		            else{
		            	x=(qwe[i]-1)%(n+1)+1;
		            	printf("%lld ",x==n+1?n:(a[x]==n+1&&pd2)?n+1:n);
		        	}
	    		}
			}
		}
        puts("");
    }
    return 0;
}

我不明白,为何会OLE

2025/8/3 16:19
加载中...