結果
| 問題 |
No.745 letinopia raoha
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-21 15:47:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 946 bytes |
| コンパイル時間 | 1,019 ms |
| コンパイル使用メモリ | 113,616 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-19 03:24:13 |
| 合計ジャッジ時間 | 1,352 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
ソースコード
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <memory>
#include <regex>
using namespace std;
int main()
{
int a, b, c, d;
cin >> a >> b >> c >> d;
if(d >= 10){
cout << "Impossible" << endl;
return 0;
}
long long ans = 0;
for(int i=0; a+b>0; ++i){
int y = min(100, b);
int x = min(a, 100 - y);
long long tmp = 100 * x + 50 * y;
tmp *= 1 << i;
ans += tmp;
a -= x;
b -= y;
}
cout << "Possible" << endl << ans << endl;
return 0;
}