結果
| 問題 | 
                            No.1134 Deviation Score Ⅱ
                             | 
                    
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-07-19 19:04:36 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 23 ms / 2,000 ms | 
| コード長 | 606 bytes | 
| コンパイル時間 | 1,283 ms | 
| コンパイル使用メモリ | 130,148 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-01 22:35:22 | 
| 合計ジャッジ時間 | 2,508 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 27 | 
ソースコード
#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
using namespace std;
typedef long long ll;
const int mod=998244353;
int main(){
	static int n,x[100000],m;
	cin>>n;
	double ave=0;
	for(int i=0;i<n;i++){
		cin>>x[i];
		ave+=x[i];
	}
	ave/=n;
	cin>>m,m--;
	double dev=0;
	for(int i=0;i<n;i++)
		dev+=pow(x[i]-ave,2);
	dev=sqrt(dev/n);
	if(dev==0)
		cout<<50<<endl;
	else
		cout<<int((x[m]-ave)/dev*10+50)<<endl;
}