結果
問題 |
No.3018 目隠し宝探し
|
ユーザー |
|
提出日時 | 2025-02-22 03:25:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 574 bytes |
コンパイル時間 | 3,491 ms |
コンパイル使用メモリ | 274,736 KB |
実行使用メモリ | 26,248 KB |
平均クエリ数 | 2.73 |
最終ジャッジ日時 | 2025-02-22 03:25:10 |
合計ジャッジ時間 | 7,197 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 WA * 6 |
ソースコード
#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; cout << "? 1 1" << endl; cin >> ans1; cout << "? 1 " << w << endl; cin >> ans2; rep(i, h) { rep(j, w) { if(i * i + j * j == ans1 && i * i + (w-1-j) * (w-1-j) == ans2) { cout << "! " << i+1 << " " << j+1 << endl; return 0; } } } }