답안 #84511

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
84511 2018-11-15T19:55:52 Z MatesV13 Prosjek (COCI18_prosjek) C++11
50 / 50
2 ms 604 KB
#include <bits/stdc++.h>
using namespace std;
int n, x;
multiset<int> s;
int main (){
ios::sync_with_stdio(0);
cin.tie(0);
	cin >> n;
	for (int i=0;i<n;i++){
		cin >> x;
		s.insert(x);
	}
	set<int> :: iterator it = s.begin();
	double a = *it;
	for (int i=0;i<n;i++){
		a = (a + *it)/2;
		it++;
	}
	cout << a;
return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 2 ms 472 KB Output is correct
3 Correct 2 ms 472 KB Output is correct
4 Correct 2 ms 476 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 588 KB Output is correct
7 Correct 2 ms 588 KB Output is correct
8 Correct 2 ms 588 KB Output is correct
9 Correct 2 ms 588 KB Output is correct
10 Correct 2 ms 604 KB Output is correct