TOKI Regular Open Contest #22
問題文
Problemset (TOKI Regular Open Contest #22)
省略
省略
C++に変換後のコードはこちら
//interactive
ll X, Y, A, B;
int q(ll i){
wt("?", i+1);
return rd_int();
}
{
ll @N, fc, sc, f;
f = q(0);
fc = 1;
while(q(fc) == f) fc *= 2;
fc = bsearch_min[ll,x,1,fc](q(x) != f);
sc = fc;
while(q(fc+sc) != f) sc *= 2;
sc = bsearch_min[ll,x,1,sc](q(fc+x) == f);
X = sc;
A = (f+1) * X - fc;
Y = (N + A) /+ (2*X);
B = (2*X*Y - N - A);
wt("!", X, Y, A, B);
}
Current time: 2024年05月04日17時48分16秒
Last modified: 2021年09月05日10時57分24秒 (by laycrs)
Tags: Competitive_Programming_Incomplete TOKI
トップページに戻る
Logged in as: unknown user (not login)