<cite id="nzhfv"><strike id="nzhfv"><thead id="nzhfv"></thead></strike></cite>
<ins id="nzhfv"><span id="nzhfv"><var id="nzhfv"></var></span></ins><cite id="nzhfv"></cite>
<cite id="nzhfv"><span id="nzhfv"></span></cite>
<ins id="nzhfv"></ins>
<cite id="nzhfv"><video id="nzhfv"></video></cite><cite id="nzhfv"><video id="nzhfv"><var id="nzhfv"></var></video></cite><ins id="nzhfv"><span id="nzhfv"><cite id="nzhfv"></cite></span></ins><ins id="nzhfv"><video id="nzhfv"><var id="nzhfv"></var></video></ins>
<var id="nzhfv"><video id="nzhfv"></video></var>
Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
取石子游戲
Time Limit: 1000MSMemory Limit: 10000K
Total Submissions: 50154Accepted: 17169

Description

有兩堆石子,數量任意,可以不同。游戲開始由兩個人輪流取石子。游戲規定,每次有兩種不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在兩堆中同時取走相同數量的石子。最后把石子全部取完者為勝者?,F在給出初始的兩堆石子的數目,如果輪到你先取,假設雙方都采取最好的策略,問最后你是勝者還是敗者。

Input

輸入包含若干行,表示若干種石子的初始情況,其中每一行包含兩個非負整數a和b,表示兩堆石子的數目,a和b都不大于1,000,000,000。

Output

輸出對應也有若干行,每行包含一個數字1或0,如果最后你是勝者,則為1,反之,則為0。

Sample Input

2 1
8 4
4 7

Sample Output

0
1
0

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator

国语自产拍在线视频中文,国语自产拍在线观看学生,国语自产精品视频在线视频
<cite id="nzhfv"><strike id="nzhfv"><thead id="nzhfv"></thead></strike></cite>
<ins id="nzhfv"><span id="nzhfv"><var id="nzhfv"></var></span></ins><cite id="nzhfv"></cite>
<cite id="nzhfv"><span id="nzhfv"></span></cite>
<ins id="nzhfv"></ins>
<cite id="nzhfv"><video id="nzhfv"></video></cite><cite id="nzhfv"><video id="nzhfv"><var id="nzhfv"></var></video></cite><ins id="nzhfv"><span id="nzhfv"><cite id="nzhfv"></cite></span></ins><ins id="nzhfv"><video id="nzhfv"><var id="nzhfv"></var></video></ins>
<var id="nzhfv"><video id="nzhfv"></video></var>