結果

問題 No.21 平均の差
ユーザー SeiyaT
提出日時 2021-09-10 10:49:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 1,753 ms
コンパイル使用メモリ 165,840 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-02 18:34:25
合計ジャッジ時間 2,227 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll=long long;
ll mod=1000000007;
ll INF=1LL<<60;

int main() {
	int N,K;
	cin >> N >> K;
	vector<int> A(N);
	for(int i=0;i<N;i++)cin >> A[i];
	sort(A.begin(),A.end());
	cout << A[N-1]-A[0] << endl;
}
0