結果
| 問題 |
No.21 平均の差
|
| コンテスト | |
| ユーザー |
mewmew
|
| 提出日時 | 2017-03-01 23:56:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 417 bytes |
| コンパイル時間 | 576 ms |
| コンパイル使用メモリ | 66,916 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 22:49:09 |
| 合計ジャッジ時間 | 1,269 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <string>
#define REP(i,n) for(int i=0;i<(n);++i)
#define SORT(a) sort((a).begin(),(a).end())
#define PB push_back
using namespace std;
typedef vector<int> VI;
typedef queue<int> QI;
int main(){
int N, K;
cin >> N >> K;
VI v;
REP(i,N){
int n;
cin >> n;
v.PB(n);
}
SORT(v);
cout << v[N-1] - v[0] << endl;
}
mewmew