結果

問題 No.955 ax^2+bx+c=0
ユーザー risujirohrisujiroh
提出日時 2019-12-18 03:05:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 631 bytes
コンパイル時間 1,446 ms
コンパイル使用メモリ 168,608 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-07 00:20:37
合計ジャッジ時間 13,420 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other AC * 44 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 << "1\n";
      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