結果

問題 No.2252 Find Zero
ユーザー SSRS
提出日時 2023-03-24 21:22:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 1,728 ms
コンパイル使用メモリ 167,536 KB
実行使用メモリ 25,220 KB
平均クエリ数 208.94
最終ジャッジ日時 2024-09-18 16:38:50
合計ジャッジ時間 3,294 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  for (int i = 0; i < N; i++){
    cout << "? " << 0 << ' ' << i << endl;
    int z;
    cin >> z;
    if (z == 0){
      cout << "! " << i << endl;
      break;
    }
  }
}
0