結果
問題 |
No.208 王将
|
ユーザー |
![]() |
提出日時 | 2019-12-28 10:41:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 502 bytes |
コンパイル時間 | 1,584 ms |
コンパイル使用メモリ | 166,296 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-11 07:03:16 |
合計ジャッジ時間 | 4,181 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 WA * 8 TLE * 1 -- * 13 |
ソースコード
#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; }