結果

問題 No.3518 座標当てゲーム
コンテスト
ユーザー Danny Lee
提出日時 2026-10-10 13:44:43
言語 C++23(gnu拡張gcc16)
(gcc 16.1.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=gnu++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 213 ms / 2,000 ms
+ 2µs
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,679 ms
コンパイル使用メモリ 192,240 KB
実行使用メモリ 9,824 KB
平均クエリ数 3.00
最終ジャッジ日時 2026-10-10 13:45:17
合計ジャッジ時間 2,783 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << "? 0" << endl;
    short j, i;
    cin >> j;
    cout << "? " << j << endl;
    cin >> i;
    if(i)
        cout << "! " << -j << endl;
    else
        cout << "! " << j << endl;
}
0