제출 #146099

#제출 시각아이디문제언어결과실행 시간메모리
146099youssan_williamPismo (COCI18_pismo)C++14
70 / 70
71 ms1016 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n ; cin >> n; ll arr[n+1]; for(int i = 1 ; i <=n ;i++) cin >> arr[i]; ll answer=10000000000; for(int i = 2 ; i <= n ;i++) { answer= min(answer,abs(arr[i]-arr[i-1])); } cout << answer ; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...