Submission #508711

# Submission time Handle Problem Language Result Execution time Memory
508711 2022-01-13T15:16:57 Z inksamurai Pismo (COCI18_pismo) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include <atcoder/segtree>
#define fi first
#define se second
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define crep(i,x,n) for(int i=x;i<n;i++)
#define drep(i,n) for(int i=n-1;i>=0;i--)
#define vec(...) vector<__VA_ARGS__>
#define _34raRxL ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using namespace std;
typedef long long ll;
typedef long double ld;

void print(){
	cout<<"\n";
}
template<class te,class ...ti>
void print(const te&v, const ti&...nv) { 
	cout<<v;
	if(sizeof...(nv)){
		cout<<" ";
		print(nv...);
	}
}

#define yare {cout<<"DA\n"; exit(0);}
#define nare {cout<<"NE\n"; exit(0);}

using tpii=pair<ll,pair<ll,ll>>;
using pii=pair<int,int>;
using vi=vector<int>;
using vll=vector<long long>;

const int inf=1e9+11;

signed main(){
_34raRxL;
	int n;
	cin>>n;
	vll a(n);
	rep(i,n){
		cin>>a[i];
	}	
	ll ans=inf;
	rep(i,n){
		if(i-1>=0){
			ans=min(ans,abs(a[i]-a[i-1]));
		}
	}
	print(ans,"\n");
//	
	return 0;
}

Compilation message

pismo.cpp:2:10: fatal error: atcoder/segtree: No such file or directory
    2 | #include <atcoder/segtree>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.