結果

問題 No.745 letinopia raoha
ユーザー Shawn stayCShawn stayC
提出日時 2020-07-10 00:18:25
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 1,587 ms
コンパイル使用メモリ 162,804 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 06:31:26
合計ジャッジ時間 2,062 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 2 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 2 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 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=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