Two Strings Game

Cerinta completa Consider the following game for two players: There are two strings A and B. Initially, some strings A’ and B’ are written on the sheet of paper. A’ is always a substring of A and B’ is always

XOR Matrix

Cerinta completa Consider a zero-indexed matrix with rows and columns, where each row is filled gradually. Given the first row of the matrix, you can generate the elements in the subsequent rows using the following formula: Each row is generated

Tree Flow

Cerinta completa Recall that a tree is an undirected, connected acyclic graph. We have a weighted tree, , with vertices; let be the total sum of edge weights on the path between nodes and . Let’s consider all the matrices,

Viral Advertising

Cerinta completa HackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly people on social media. On the first day, half of those people (i.e., ) like the advertisement and

Super Reduced String

Cerinta completa Reduce a string of lowercase characters in range ascii[‘a’..’z’]by doing a series of operations. In each operation, select a pair of adjacent letters that match, and delete them. Delete as many characters as possible using this method and

Tower Breakers

Cerinta completa Two players are playing a game of Tower Breakers! Player always moves first, and both players always play optimally.The rules of the game are as follows: Initially there are towers. Each tower is of height . The players