結果

問題 No.1905 PURE PHRASE
ユーザー 👑 platinumplatinum
提出日時 2022-04-15 22:41:43
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 757 bytes
コンパイル時間 2,051 ms
コンパイル使用メモリ 207,588 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-26 08:22:36
合計ジャッジ時間 4,096 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 11 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 12 ms
4,376 KB
testcase_10 AC 11 ms
4,380 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 12 ms
4,380 KB
testcase_22 AC 12 ms
4,380 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 12 ms
4,376 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 12 ms
4,380 KB
testcase_33 AC 12 ms
4,376 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 12 ms
4,380 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using namespace std;

int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i,N) cin >> A[i];
    
    string code[7] = {"C4", "D4", "E4", "F4", "G4", "A4", "B4"};
    int f[7] = {2616, 2943, 3270, 3488, 3924, 4360, 4905};
    int max_dif[7] = {0};
    vector<vector<int>> val(7);
    
    rep(i,7){
        rep(j,8){
            val[i].emplace_back(A[j*f[i]]);
        }
    }
    rep(i,7) sort(val[i].begin(), val[i].end());
    rep(i,7) max_dif[i] = val[i][7] - val[i][0];
    int ans = -1, res = 1e9;
    rep(i,7){
        if(max_dif[i] < res){
            res = max_dif[i];
            ans = i;
        }
    }
    cout << code[ans] << endl;
    
    return 0;
}
0