QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#861663#1. I/O Test12213Compile Error//C++14750b2025-01-18 19:05:062025-01-18 19:05:21

Judging History

你现在查看的是最新测评结果

  • [2025-01-18 19:05:21]
  • 评测
  • [2025-01-18 19:05:06]
  • 提交

config.txt

#include<bits/stdc++.h>
using namespace std;
const int N = 2e5+10;
#define int long long
map<int,int>mp;
int n,t(0),g(0),cnt(1),l,r;
int ask(){
	while(mp[cnt])cnt++;
	cout<<"? "<<cnt<<endl;
	l=cnt+1;
	mp[cnt]++;
	cout.flush();
	cin>>g;
	if(g==t)return 1;
	t=g;
	return 0;
}
signed main(){
	cin>>n;
	l=1,r=n;
	if(ask()){
		cout<<"! "<<cnt<<endl;
		return 0;
	}
	while(1){
		cout<<"? "<<(l+r>>1)<<endl;
		mp[(l+r>>1)]++;
		cout.flush();
		cin>>g;
//		cout<<g<<" "<<t<<endl;...

input_test


output_test


Details

Invalid Configuration File: failed to read Nin and Nout