Submission #120794

#TimeUsernameProblemLanguageResultExecution timeMemory
120794cvelePismo (COCI18_pismo)C++14
70 / 70
43 ms1656 KiB
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <iomanip> #include <bitset> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <deque> #include <set> #include <list> #include <map> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int here = 2e9; for (int i = 1; i < n; i++) { here = min(here, abs(arr[i] - arr[i - 1])); } cout << here << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...