結果
| 問題 |
No.21 平均の差
|
| ユーザー |
kurenai3110
|
| 提出日時 | 2017-04-11 17:48:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 286 bytes |
| コンパイル時間 | 525 ms |
| コンパイル使用メモリ | 64,232 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 09:03:54 |
| 合計ジャッジ時間 | 886 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int n, k; cin >> n >> k;
vector<int>num(n);
for (int i = 0; i < n; i++) {
cin >> num[i];
}
sort(num.begin(), num.end());
cout << num[num.size() - 1] - num[0] << endl;
return 0;
}
kurenai3110