結果
| 問題 |
No.745 letinopia raoha
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-31 10:01:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 965 bytes |
| コンパイル時間 | 685 ms |
| コンパイル使用メモリ | 63,000 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 02:42:08 |
| 合計ジャッジ時間 | 1,157 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
using namespace std;
template<class T> bool maxPointer(T& a, T b) { if (a < b) {a = b;return true;}return false;}
template<class T> int maxReturn(T a, T b) {if (a > b) {return a;} else {return b;}}
template<class T> bool minPointer(T& a, T b) {if (a < b) {a = b;return true;}return false;}
const int life = 1000;
const string failedMsg = "Impossible";
const string successMsg = "Possible";
int comboResult(int a, int b) {
int bounus = 1;
int addpoint = 50;
int ans = 0;
for (int i = 0; i < a + b; i++) {
if (i == b) addpoint = 100;
if (i != 0 && i % 100 == 0) bounus += bounus;
ans += addpoint * bounus;
}
return ans;
}
int main(void){
int A,B,C,D;
cin >> A >> B >> C >> D;
if (life <= D * 100) {
cout << failedMsg << endl;
exit(0);
}
cout << successMsg << endl;
cout << comboResult(A, B) << endl;
}