답안 #176086

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
176086 2020-01-07T20:51:57 Z Doda Pismo (COCI18_pismo) C++14
0 / 70
16 ms 2040 KB
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>

using namespace std;

long long n,a[100005],najm=1000000001,najv;

int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);

cin >> n;

for (int i = 0;i<n;i++){
	cin >> a[i];
	if (a[i] > najv)
		najv = a[i];
	if (a[i] < najm)
		najm = a[i];
}

cout << najv-najm;

return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 3 ms 376 KB Output isn't correct
5 Incorrect 15 ms 1912 KB Output isn't correct
6 Incorrect 16 ms 2040 KB Output isn't correct
7 Incorrect 15 ms 1912 KB Output isn't correct