Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago, 1 Day Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 17 Sep 2017 My Price 7.00

stones in a round configuration.

There are 6 piles of stones in a round configuration. In a single move, a player selects 3 consecutive piles, and removes some stones from 1 or more of these piles. (at least 1 stone must be removed from at least 1 pile).

 

A player loses if he can’t make any more moves in the current position. (equivalently, there do not exist any piles with non-zero amount of stones)

 

Given a starting position, output whether it is a winning or a losing position for the first player.

 

The game is a two players game and they play alternatively.

 

Note that even if a pile becomes empty, it still exists in the game as an empty pile. When selecting consecutive piles, one of them maybe an empty pile.

 

Input

 

6 space separated integers on a line containing the initial number of stones in each pile. The last pile rounds over to the first.

 

Output

 

“Winning“ (without quotes), if winning position

 

“Losing” (without quotes), if losing position

 

(take care of the Case)

 

Constraints

 

0 = Number of stones in each pile = 10^6

 

Example

Input: 1 0 0 0 0 0 Output: Winning Input: 1 0 0 1 0 0 Output: Losing

Answers

(5)
Status NEW Posted 17 Sep 2017 12:09 PM My Price 7.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)