Submission #93818

#TimeUsernameProblemLanguageResultExecution timeMemory
93818ngot23Pismo (COCI18_pismo)C++11
70 / 70
13 ms636 KiB
#include <bits/stdc++.h> #define rep(i, a, b) for(int i=(a) ; i<=(b) ; ++i) #define mp make_pair #define pii pair<int, int> #define PB push_back #define F first #define S second #define Task "pismo" using namespace std; const int N=100005; int n, a[N]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); //freopen(Task".inp", "r", stdin); //freopen(Task".out", "w", stdout); cin >> n; int ans=2e9; rep(i, 1, n) { cin >> a[i]; if(i>=2) ans=min(ans, abs(a[i]-a[i-1])); } cout << ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...