結果

問題 No.1905 PURE PHRASE
ユーザー 👑 platinumplatinum
提出日時 2022-04-15 22:50:20
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 780 bytes
コンパイル時間 1,915 ms
コンパイル使用メモリ 202,192 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-26 08:27:59
合計ジャッジ時間 3,942 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 12 ms
4,376 KB
testcase_05 AC 12 ms
4,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 12 ms
4,380 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 12 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 12 ms
4,376 KB
testcase_17 AC 12 ms
4,376 KB
testcase_18 AC 12 ms
4,376 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 12 ms
4,376 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 12 ms
4,376 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 12 ms
4,380 KB
testcase_32 AC 12 ms
4,380 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 12 ms
4,380 KB
testcase_37 AC 12 ms
4,380 KB
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];
    int m = -1, v = 0;
    rep(i,500){
        if(abs(A[i]) > v){
            v = abs(A[i]);
            m = i;
        }
    }
    
    string code[7] = {"C4", "D4", "E4", "F4", "G4", "A4", "B4"};
    int f[7] = {2616, 2943, 3270, 3488, 3924, 4360, 4905};
    int max_sum[7] = {0};
    
    rep(i,7){
        rep(j,8){
            int p = m + j * f[i];
            max_sum[i] += abs(A[p]);
        }
    }
    int ans = -1, res = 0;
    rep(i,7){
        if(max_sum[i] > res){
            res = max_sum[i];
            ans = i;
        }
    }
    cout << code[ans] << endl;
    
    return 0;
}
0