# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
442358 | Iwanttobreakfree | Pismo (COCI18_pismo) | C++98 | 56 ms | 1512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
int main(){
int n,sol=1e9;
cin>>n;
int v[n];
for(int i=0;i<n;i++)cin>>v[i];
for(int i=1;i<n;i++){
sol=min(sol,max(v[i]-v[i-1],v[i-1]-v[i]));
}
cout<<sol;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |