# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
94709 | 2019-01-23T06:37:20 Z | farukkastamonuda | Pismo (COCI18_pismo) | C++14 | 17 ms | 760 KB |
#include <bits/stdc++.h> #define md 1000000007 #define fi first #define se second #define mp make_pair #define inf 1000000000 #define li 100005 #define lo long long #define pb push_back using namespace std; int n,sira=0,cev,A[li],mn=inf; char s[li]; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&A[i]); for(int i=1;i<n;i++){ mn=min(mn,abs(A[i]-A[i+1])); } printf("%d\n",mn); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 252 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 380 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 16 ms | 760 KB | Output is correct |
6 | Correct | 17 ms | 760 KB | Output is correct |
7 | Correct | 16 ms | 632 KB | Output is correct |