結果
問題 | No.745 letinopia raoha |
ユーザー |
![]() |
提出日時 | 2019-10-25 20:28:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 539 bytes |
コンパイル時間 | 1,582 ms |
コンパイル使用メモリ | 167,724 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-21 20:46:32 |
合計ジャッジ時間 | 2,373 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
#include <bits/stdc++.h> #include <assert.h> using namespace std; using i64 = long long; int main() { i64 a, b, c, d; cin >> a >> b >> c >> d; if (10 <= d) cout << "Impossible" << endl; else { i64 ans = 0; i64 bon = 1; i64 sum = a + b; for (i64 i = 0; i < sum; i++) { if (0 < b) { ans += 50 * bon; b--; } else ans += 100 * bon; if ((i + 1) % 100 == 0) bon *= 2; } cout << "Possible" << endl << ans << endl; } return 0; }