結果

問題 No.745 letinopia raoha
ユーザー @abcde
提出日時 2019-02-27 22:35:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 785 bytes
コンパイル時間 1,380 ms
コンパイル使用メモリ 159,552 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 05:22:11
合計ジャッジ時間 1,916 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. 入力情報取得.
    int A, B, C, D;
    cin >> A >> B >> C >> D;
    
    // 2. スコアの最大値を計算.
    // -> great判定を連続B回後に, perfect判定を連続A回とすると, 
    // スコアを, たくさん稼げそう.
    int score[A + B];
    int odds[8] = {1, 2, 4, 8, 16, 32, 64, 128};
    for(int i = 0; i < A + B; i++){
        int o = i / 100;
        score[i] = odds[o] * 50;
        if(i >= B) score[i] *= 2;
    }
    
    // 3. 出力 ~ 終了.
    int ans = 0;
    for(int i = 0; i < A + B; i++) ans += score[i];
    if(D < 10){
        cout << "Possible" << endl;
        cout << ans << endl;
    }else{
        cout << "Impossible" << endl;
    }
    return 0;
    
}
0