# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
95337 | 2019-01-30T10:23:12 Z | mzhao | Pismo (COCI18_pismo) | C++11 | 16 ms | 760 KB |
#include <bits/stdc++.h> using namespace std; int N, A[100100], ans = 2e9; int main() { scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &A[i]); } for (int i = 1; i < N; i++) ans = min(ans, abs(A[i]-A[i-1])); printf("%d\n", ans); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Correct | 16 ms | 760 KB | Output is correct |
6 | Correct | 16 ms | 632 KB | Output is correct |
7 | Correct | 16 ms | 704 KB | Output is correct |