답안 #562120

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
562120 2022-05-14T05:51:49 Z AGE Pismo (COCI18_pismo) C++14
0 / 70
37 ms 1876 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=0;

    for(int i=0;i<n-1;i++){

        ans=min(ans,abs(a[i+1]-a[i]));
    }
    
     cout<<ans<<endl;

    return 0;
}

Compilation message

pismo.cpp:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main()
      | ^~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Incorrect 1 ms 340 KB Output isn't correct
4 Incorrect 1 ms 336 KB Output isn't correct
5 Incorrect 35 ms 1788 KB Output isn't correct
6 Incorrect 37 ms 1876 KB Output isn't correct
7 Incorrect 35 ms 1796 KB Output isn't correct