結果
| 問題 |
No.21 平均の差
|
| ユーザー |
machy
|
| 提出日時 | 2015-06-15 03:05:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 395 bytes |
| コンパイル時間 | 841 ms |
| コンパイル使用メモリ | 78,500 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 20:50:43 |
| 合計ジャッジ時間 | 1,435 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <map>
using namespace std;
typedef long long LL;
int main(){
int N, K;
cin >> N;
cin >> K;
vector<int> v(N);
for(int i = 0; i < N; i++){
cin >> v[i];
}
sort(v.begin(), v.end());
cout << v.back() - v.front() << endl;
return 0;
}
machy