C. 过河卒

    Type: Default 1000ms 256MiB

过河卒

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

棋盘上 A 点有一个过河卒,需要走到目标 B 点。卒行走的规则:可以向下、或者向右。同时在棋盘上 C 点有一个对方的马,该马所在的点和所有跳跃一步可达的点称为对方马的控制点。因此称之为“马拦过河卒”。

棋盘用坐标表示,A 点 (0,0)、B 点 (n,m),同样马的位置坐标是需要给出的。 现在要求你计算出卒从 A 点能够到达 B 点的路径的条数,假设马的位置是固定不动的,并不是卒走一步马走一步。

Format

Input

一行四个正整数,分别表示 B 点坐标和马的坐标。

Output

一个整数,表示所有的路径条数。

Samples

6 6 3 3
6

Limitation

1s, 1024KiB for each test case.

test1

Not Attended
Status
Done
Rule
XCPC
Problem
3
Start at
2026-5-10 12:31
End at
2026-5-10 12:43
Duration
0.2 hour(s)
Host
Partic.
1