結果
問題 | No.1429 Simple Dowsing |
ユーザー | chocorusk |
提出日時 | 2021-03-14 18:27:10 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 946 bytes |
コンパイル時間 | 3,307 ms |
コンパイル使用メモリ | 186,920 KB |
実行使用メモリ | 24,336 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2023-09-24 10:08:33 |
合計ジャッジ時間 | 4,721 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,000 KB |
testcase_01 | AC | 25 ms
24,252 KB |
testcase_02 | AC | 26 ms
24,312 KB |
testcase_03 | AC | 25 ms
23,628 KB |
testcase_04 | AC | 24 ms
23,628 KB |
testcase_05 | AC | 25 ms
23,208 KB |
testcase_06 | AC | 26 ms
23,640 KB |
testcase_07 | AC | 26 ms
23,652 KB |
testcase_08 | AC | 25 ms
23,376 KB |
testcase_09 | AC | 25 ms
24,336 KB |
testcase_10 | AC | 24 ms
23,508 KB |
testcase_11 | AC | 24 ms
24,024 KB |
testcase_12 | AC | 25 ms
23,628 KB |
testcase_13 | AC | 25 ms
23,520 KB |
testcase_14 | AC | 25 ms
23,784 KB |
ソースコード
#include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> #include <unordered_set> #include <random> #include <cassert> #include <fstream> #include <utility> #include <functional> #include <time.h> #include <stack> #include <array> #include <list> #include <atcoder/all> #define popcount __builtin_popcount using namespace std; using namespace atcoder; typedef long long ll; typedef pair<int, int> P; int main() { cout<<"? 0 0"<<endl; int d1; cin>>d1; cout<<"? 100 0"<<endl; int d2; cin>>d2; for(int i=0; i<=100; i++){ for(int j=0; j<=100; j++){ if(i*i+j*j==d1 && (100-i)*(100-i)+j*j==d2){ cout<<"! "<<i<<" "<<j<<endl; return 0; } } } return 0; }