結果
問題 |
No.1429 Simple Dowsing
|
ユーザー |
![]() |
提出日時 | 2023-09-09 13:26:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 632 bytes |
コンパイル時間 | 1,810 ms |
コンパイル使用メモリ | 192,448 KB |
最終ジャッジ日時 | 2025-02-16 20:37:38 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using ll = long long; using namespace std; int main() { cout << "? 0 0" << endl; int d1, d2, x = -1, y = -1; cin >> d1; cout << "? 0 100" << endl; cin >> d2; for (int i = 0; i <= 100; i++){ for (int j = 0; j <= 100; j++){ if ((i*i + j*j == d1) && (i*i + (100 - j)*(100 - j) == d2)){ x = i; y = j; } } } cout << "! " << x << " " << y << endl; }