結果
| 問題 |
No.745 letinopia raoha
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-02-18 03:29:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 603 bytes |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 65,316 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-06 15:22:17 |
| 合計ジャッジ時間 | 1,249 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 2 WA * 6 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int a,b,c,d;cin>>a>>b>>c>>d;
if(d > 9){
cout << "Impossible" << endl;
}else{
long long ans = 0;
long long nw = 1;
while(a){
if(b >= 100){
ans += nw*(50*100);
b-=100;
}else if(a+b >= 100){
ans += nw*(b*50+(100-b)*100);
a -= (100-b);
b = 0;
}else{
ans += nw*(b*50+a*100);
break;
}
nw *= 2;
}
cout << ans << endl;
}
}