結果
| 問題 | No.1429 Simple Dowsing |
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2021-03-14 15:50:52 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 510 bytes |
| 記録 | |
| コンパイル時間 | 1,435 ms |
| コンパイル使用メモリ | 209,020 KB |
| 実行使用メモリ | 29,876 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2026-06-18 19:11:57 |
| 合計ジャッジ時間 | 3,105 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++)
#define REP(i, n) FOR(i,0,n)
int main() {
cout << "? 0 0" << endl;
int D1, D2;
cin >> D1;
cout << "? 0 100" << '\n';
cin >> D2;
REP(i, 101) REP(j, 101) {
int d1 = i * i + j * j;
int d2 = i * i + (100 - j) * (100 - j);
if (d1 == D1 and d2 == D2) {
cout << "! " << i << ' ' << j << endl;
return 0;
}
}
}
hitonanode