# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171328 | itiam | Pismo (COCI18_pismo) | C++11 | 72 ms | 1280 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,njm,prix,x,v,m,raz;
cin >> N;
cin >> prix;
for (int i=0;i<N-1;i++){
cin >> x;
if (x>prix){
raz=x-prix;}
else{
raz=prix-x;}
if (i==0){
njm=raz;
}
else{
if (njm>raz) njm=raz;
}
prix=x;
}
cout << njm;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |