제출 #87828

#제출 시각아이디문제언어결과실행 시간메모리
87828AntonioDakiProsjek (COCI18_prosjek)C++14
50 / 50
3 ms708 KiB
#include<bits/stdc++.h>

using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
    int n, x[22];
    double m;
    cin >> n;
    for(int i = 0; i < n; ++i)
    	cin >> x[i];
    sort(x, x + n);
    m = x[0];
    for(int i = 1; i < n; ++i)
    	m = (m + x[i]) / 2;
	cout << m;

	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

prosjek.cpp: In function 'int main()':
prosjek.cpp:17:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i = 1; i < n; ++i)
     ^~~
prosjek.cpp:19:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  cout << m;
  ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...