結果
| 問題 |
No.745 letinopia raoha
|
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2018-10-19 21:27:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 664 bytes |
| コンパイル時間 | 734 ms |
| コンパイル使用メモリ | 73,580 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-18 19:57:39 |
| 合計ジャッジ時間 | 1,442 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (d < 10) {
cout << "Possible" << endl;
int s = 0, t = 0, u = 1;
for (int i = 0; i < b; i++) {
s += 50 * u;
if (++t == 100) t -= 100, u *= 2;
}
for (int i = 0; i < a; i++) {
s += 100 * u;
if (++t == 100) t -= 100, u *= 2;
}
cout << s << endl;
} else {
cout << "Impossible" << endl;
}
return 0;
}
merom686