Submission #1010543

# Submission time Handle Problem Language Result Execution time Memory
1010543 2024-06-29T07:57:49 Z Almonther Pismo (COCI18_pismo) C++
70 / 70
11 ms 2000 KB
#include <bits/stdc++.h>

#define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define co cout<<
//#pragma GCC optimize("O3,Ofast,unroll-loops")
//#pragma GCC target("avx2,sse3,sse4,avx")
using namespace std;
//stuff
ll n;
ll arr[1000001];
ll mn=1e18;
void solve(){
    cin>>n;
    for(int i=0;i<n;i++) cin>>arr[i];
    for(int i=1;i<n;i++){
        mn=min(mn,abs(arr[i]-arr[i-1]));
    }
    co mn;
}

int main()
{
    suiii
    int tt=1;
    // cin>>tt;
    while(tt--){
        solve();
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 344 KB Output is correct
5 Correct 11 ms 1868 KB Output is correct
6 Correct 8 ms 1948 KB Output is correct
7 Correct 11 ms 2000 KB Output is correct