結果
問題 | No.394 ハーフパイプ(1) |
ユーザー |
|
提出日時 | 2020-04-07 08:16:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 497 bytes |
コンパイル時間 | 1,159 ms |
コンパイル使用メモリ | 83,004 KB |
最終ジャッジ日時 | 2025-01-09 14:49:06 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> using ldouble = long double; void solve() { std::vector<ldouble> xs(6); for (auto& x : xs) std::cin >> x; std::sort(xs.begin(), xs.end()); ldouble s = 0; for (int i = 1; i < 5; ++i) s += xs[i]; std::cout << std::fixed << std::setprecision(2) << s / 4 << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }