結果
| 問題 | No.1134 Deviation Score Ⅱ |
| ユーザー |
|
| 提出日時 | 2022-09-27 20:38:20 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 1,843 ms |
| コンパイル使用メモリ | 214,824 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-20 12:54:10 |
| 合計ジャッジ時間 | 3,585 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
int N; cin >> N;
using ld = long double;
vector<ld> x(N);
rep(i,N) cin >> x[i];
int M; cin >> M; M--;
ld mean = accumulate(x.begin(), x.end(), 0) / ld(N);
ld se = 0;
rep(i,N) se += (x[i] - mean) * (x[i] - mean);
se /= ld(N);
se = sqrtl(se);
if(se <= 1e-8) { cout << 50 << endl; return 0; }
ld ans = 10.0 * (x[M] - mean) / se + 50.0;
cout << int(ans) << endl;
}