結果

問題 No.1131 Deviation Score
ユーザー UGLOUGLO
提出日時 2020-08-23 17:56:01
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 1,679 ms
コンパイル使用メモリ 165,920 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 12:29:40
合計ジャッジ時間 4,504 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
4,376 KB
testcase_01 AC 4 ms
4,376 KB
testcase_02 AC 158 ms
4,380 KB
testcase_03 AC 73 ms
4,380 KB
testcase_04 AC 145 ms
4,376 KB
testcase_05 AC 56 ms
4,376 KB
testcase_06 AC 155 ms
4,376 KB
testcase_07 AC 75 ms
4,376 KB
testcase_08 AC 138 ms
4,376 KB
testcase_09 AC 52 ms
4,376 KB
testcase_10 AC 132 ms
4,376 KB
testcase_11 AC 140 ms
4,380 KB
testcase_12 AC 119 ms
4,380 KB
testcase_13 AC 156 ms
4,380 KB
testcase_14 AC 34 ms
4,380 KB
testcase_15 AC 33 ms
4,376 KB
testcase_16 AC 142 ms
4,380 KB
testcase_17 AC 58 ms
4,376 KB
testcase_18 AC 179 ms
4,376 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); ++i)

int main(){
    int n; cin >> n;
    vector<int> x(n);
    int sum = 0;
    rep(i,n){
        cin >> x[i];
        sum += x[i];
    }

    double ave = (1.0 * sum) / n;
    rep(i,n){
        double d = 50 - (ave - x[i])/ 2;
        cout << floor(d) << endl;
    }
}
0