这是为什么(后面的点全部TLE了)
查看原帖
这是为什么(后面的点全部TLE了)
1379399
reductt楼主2024/10/3 10:52

TLE

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define u128 __int128
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FOR_(i,a,b) for(int i=b;i>=a;i--)
#define pb push_back
#define fir first
#define sec second
namespace FastIO{
	int buf[100]={0},p=0;
	int rd(){
		int x=0,f=1;char c=getchar();
		while(c<'0'||'9'<c){if(c=='-')f=-1;c=getchar();}
		while('0'<=c&&c<='9')x=x*10+c-'0',c=getchar();
		return x*f;
	}void write(int x){
		if(!x){putchar('0');return;}
		if(x<0){putchar('-');x=-x;}
		while(x)buf[++p]=x%10,x/=10;
		while(p)putchar(buf[p--]+'0');
	}
};
#define rd FastIO::rd
#define write FastIO::write
typedef pair<int,int> pii;
typedef unsigned long long ull;
void solve(){
	int x=rand()+114514;
	printf("? %lld\n",x);
	fflush(stdout);
	int y=rd();
	printf("? %lld\n",x-y-1);
	fflush(stdout);
	int m=rd()+1;
	printf("! %lld\n",m);
	fflush(stdout);
}
signed main(){
	int T=rd();
	while(T--)solve();
    return 0;
}
2024/10/3 10:52
加载中...