結果
| 問題 |
No.1429 Simple Dowsing
|
| コンテスト | |
| ユーザー |
Example0911
|
| 提出日時 | 2021-03-14 14:06:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 640 bytes |
| コンパイル時間 | 1,779 ms |
| コンパイル使用メモリ | 193,320 KB |
| 最終ジャッジ日時 | 2025-01-19 16:32:21 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 4 |
ソースコード
#include "bits/stdc++.h"
#define int long long
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = (1LL << 61);
ll mod = 1000000007;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << '?' << " " << 0 << " " << 0 << endl;
fflush(stdout);
int d; cin >> d;
cout << '?' << " " << 100 << " " << 100 << endl;
fflush(stdout);
int d2; cin >> d2;
for (int a = 0; a <= 100; a++) {
for (int b = 0; b <= 100; b++) {
if (a * a + b * b == d) {
if ((100 - a)*(100 - a) + (100 - b)*(100 - b) == d2) {
cout << '!' << " " << a << " " << b << endl; return 0;
}
}
}
}
return 0;
}
Example0911