結果
| 問題 |
No.21 平均の差
|
| ユーザー |
|
| 提出日時 | 2015-06-27 21:02:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 369 bytes |
| コンパイル時間 | 1,159 ms |
| コンパイル使用メモリ | 162,076 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 20:07:49 |
| 合計ジャッジ時間 | 1,760 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
using namespace std;
#include <bits/stdc++.h>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I))
#define ALL(C) (C).begin(),(C).end()
int main(int argc,char**argv)
{
BEGIN
int N,K;cin>>N>>K;
vector<int>n(N);
FOR(i,0,N)cin>>n[i];
sort(ALL(n));
cout<<(n[N-1]-n[0])<<endl;
END
}