疑问(悬关)
查看原帖
疑问(悬关)
300166
Zikl楼主2023/10/10 00:31

为什么这样是对的

if(opt==1||opt==3){
			int x,y;
			scanf("%d%d",&x,&y);
			if(opt==1) pos[y]-=w[x],sum2-=w[x];
			else pos[y]+=w[x],sum2+=w[x]; 
		}

而这样连样例都读不完

if(opt==1||opt==3){
			int x,y;
			scanf("%d%d",&x,&y);
			if(opt==1) pos[y]-=w[x],sum2-=w[x];
			else pos[y]+=w[x],sum2+=w[x]; 
		}
2023/10/10 00:31
加载中...