Submission #96286

#TimeUsernameProblemLanguageResultExecution timeMemory
96286dalgerokPismo (COCI18_pismo)C++14
70 / 70
17 ms760 KiB
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n; cin >> n; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; } int mn = 2e9; for(int i = 0; i + 1 < n; i++){ mn = min(mn, abs(a[i] - a[i + 1])); } cout << mn; }
#Verdict Execution timeMemoryGrader output
Fetching results...