# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562121 | 2022-05-14T05:53:13 Z | AGE | Pismo (COCI18_pismo) | C++14 | 36 ms | 1004 KB |
#include<bits/stdc++.h> #define F first #define S second #define pb push_back #define int long long using namespace std; const int N=1e6,M=2e3,mod=1e9+7; int a[N]; main() { int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; int ans=1e18; for(int i=0;i<n-1;i++){ ans=min(ans,abs(a[i+1]-a[i])); } cout<<ans<<endl; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 2 ms | 212 KB | Output is correct |
5 | Correct | 36 ms | 976 KB | Output is correct |
6 | Correct | 36 ms | 932 KB | Output is correct |
7 | Correct | 34 ms | 1004 KB | Output is correct |