結果
| 問題 | No.3084 Identify f(x) |
| コンテスト | |
| ユーザー |
wsrtrt
|
| 提出日時 | 2025-04-04 21:23:14 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 885 bytes |
| 記録 | |
| コンパイル時間 | 3,461 ms |
| コンパイル使用メモリ | 274,292 KB |
| 実行使用メモリ | 25,856 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2025-04-04 21:23:30 |
| 合計ジャッジ時間 | 4,167 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto& i:a)
#define ff first
#define ss second
#define all(a) begin(a),end(a)
#define allr(a) rbegin(a),rend(a)
#define pb push_back
using namespace std;
using ll =long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
template<class T> inline bool chmin(T& a,T b){return a>b?a=b,1:0;}
template<class T> inline bool chmax(T& a,T b){return a<b?a=b,1:0;}
int main(){
//cin.tie(0)->sync_with_stdio(0);
auto query=[](ll x)->ll {
cout<<'?'<<' '<<x<<endl;
ll t;cin>>t;
if(t==-1000000000)exit(0);
return t;
};
auto answer=[](ll a,ll b){
cout<<'!'<<' '<<a<<' '<<b<<endl;
};
ll b=query(0);
ll a=query(1)-b;
answer(a,b);
return 0;
}
/*
*/
wsrtrt