結果
問題 | No.1429 Simple Dowsing |
ユーザー | mdstoy |
提出日時 | 2021-03-14 15:07:22 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 1,585 bytes |
コンパイル時間 | 1,936 ms |
コンパイル使用メモリ | 197,988 KB |
実行使用メモリ | 24,372 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2023-09-24 10:06:21 |
合計ジャッジ時間 | 3,478 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 31 ms
23,424 KB |
testcase_01 | AC | 25 ms
24,372 KB |
testcase_02 | AC | 24 ms
24,216 KB |
testcase_03 | AC | 26 ms
23,412 KB |
testcase_04 | AC | 26 ms
23,400 KB |
testcase_05 | AC | 26 ms
23,508 KB |
testcase_06 | AC | 26 ms
24,216 KB |
testcase_07 | AC | 26 ms
23,424 KB |
testcase_08 | AC | 25 ms
24,048 KB |
testcase_09 | AC | 25 ms
24,288 KB |
testcase_10 | AC | 25 ms
24,108 KB |
testcase_11 | AC | 26 ms
24,204 KB |
testcase_12 | AC | 25 ms
23,640 KB |
testcase_13 | AC | 25 ms
24,348 KB |
testcase_14 | AC | 25 ms
23,376 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; // #include <atcoder/all> // using namespace atcoder; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vector<int>>; using vvvi = vector<vector<vector<int>>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using vvvl = vector<vector<vector<ll>>>; using vs = vector<string>; using vb = vector<bool>; #define FOR(i, m, n) for (int i = (m); i < (n); i++) #define FORR(i, m, n) for (int i = (m); i >= (n); i--) #define REP(i, n) FOR(i, 0, (n)) #define REPR(i, n) FORR(i, (n) - 1, 0) #define REP1(i, n) FOR(i, 1, (n) + 1) #define REPS(c, s) for (char c : s) #define ALL(c) (c).begin(), (c).end() #define SORT(c) sort(ALL(c)) #define REV(c) reverse(ALL(c)) #define sz(v) (int)v.size() template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;} const int MOD = 1000000007; const int INF = 1000000001; const ll LINF = 1000000001000000001LL; void solve(); int main() { // ios::sync_with_stdio(false); // cin.tie(nullptr); // cout << fixed << setprecision(numeric_limits<double>::max_digits10); solve(); return 0; } void solve() { cout << "? 0 0" << endl; int d1; cin >> d1; cout << "? 100 0" << endl; int d2; cin >> d2; REP(i, 101) REP(j, 101) { if (i * i + j * j == d1 and ((100 - i) * (100 - i) + j * j == d2)) { cout << "! " << i << " " << j << endl; return; } } }