結果
問題 | No.716 距離 |
ユーザー |
![]() |
提出日時 | 2018-07-27 22:22:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 648 ms |
コンパイル使用メモリ | 80,820 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-05 01:01:56 |
合計ジャッジ時間 | 1,695 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 |
ソースコード
#include <iostream>#include <algorithm>#include <vector>#include <set>#include <map>#include <queue>#include <stack>#include <cstdio>#include <cstring>#include <math.h>using namespace std;typedef long long ll;typedef double D;typedef pair<int,int> P;#define M 1000000007#define F first#define S second#define PB push_backint n,ma,mi=2000000000,a;int main(void){cin>>n>>a;ma=a;for(int i=1;i<n;i++){int b;cin>>b;mi=min(mi,b-a);a=b;}cout<<mi<<endl<<a-ma<<endl;}