Cerinta completa Given an array of integers, calculate the ratios of its elements that are , , and . Print the decimal value of each fraction on a new line with 6 places after the decimal. Note: This challenge introduces
Repair Roads
Cerinta completa The country of Byteland contains cities and bidirectional roads. There is a path between any two cities. The roads in Byteland were built long ago, and now they are in need of repair. You have been hired to
Palindrome Index
Cerinta completa Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome. There may be more than one solution, but any will do. If
Poker Nim
Cerinta completa Poker Nim is another -player game that’s a simple variation on a Nim game. The rules of the games are as follows: The game starts with piles of chips indexed from to . Each pile (where ) has
Ones and Twos
Cerinta completa You are using at most A number of 1s and at most B number of 2s. How many different evaluation results are possible when they are formed in an expression containing only addition + sign and multiplication *
Permuting Two Arrays
Cerinta completa There are two -element arrays of integers, and . Permute them into some and such that the relation holds for all where . There will be queries consisting of , , and . For each query, return YES
Play on benders
Cerinta completa General Iroh and Commandant Bumi are heading to the Republic City to stop a rebellion. But it’s quite a long travel, so in the meantime they have started discussing about possible attacking plans. Right now, they’re arguing about
Queen’s Attack II
Cerinta completa You will be given a square chess board with one queen and a number of obstacles placed on it. Determine how many squares the queen can attack. A queen is standing on an chessboard. The chess board’s rows
Palindromic Border
Cerinta completa A border of a string is a proper prefix of it that is also a suffix. For example: a and abra are borders of abracadabra, kan and kankan are borders of kankankan. de is a border of decode.
Nimble Game
Cerinta completa Two people are playing Nimble! The rules of the game are: The game is played on a line of squares, indexed from to . Each square (where ) contains coins. For example: The players move in alternating turns.
