結果
問題 | No.394 ハーフパイプ(1) |
ユーザー | hanorver |
提出日時 | 2016-07-15 22:24:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 763 ms |
コンパイル使用メモリ | 80,308 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 04:10:26 |
合計ジャッジ時間 | 1,260 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <iostream> #include <vector> #include <numeric> #include <algorithm> #include <iomanip> int main() { std::vector<int> score(6); for (int i = 0; i < 6; i++) { std::cin >> score[i]; } std::sort(score.begin(), score.end()); int total = std::accumulate(score.begin(), score.end(), 0); // 最低点と最高点を取り除く total -= score.front() + score.back(); double ave = total / 4.0; std::cout << std::fixed << std::setprecision(2) << ave << std::endl; return 0; }