Direct Connections

Cerinta completa Enter-View is a linear, street-like country. By linear, we mean all the cities of the country are placed on a single straight line – the -axis. Thus every city’s position can be defined by a single coordinate, ,

Vertical Paths

Cerinta completa You have a rooted tree with vertices numbered from through where the root is vertex . You are given triplets, the triplet is denoted by three integers . The triplet represents a simple path in the tree with

Xor and Sum

Cerinta completa You are given two positive integers and in binary representation. You should find the following sum modulo : where operation means exclusive OR operation, operation means binary shift to the left. Please note, that we consider ideal model

Vertical Rooks

Cerinta completa HackerChess is a variant of chess played at HackerRank. It is a game played between two players who make moves in turns until one of them cannot make any move. The player who cannot make a move loses

Unfair Game

Cerinta completa You are playing a game of Nim with a friend. The rules are are follows: 1) Initially, there are N piles of stones. Two players play alternately. 2) In each turn, a player can choose one non empty

Two Strings

Cerinta completa Given two strings, determine if they share a common substring. A substring may be as small as one character. Example These share the common substring . These do not share a substring. Function Description Complete the function twoStrings

Tripartite Matching

Cerinta completa You are given unweighted, undirected graphs, , , and , with vertices each, where the graph has edges and the vertices in each graph are numbered from through . Find the number of ordered triples , where ,