結果
問題 | No.2970 三次関数の絶対値 |
ユーザー |
|
提出日時 | 2024-11-29 21:26:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 2,134 ms |
コンパイル使用メモリ | 193,836 KB |
最終ジャッジ日時 | 2025-02-26 09:11:14 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 WA * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); vector<double> C(4); for(auto &c : C) cin >> c; double L,R; cin >> L >> R; double answer = 1e18; for(double x=L; x<=R+1e-5; x+=0.001){ double now = 0,X = 1; for(auto &c : C) now += c*X,X *= x; answer = min(answer,abs(now)); } cout << fixed << setprecision(20) << answer << endl; }