結果
| 問題 | No.3084 Identify f(x) | 
| コンテスト | |
| ユーザー |  kobaryo222 | 
| 提出日時 | 2025-04-04 21:27:30 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 26 ms / 2,000 ms | 
| コード長 | 2,700 bytes | 
| コンパイル時間 | 3,151 ms | 
| コンパイル使用メモリ | 274,264 KB | 
| 実行使用メモリ | 25,856 KB | 
| 平均クエリ数 | 3.00 | 
| 最終ジャッジ日時 | 2025-04-04 21:27:50 | 
| 合計ジャッジ時間 | 4,023 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 7 | 
ソースコード
/**
 * @brief テンプレート
 */
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using pl = pair<ll, ll>;
using vp = vector<pl>;
using vvp = vector<vp>;
using vs = vector<string>;
using vvs = vector<vs>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(ll i = ll(a); i < ll(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) std::begin(x), std::end(x)
constexpr ll inf = 0x1fffffffffffffffLL; // 2.3 * 10^18
template <class T, class U>
istream &operator>>(istream &is, pair<T, U> &p) {
    is >> p.first >> p.second;
    return is;
}
template <class T, class U>
ostream &operator<<(ostream &os, pair<T, U> &p) {
    os << p.first << " " << p.second;
    return os;
}
template <class T>
istream &operator>>(istream &is, vector<T> &v) {
    for(auto &x : v) {
        is >> x;
    }
    return is;
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    for(int i = 0; i < (int)v.size(); i++) {
        if(i != (int)v.size() - 1)
            os << v[i] << " ";
        else
            os << v[i];
    }
    return os;
}
template <typename T, typename... Args>
auto vec(T x, int arg, Args... args) {
    if constexpr(sizeof...(args) == 0)
        return vector<T>(arg, x);
    else
        return vector(arg, vec<T>(x, args...));
}
template <class T>
bool chmin(T &a, const T &b) {
    return a > b ? a = b, true : false;
}
template <class T>
bool chmax(T &a, const T &b) {
    return a < b ? a = b, true : false;
}
constexpr ll bit(ll x) {
    return 1LL << x;
}
constexpr ll msk(ll x) {
    return (1LL << x) - 1;
}
constexpr bool stand(ll x, int i) {
    return x & bit(i);
}
/**
 * @brief Debug
 */
#ifdef LOCAL
#define debug_assert(exp) assert(exp)
#else
#define debug_assert(exp) true
#endif
#ifdef LOCAL
#define dbg(x) std::cerr << __LINE__ << " : " << #x << " = " << (x) << std::endl
#else
#define dbg(x) true
#endif
// #include <atcoder/all>
// using namespace atcoder;
// generated by oj-template v4.8.1 (https://github.com/online-judge-tools/template-generator)
int main() {
    cout << "? " << 0 << endl;
    ll R0, R1;
    cin >> R0;
    cout << "? " << 1 << endl;
    cin >> R1;
    ll a = R1 - R0, b = R0;
    cout << "! " << a << " " << b << endl;
    return 0;
}
            
            
            
        