제출 #508623

#제출 시각아이디문제언어결과실행 시간메모리
508623lukameladzePismo (COCI18_pismo)C++14
70 / 70
10 ms616 KiB
# include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define pii pair <int, int>
using namespace std;
const int N = 3e5 + 5;
int t,n,a[N],cur,le,ri;
main() {
	std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	cin>>n;
	for (int i = 1; i <= n; i++) {
	    cin>>a[i];
	}
	int ans = 2e9;
	for (int i = 1; i < n ;i++) {
	    ans = min(ans, abs(a[i] - a[i + 1]));
	}
	cout<<ans<<endl;
}

컴파일 시 표준 에러 (stderr) 메시지

pismo.cpp:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main() {
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...