結果

問題 No.1429 Simple Dowsing
ユーザー Cyclone28Cyclone28
提出日時 2021-03-14 14:37:05
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 1,468 ms
コンパイル使用メモリ 164,876 KB
実行使用メモリ 24,192 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 10:04:50
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,388 KB
testcase_01 AC 22 ms
23,892 KB
testcase_02 AC 22 ms
24,192 KB
testcase_03 AC 23 ms
23,640 KB
testcase_04 AC 23 ms
23,892 KB
testcase_05 AC 23 ms
24,024 KB
testcase_06 AC 23 ms
23,496 KB
testcase_07 AC 22 ms
23,760 KB
testcase_08 AC 23 ms
23,544 KB
testcase_09 AC 22 ms
24,168 KB
testcase_10 AC 23 ms
23,784 KB
testcase_11 AC 23 ms
23,664 KB
testcase_12 AC 22 ms
23,640 KB
testcase_13 AC 24 ms
23,640 KB
testcase_14 AC 23 ms
23,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int p, q;
    cout << "? 0 0" << endl;
    cin >> p;
    cout << "? 0 100" << endl;
    cin >> q;
    int b = (p - q) / 200 + 50;
    int a = sqrt(p - b*b);
    cout << "! " << a << " " << b << endl;
}
0