結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2020-02-20 22:26:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 750 ms |
コンパイル使用メモリ | 66,296 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 19:19:17 |
合計ジャッジ時間 | 1,268 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 1 |
ソースコード
#include <iostream> #include <algorithm> int main(void){ int N,K; std::cin >> N >> K; int* n = new int[N]; for(int i=0;i<N;i++){ std::cin >> n[i]; } std::cout << *std::max_element(n, n+N-1) - *std::min_element(n, n+N-1) << std::endl; return 0; }