这道题翻译的工作人员直接狗带

TimeLimit:500MS  MemoryLimit:64MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

什么?翻译君?你要狗带?不要啊...翻译君...你不能死....

不是我想死,是这翻译实在是太难了啊

1455861325161086855.jpg

没办法,还是硬着头皮干吧,要是皇上怪罪下来,我可小命不保

在图中选定两个正六边形中心的坐标(x1, y1)和(x2, y2),(x1 ≤ x2并且y1 ≤ y2),所有的含有中心坐标(x, y) 并且x1 ≤ x ≤ x2 和 y1 ≤ y ≤ y2(两个条件均要满足)的正六边形就会被涂上颜色。图中建立了正交坐标系,所以所有正六边形的一侧将会平行于Ox轴,每个整数x和每个整数y均是某个正六边形的中心坐标,保证(x2 - x1)能够整除2,保证每个正六边形的中心坐标均为整数。

如果觉得叙述不清楚的话,看图和输入输出吧。

皇上,臣妾尽力了

附上完整英文题目描述:

Developing tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.

A field map consists of hexagonal cells. Since locations sizes are going to be big, a game designer wants to have a tool for quick filling of a field part with identical enemy units. This action will look like following: a game designer will select a rectangular area on the map, and each cell whose center belongs to the selected rectangle will be filled with the enemy unit.

More formally, if a game designer selected cells having coordinates (x1, y1) and (x2, y2), where x1 ≤ x2 and y1 ≤ y2, then all cells having center coordinates (x, y) such that x1 ≤ x ≤ x2 and y1 ≤ y ≤ y2 will be filled. Orthogonal coordinates system is set up so that one of cell sides is parallel to OX axis, all hexagon centers have integer coordinates and for each integer x there are cells having center with such x coordinate and for each integer y there are cells having center with such y coordinate. It is guaranteed that difference x2 - x1 is divisible by 2.

Working on the problem Petya decided that before painting selected units he wants to output number of units that will be painted on the map.

Help him implement counting of these units before painting.

Input

输入只有一行,包含四个整数x1, y1, x2, y2 ( - 109 ≤ x1 ≤ x2 ≤ 109,  - 109 ≤ y1 ≤ y2 ≤ 109) — 表示两个正六边形的中心坐标

Output

输出只有一行,包含一个整数——表示有多少个正六边形将会被涂上颜色。

SampleInput
1 1 5 5
SampleOutput
13
Submit
题目统计信息详细
总AC数8
通过人数8
尝试人数9
总提交量12
AC率66.67%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: