#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mp = boost::multiprecision; using Bdouble = mp::number>; using namespace std; long double x[100010]; int main() { Bdouble n; int m; cin >> n; Bdouble sum = 0; for (int i = 0; i < n; i++) { cin >> x[i]; sum += x[i]; } sum /= n; Bdouble sum1 = 0; for (int i = 0; i < n; i++) { sum1 += (sum - x[i]) * (sum - x[i]); } sum1 = sum1 / n; sum1 = sqrt(sum1); cin >> m; Bdouble ans; if (sum1 == 0) { cout << "50" << endl; return 0; } Bdouble z = 10; ans = abs(x[m - 1] - sum) * z / sum1; if (x[m - 1] > sum) { cout << floor(50 + ans) << endl; } else { cout << floor(50 - ans) << endl; } return 0; }