結果
| 問題 |
No.21 平均の差
|
| ユーザー |
|
| 提出日時 | 2016-02-08 17:04:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 437 bytes |
| コンパイル時間 | 826 ms |
| コンパイル使用メモリ | 64,136 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 21:48:23 |
| 合計ジャッジ時間 | 1,467 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
// http://yukicoder.me/problems/67
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <vector>
int
main()
{
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int n, k;
std::cin >> n >> k;
std::vector<int> points(n);
for (int i = 0; i < n; i++) {
std::cin >> points[i];
}
std::sort(points.begin(), points.end());
std::cout << (points[n - 1] - points[0]) << std::endl;
return EXIT_SUCCESS;
}