結果

問題 No.3084 Identify f(x)
ユーザー mono
提出日時 2025-04-04 23:19:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 841 bytes
コンパイル時間 1,890 ms
コンパイル使用メモリ 183,920 KB
実行使用メモリ 25,856 KB
平均クエリ数 3.00
最終ジャッジ日時 2025-04-04 23:19:45
合計ジャッジ時間 2,635 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize ("O3,inline,omit-frame-pointer,no-asynchronous-unwind-tables,fast-math")
#include <bits/stdc++.h>
#include <unordered_map>
#include <stdlib.h>
using namespace std;
#define rep(i, a, n) for(ll i = a; i < n; i++)
#define rrep(i, a, n) for(ll i = a; i >= n; i--)
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
//constexpr ll MOD = 1000000007;
constexpr ll MOD = 998244353;
constexpr int IINF = 1001001001;
constexpr ll INF = 1LL<<60;
template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}
 


int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    cout << "? 0" << endl;
    ll b; cin >> b;
    cout << "? 1" << endl;
    ll x; cin >> x;
    ll a = x-b;
    cout << "! " << a << " " << b << endl;
    return 0;
}
0