結果

問題 No.3084 Identify f(x)
ユーザー tobbie
提出日時 2025-04-06 20:02:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 335 bytes
コンパイル時間 1,409 ms
コンパイル使用メモリ 161,144 KB
実行使用メモリ 41,632 KB
最終ジャッジ日時 2025-04-06 20:03:20
合計ジャッジ時間 8,104 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; i++)
int main() {
  int x1, x2, y1, y2;
  x1 = 1;
  x2 = 2;
  cout << "? " << x1;
  cin >> y1;
  cout << "? " << x2;;
  cin >> y2;
  int a = (y1 - y2) / (x1 - x2);
  int b = y1 - a * x2;
  cout << "! " << a << " " << b << endl;
  return 0;
}
0