結果

問題 No.3084 Identify f(x)
ユーザー ont
提出日時 2025-06-22 17:04:16
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 946 bytes
コンパイル時間 6,322 ms
コンパイル使用メモリ 335,036 KB
実行使用メモリ 26,368 KB
平均クエリ数 3.00
最終ジャッジ日時 2025-06-22 17:04:25
合計ジャッジ時間 7,696 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:34:26: warning: ‘a’ is used uninitialized [-Wuninitialized]
   34 |     cout << "! " << a << " " << b << endl;
      |                          ^~~
main.cpp:29:9: note: ‘a’ was declared here
   29 |     int a, b, sum;
      |         ^

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define NP next_permutation
const int INF32 = 2e9;
const ll INF64 = 2e18;
const ll mod = 998244353;
// const ll mod = 1e9 + 7;
template<typename T> bool chmin(T &a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T &a, T b){if(a < b){a = b; return true;} return false;}
 
void cincout() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
}
 
int main() {
    cincout();
 
    int a, b, sum;
    cout << "? " << 0 << endl;
    cin >> b;
    cout << "? " << 1 << endl;
    cin >> sum;
    cout << "! " << a << " " << b << endl;
}
0