結果
問題 |
No.21 平均の差
|
ユーザー |
|
提出日時 | 2019-09-08 21:12:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 442 bytes |
コンパイル時間 | 1,665 ms |
コンパイル使用メモリ | 170,560 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 15:13:32 |
合計ジャッジ時間 | 2,216 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
/** @file 021.cpp @title No.21 平均の差 - yukicoder @url https://yukicoder.me/problems/no/21 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { int N, K; cin >> N >> K; vector<int> n(N, 0); REP(i, N) { cin >> n[i]; } sort(ALL(n)); cout << n.back() - n.front() << endl; return 0; }