[old] Card Game

[old] Card Game

It seems that the Hypercube affects this place in a very strange way - for example, it’s not letting the two spirits of treasure hunters to rest in peace until they figure out who between the two of them is a winner of some weird game. Hm, what would've happened if you’d refused to finish an already started game?..

Nevertheless, you’ve had neither the time nor the inclination to think about that and you went further. In less than a few minutes you saw something you’d rather not see - a real god damn ghost! Judging by the similarity between the ghost and the portrait of a man hanging in a recently visited room, it’s safe to assume that this is the Lord Escher himself. It has become increasingly clear why none of the treasure hunters returned from the island for so many years. There’s no going back now, so it seems like you’ll have to come to an agreement with him one way or the other.

"Only the one who can tell the truth from a lie will pass!". These were the first words the ghost said, when he saw you. He pointed to a lying on the floor set of double-sided cards which had the numbers written on them. Maybe these cards also belonged to one of the previous visitors of the castle, and then Lord Escher just decided to use them as a tryout for the seekers? Well, it doesn’t matter now. In order to pass you need to determine whether among the several first cards there are the ones that doesn’t belong.

In this mission will be used a special deck of double-sided cards which had the numbers written on them - one number per one side of the card. The numbers on the cards are written according to the following principle: the first card has 0 and 1, the second - 1 and 2, ..., the n-th - (n-1) and n. The cards in this set...

As input your function receives the total number of cards and a list of numbers which have been seen on the alternately taken N cards, noting that you are looking only at the front side of the card. Your task is to determine whether the cards that you’ve seen are a part of this set or the cards from some other deck have accidentally got mixed up. Depending on the answer, return True (if all the viewed cards can be encountered only within one deck) or False (if otherwise).

You should be an authorized user in order to see the full description and start solving this mission.
Settings
Code:
Other:
Invalid hot key. Each hot key should be unique and valid
Hot keys:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=js config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

Pair Programming (Beta-version)

Welcome to Pair Programming! Engage in real-time collaboration on coding projects by starting a session and sharing the provided unique URL with friends or colleagues. This feature is perfect for joint project development, debugging, or learning new skills together. Simply click 'Start Session' to begin your collaborative coding journey!

Waiting for Pair Programming to start...

You are trying to join a pair programming session that has not started yet.

Please wait for the session creator to join.

Waiting for Pair Programming to reconnect...

It looks like the creator of the pair programming session closed the editor window.

It might happen accidentally, so that you can wait for reconnection.

×
 
 
<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in a moment
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission