제출 #884146

#제출 시각아이디문제언어결과실행 시간메모리
884146vjudge1Pismo (COCI18_pismo)C++17
70 / 70
8 ms348 KiB
#pragma GCC optimize("unroll-loops,Ofast,O3") #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define spc << " " << #define endl "\n" #define all(x) x.begin(), x.end() #define int long long #define ii pair<int,int> #define vi vector<int> #define vii vector<ii> #define st first #define nd second #define inf 1000000009 #define MOD 998244353 #define lim 200005 using namespace std; void solve(){ int n; cin >> n; int temp; cin >> temp; int ans=inf; for(int i=2; i<=n; i++){ int a; cin >> a; ans = min(ans, abs(a-temp)); temp=a; } cout << ans << endl; } signed main(){ ios_base::sync_with_stdio(false);cin.tie(0); #ifdef Local freopen("in","r",stdin); freopen("out","w",stdout); #endif /*freopen("fcolor.in","r",stdin); freopen("fcolor.out","w",stdout);*/ int t=1; //cin >> t; while(t--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...