結果

問題 No.955 ax^2+bx+c=0
ユーザー risujiroh
提出日時 2019-12-18 03:02:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 610 bytes
コンパイル時間 1,460 ms
コンパイル使用メモリ 166,972 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-07 00:19:02
合計ジャッジ時間 10,886 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other AC * 14 WA * 30 RE * 78
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using R = long double;

vector<R> solve_quadratic_equation(R a, R b, R c) {
  assert(false);
}

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  long long a, b, c;
  cin >> a >> b >> c;
  if (a == 0) {
    if (b == 0) {
      if (c == 0) {
        cout << "-1\n";
      } else {
        cout << "0\n";
      }
    } else {
      cout << (R)-c / b;
    }
  } else {
    auto res = solve_quadratic_equation(a, b, c);
    cout << res.size() << '\n';
    for (auto e : res) {
      cout << e << '\n';
    }
  }
}
0