結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-22 03:21:16 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 619 bytes |
| コンパイル時間 | 3,693 ms |
| コンパイル使用メモリ | 274,724 KB |
| 実行使用メモリ | 26,356 KB |
| 平均クエリ数 | 4.00 |
| 最終ジャッジ日時 | 2025-02-22 03:21:25 |
| 合計ジャッジ時間 | 6,553 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 21 |
ソースコード
#include <atcoder/lazysegtree.hpp>
using namespace atcoder;
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define chmin(x, y) x = min(x, y)
// #include <all.hpp>
// #define int long long
signed main() {
int h, w;
cin >> h >> w;
int ans1, ans2, ans3;
cout << "? 1 1" << endl;
cin >> ans1;
cout << "? 2 1" << endl;
cin >> ans2;
cout << "? 1 2" << endl;
cin >> ans3;
int x = (ans1 - ans2 + 1) / 2;
int y = (ans1 - ans3 + 1) / 2;
cout << "! " << x+1 << " " << y+1 << endl;
// (a, b) -> a^2 + b^2
// a^2 + b^2 - 2 b + 1
// 2b - 1 = ans1 - ans2
}