結果

問題 No.745 letinopia raoha
ユーザー Shawn stayC
提出日時 2020-07-10 00:18:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 1,852 ms
コンパイル使用メモリ 167,120 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-08 19:14:55
合計ジャッジ時間 2,189 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
typedef long long ll;

int main(){
	int a,b,c,d; cin>>a>>b>>c>>d;
	if(d==10){cout<<"Impossible"<<endl; return 0;}
	if(d<10) cout<<"Possible"<<endl;
	int ans=0; int r=1;
	for(int i=1; i<=b; i++){
		if(i<=100) {ans+=50; r=1;}
		else if(100<i&&i<=200) {ans+=100; r=2;}
		else if(200<i&&i<=300) {ans+=200; r=4;}
		else if(300<i&&i<=400) {ans+=400; r=8;}
	}
    int m=b%100;
	for(int i=m+1; i<=a+m; i++){
		if(i<=100) ans+=100*r;
		else if(100<i&&i<=200) ans+=100*r*2;
		else if(200<i&&i<=300) ans+=100*r*4;
		else if(300<i&&i<=400) ans+=100*r*8;
	}
	cout<<ans<<endl;
}
0