結果

問題 No.745 letinopia raoha
ユーザー Ichimiya
提出日時 2020-05-14 01:42:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 643 bytes
コンパイル時間 1,514 ms
コンパイル使用メモリ 166,292 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 15:48:01
合計ジャッジ時間 2,161 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;

int main() {
	int A, B, C, D;
	cin >> A >> B >> C >> D;

	if (D == 10) {
		cout << "Impossible" << endl;
		return 0;
	}

	int score = 0;
	int cnt = 0;
	int c_score = 0;
	//vector<char> v(A + B);
	for (int i = 1; i <= A+B; i++) {
		cnt++;
		int n = 1;
		if (cnt <= 100) {
			n = 1;
		}
		else {
			int x = cnt / 100;
			if (cnt % 100 == 0) x--;
			for (int j = 0; j < x; j++) {
				n *= 2;
			}
		}

		if (i <= B) {
			//v.at(i) = 'B';
			score += 50 * n;
		}
		else {
			//v.at(i) = 'A';
			score += 100 * n;
		}
	}

	cout << "Possible" << endl;
	cout << score << endl;
}
0