Chinese Chess Revised

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

(From <a href='http://golf.shinh.org/p.rb?Chinese+Chess'>original problem</a>)
<i>
A has a large chessboard. There is only a "bishop" on it. He wants to know if the bishop can jump from the starting point(x1, y1) to the ending point(x2, y2) using one jump.

The "bishop" moves like this: it can move from (x,y) to (x+2, y+2), (x-2, y+2), (x+2, y-2), (x-2, y-2).

Inputs four integers(x1, y1, x2, and y2) that represent the position of the starting point and the ending point.

If the "bishop" can jump from the starting point to the ending point using one jump, output "Yes", otherwise output "No".
</i>

-- Revision by 鳴神裁4.1号, posted 2021.08.16 20:32 UTC+9.

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

4 1 5 6
6 8 2 7
4 4 5 2
8 3 4 2
7 6 6 7
8 1 2 7
1 5 6 3
7 4 7 3
7 1 5 4
3 9 5 7
3 6 5 4
2 8 1 6
4 7 2 9
1 1 8 8
1 4 9 8
3 6 4 5
2 8 2 9
1 6 9 6
9 5 5 9
5 6 3 7

Sample output:

No
No
No
No
No
No
No
No
No
Yes
Yes
No
Yes
No
No
No
No
No
No
No

Sample input:_

9 9 9 8
7 7 5 5
1 2 2 4
3 3 6 2
7 2 3 8
7 8 9 6
3 8 3 7
4 6 2 1
4 8 4 8
8 5 6 7
7 6 9 2
8 9 2 5
5 7 9 4
4 4 5 8
4 5 6 2
9 7 7 5
7 6 8 6
9 9 6 7
9 4 6 5
3 6 5 8
9 3 7 4
7 4 4 1
3 9 3 6
9 7 7 6
5 5 5 5

Sample output:

No
Yes
No
No
No
Yes
No
No
No
Yes
No
No
No
No
No
Yes
No
No
No
Yes
No
No
No
No
No

Sample input:_

2 9 6 2
8 8 2 4
4 7 3 8
6 3 3 3
8 4 4 4
7 8 5 2
5 8 7 8
7 2 6 2
7 8 8 3
9 9 2 1
4 7 9 5
2 2 9 1
5 5 9 5
5 3 3 3
2 5 6 1
4 6 3 2
5 6 1 7
8 2 2 8
5 1 5 1
9 2 2 3
4 3 2 9
3 3 2 1
4 6 4 3
1 8 5 7
2 9 9 7
3 4 3 8
7 2 4 4
3 8 6 3
8 9 9 2
3 6 5 5
8 3 8 5
3 3 2 5
9 4 1 9
8 3 7 3
3 7 3 7
8 5 7 7
4 5 7 2
6 5 7 8
8 7 8 6
3 1 6 7
4 1 9 5
8 6 9 5
5 6 3 2
4 7 8 8
4 6 4 5
8 5 3 9
9 2 1 9
6 5 4 2
3 2 6 1
5 2 6 7
9 5 5 6
9 7 6 3
3 7 4 2
5 5 2 2
1 3 9 5
8 4 6 7
8 3 6 2
8 6 3 7
3 9 1 2
3 9 6 9
9 9 7 2
1 9 8 5
6 9 2 8
6 3 4 5
1 7 1 6
3 5 8 9
6 8 4 5
7 2 2 2
7 3 9 1
5 4 9 8
2 2 3 8
9 6 1 3
5 6 8 6
1 6 3 5
4 6 1 1
3 9 4 5
2 6 5 4
5 9 9 3
4 6 3 8
4 3 2 3
7 9 5 6
9 7 7 5
1 5 9 7
1 6 4 5
5 5 3 7
2 5 1 5
6 6 6 6
9 9 7 6
3 3 5 9
8 9 6 1
5 7 1 7
7 2 5 6
6 2 7 8
2 5 3 2
6 4 4 6
6 8 7 5
7 6 5 5
7 7 2 3
9 2 6 4
7 3 1 1

Sample output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1Dingledooper500.04932021/08/24 10:52:390B / 29B / 19B
2rotary-o570.05132021/08/24 21:45:430B / 28B / 26B
3shinh5303.02182021/09/02 11:14:230B / 344B / 27B

Ruby2 _

RankUserSizeTimeDateStatistics
1Dingledooper500.17492021/08/24 10:52:430B / 29B / 19B
2rotary-o570.17432021/08/24 21:44:480B / 28B / 26B

Perl _

RankUserSizeTimeDateStatistics
1tails430.04492021/08/27 15:04:100B / 25B / 17B
2teebee490.04492021/08/27 05:13:590B / 19B / 28B

Python _

RankUserSizeTimeDateStatistics
1xnor (Linus, kops)580.09332021/08/24 09:26:340B / 35B / 22B
2Dingledooper580.09142021/08/24 09:54:340B / 35B / 22B
3xnor600.09192021/08/24 09:15:010B / 37B / 22B
4Dingledooper (genuine)600.09252021/08/24 11:31:540B / 37B / 22B
5lynn640.09062021/08/23 22:38:480B / 40B / 23B

Python3 _

RankUserSizeTimeDateStatistics
1Dingledooper560.13302021/08/24 09:54:500B / 32B / 23B
2ovs560.12232021/08/24 17:19:410B / 32B / 23B
3xnor (Linus, kops)560.17262021/08/25 08:44:410B / 32B / 23B
4xnor620.14332021/08/23 06:45:020B / 38B / 23B
5lynn620.14952021/08/24 08:37:270B / 37B / 24B
6Fleur790.13432021/08/23 08:18:470B / 42B / 36B

SNOBOL _

RankUserSizeTimeDateStatistics
1鳴神裁4.1号1260.04912021/08/30 06:35:380B / 56B / 27B

J _

RankUserSizeTimeDateStatistics
1tails540.08222021/08/27 18:22:060B / 21B / 29B

C _

RankUserSizeTimeDateStatistics
1tails620.04092021/08/26 10:34:140B / 37B / 25B

Java _

RankUserSizeTimeDateStatistics
1rotary-o1770.21802021/08/21 20:04:130B / 117B / 55B

AWK _

RankUserSizeTimeDateStatistics
1Fleur300.04162021/08/20 09:27:150B / 12B / 18B
2tails300.04162021/08/20 15:39:160B / 12B / 18B
3鳴神裁4.1号300.04172021/08/29 22:12:060B / 12B / 18B
4McBusLuck310.04102021/08/22 03:31:560B / 12B / 19B

sed _

RankUserSizeTimeDateStatistics
1tails650.04152021/08/26 09:05:520B / 37B / 25B
2_780.04612021/08/30 23:50:490B / 31B / 40B

Bash _

RankUserSizeTimeDateStatistics
1Fleur360.01652021/08/21 10:07:010B / 15B / 20B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails530.07232021/08/24 10:11:490B / 22B / 24B
2McBusLuck630.43502021/08/20 19:37:180B / 26B / 34B

dc _

RankUserSizeTimeDateStatistics
1tails420.02802021/08/24 09:48:420B / 25B / 17B

gs2 _

RankUserSizeTimeDateStatistics
1tails190.26202021/08/20 16:40:106B / 12B / 1B

CLC-INTERCAL _

RankUserSizeTimeDateStatistics
1鳴神裁4.1号4690.90662021/09/14 11:40:082B / 309B / 158B

Lazy-K _

RankUserSizeTimeDateStatistics
1tails7120.05352021/08/20 17:09:200B / 384B / 328B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o865.27812021/08/22 12:06:500B / 53B / 31B

Language Ranking_

RankLangUserSizeScore
1gs2tails1910000
2AWKFleur306333
3BashFleur365277
4dctails424523
5Perltails434418
6RubyDingledooper503800
7Ruby2Dingledooper503800
8Bash (builtins)tails533584
9Jtails543518
10Python3Dingledooper563392
11Pythonxnor (Linus, kops)583275
12Ctails623064
13sedtails652923
14Scalarotary-o862209
15SNOBOL鳴神裁4.1号1261507
16Javarotary-o1771073
17CLC-INTERCAL鳴神裁4.1号469405
18Lazy-Ktails712266

return to the top page