Plus Minus

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 *

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

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.