結果

問題 No.745 letinopia raoha
ユーザー Shawn stayCShawn stayC
提出日時 2020-07-10 00:53:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 666 bytes
コンパイル時間 1,527 ms
コンパイル使用メモリ 164,024 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-17 07:28:56
合計ジャッジ時間 2,048 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 WA -
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 WA -
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

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=0; i<b; i++){
		if(i<100) {ans+=50; r=1;}
		else if(i<200) {ans+=100; r=2;}
		else if(i<300) {ans+=200; r=4;}
		else if(i<400) {ans+=400; r=8;}
		else if(i<500) {ans+=800; r=16;}
		else if(i<600) {ans+=1600; r=32;}
	}
	int m=b%100;
	for(int i=m; i<a+m; i++){
		if(i<100) ans+=100*r;
		else if(i<200) ans+=100*r*2;
		else if(i<300) ans+=100*r*4;
		else if(i<400) ans+=100*r*8;
	}
	cout<<ans<<endl;
}
0