# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
99377 | kimcoding | Pismo (COCI18_pismo) | C++17 | 18 ms | 1280 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <cmath>
#define min(a,b) (a<b?a:b)
int n, pre, ans = 2e9;
int main() {
scanf("%d", &n);
for(int i=1,now;i<=n;i++){
scanf("%d", &now);
if (i != 1) ans = min(ans, abs(now - pre));
pre = now;
}
printf("%d\n", ans);
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |