結果

問題 No.1131 Deviation Score
ユーザー Shawn stayCShawn stayC
提出日時 2021-08-25 23:23:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 203,044 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 14:42:35
合計ジャッジ時間 4,150 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
5,248 KB
testcase_01 AC 4 ms
5,376 KB
testcase_02 AC 112 ms
5,376 KB
testcase_03 AC 55 ms
5,376 KB
testcase_04 AC 105 ms
5,376 KB
testcase_05 AC 41 ms
5,376 KB
testcase_06 AC 112 ms
5,376 KB
testcase_07 AC 56 ms
5,376 KB
testcase_08 AC 104 ms
5,376 KB
testcase_09 AC 37 ms
5,376 KB
testcase_10 AC 97 ms
5,376 KB
testcase_11 AC 103 ms
5,376 KB
testcase_12 AC 85 ms
5,376 KB
testcase_13 AC 116 ms
5,376 KB
testcase_14 AC 24 ms
5,376 KB
testcase_15 AC 25 ms
5,376 KB
testcase_16 AC 106 ms
5,376 KB
testcase_17 AC 44 ms
5,376 KB
testcase_18 AC 139 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<(r);++i)
typedef long long ll;

int main(){
	int n; cin>>n;
	vector<int> a(n);
	rep(i,0,n) cin>>a[i];
	int r=accumulate(a.begin(),a.end(),0);
	double ave=r/(n+0.0);
	rep(i,0,n){
		int ans=50-((ave-a[i])/2);
		cout<<ans<<endl;
	}
}
0