Submission #776617

# Submission time Handle Problem Language Result Execution time Memory
776617 2023-07-08T05:55:51 Z vjudge1 Pismo (COCI18_pismo) C++17
70 / 70
16 ms 2164 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define OYY 1000000000005
#define faster ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mid (start+end)/2
#define mod 1000000007
vector <int> v;

int32_t main(){
    faster
    int n;cin>>n;
    int dizi[n];
    for(int i=0;i<n;i++){
        cin>>dizi[i];
        if(i>0)v.push_back(abs(dizi[i]-dizi[i-1]));
    }
    sort(v.begin(),v.end());
    cout<<v[0]<<'\n';
    return 0;
}
# 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 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 16 ms 2164 KB Output is correct
6 Correct 15 ms 2132 KB Output is correct
7 Correct 14 ms 2128 KB Output is correct