結果

問題 No.394 ハーフパイプ(1)
ユーザー Kurichan0806
提出日時 2017-12-04 15:16:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 872 ms
コンパイル使用メモリ 85,068 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-28 15:10:00
合計ジャッジ時間 1,296 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
#define diff(x,y) ((x > y) ? (x - y) : (y - x))

int main() {
	int sum = 0;
	vector <int> num(6);
	for (int i = 0; i < 6; i++)
		cin >> num[i];
	sort(num.begin(), num.end());
	for (int i = 1; i < 5; i++)
		sum += num[i];
	cout << fixed << setprecision(2) << (double)sum / 4 << endl;
	return 0;
}
0