結果

問題 No.745 letinopia raoha
ユーザー oooooba
提出日時 2021-04-10 15:15:30
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 754 bytes
コンパイル時間 1,468 ms
コンパイル使用メモリ 111,656 KB
最終ジャッジ日時 2025-01-20 15:41:56
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int32_t a, b, c, d;
    cin >> a >> b >> c >> d;
    if (d == 10) {
        cout << "Impossible" << endl;
        return 0;
    }
    int32_t ans = 0;
    int32_t p = 1;
    for (auto i = 0; i < a + b; ++i) {
        if (i < b)
            ans += 50 * p;
        else
            ans += 100 * p;
        if ((i + 1) % 100 == 0)
            p *= 2;
    }
    cout << "Possible" << endl;
    cout << ans << endl;
    return 0;
}
0