結果
| 問題 |
No.1429 Simple Dowsing
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-13 23:50:27 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 502 bytes |
| コンパイル時間 | 3,119 ms |
| コンパイル使用メモリ | 243,160 KB |
| 実行使用メモリ | 25,464 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2024-11-13 23:50:32 |
| 合計ジャッジ時間 | 5,038 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i)
#define all(a) (a).begin(), (a).end()
int main() {
ll a, b;
cout << "? 0 0" << endl;
cin >> a;
cout << "? 100 0" << endl;
cin >> b;
rep(x, 0, 101) rep(y, 0, 101) {
ll d1 = x*x + y*y;
ll d2 = (100 - x)*(100 - x) + y*y;
if (d1 == a && d2 == b) {
cout << "! " << x << ' ' << y << endl;
}
}
}