Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Interview

a guest Mar 31st, 2020 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. There is a book with N pages (indexed from 1 to N). Each page has a certain number of words.
  2. Now play a game with a player machine. Every time you send a message to it, the message contains the information "the sum of words in pages from i to j (1 <= i <= j <= N) is odd or even". The player can save this information and check whether the coming message has conflict with the information from ALL the previous messages. If so, return false and the game ends. If there is no conflict, save this information and return true.
  3.  
  4. Example:
  5.   Game one:
  6.      [3, 5, odd] -> true
  7.      [6, 8, even] -> true
  8.      [3, 8, even] -> false
  9.   Game Two:
  10.      [2, 10, odd] -> true
  11.      [8, 14, even] -> true
  12.      [2, 14, even] -> true
  13.      [8, 10, even] -> false
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top