結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2017-09-23 18:36:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 544 bytes |
コンパイル時間 | 612 ms |
コンパイル使用メモリ | 77,576 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 04:15:52 |
合計ジャッジ時間 | 1,152 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cstring> #include <math.h> #include <cmath> #include <limits.h> #include <map> #include <set> #include <queue> #include <algorithm> #include <functional> #include <stdio.h> using namespace std; long long MOD = 1000000007; int main() { int s = INT_MAX,b = 0; int N,K; cin >> N >> K; for ( int i = 0; i < N; i++ ) { int a; cin >> a; s = min( s, a ); b = max( b, a ); } cout << b - s << endl; return 0; }