結果
| 問題 |
No.21 平均の差
|
| ユーザー |
Kura
|
| 提出日時 | 2019-02-20 19:30:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 247 bytes |
| コンパイル時間 | 805 ms |
| コンパイル使用メモリ | 64,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 10:14:21 |
| 合計ジャッジ時間 | 1,204 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> x(n);
for (int i = 0; i < n; i++) {
cin >> x[i];
}
sort(x.begin(), x.end());
cout << x[n - 1] - x[0] << endl;
}
Kura