为什么Wrong Answer on #27
查看原帖
为什么Wrong Answer on #27
946515
66xyyd楼主2024/9/18 21:02

提交记录:https://codeforces.com/contest/1552/submission/281737454

代码:

#include<iostream>
using namespace std;
int s,s2;
int main(){
	cout << "? 40000\n";
	for(int i=1;i<=200;i++){
		for(int j=1;j<=200;j++){
			cout << i << ' ' << j << ' ';
		}
	}
	cout << endl;
	cin >> s;
	int l=1,r=7;
	int p,ans;
	while(l<=r){
		int mid=(l+r)>>1,q=1<<mid;
		cout << "? " << 200/q*200 << '\n';
		for(int i=q;i<=200;i+=q){
			for(int j=1;j<=200;j++){
				cout << i << ' ' << j << ' ';
			}
		}
		cout << endl;
		cin >> s2;
		if(s2*q==s)	l=mid+1;
		else{
			r=mid-1;
			p=s2;
			ans=q;
		}
	}
//	l*=2;
	int tmp=abs(s/(ans/2)-(p*2))-1;
	cout << "! " << (tmp+(s/(tmp+1)-1))*2 << endl;
	return 0;
}

spj错误信息:

wrong answer Integer parameter [name=perimeter] equals to 131032, violates the range [4, 796]

没看懂报错信息……

2024/9/18 21:02
加载中...