結果

問題 No.208 王将
ユーザー m1025o1184tm1025o1184t
提出日時 2019-12-28 10:41:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 502 bytes
コンパイル時間 1,681 ms
コンパイル使用メモリ 163,104 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-19 14:46:59
合計ジャッジ時間 4,341 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

signed int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int x, y, x2, y2;
	cin >> x >> y >> x2 >> y2;

	x -= x2;
	y -= y2;

	ll ans = 1;

	for (int i = max(x, y) + 1; i <= (x + y); ++i) {
		ans *= i;
	}

	ll res = 1;
	for (int i = 1; i <= min(x, y); ++i) {
		res *= i;
	}

	ans /= res;

	dunk(ans);

	return 0;
}
0