Counting the Ways

Cerinta completa Little Walter likes playing with his toy scales. He has types of weights. The weight type has weight . There are infinitely many weights of each type. Recently, Walter defined a function, , denoting the number of different

Counting Valleys

Cerinta completa An avid hiker keeps meticulous records of their hikes. During the last hike that took exactly steps, for every step it was noted if it was an uphill, , or a downhill, step. Hikes always start and end

Count Strings

Cerinta completa A regular expression is used to describe a set of strings. For this problem the alphabet is limited to ‘a’ and ‘b’. We define to be a valid regular expression if: 1) is “” or ““. 2) is

Counting Road Networks

Cerinta completa Lukas is a Civil Engineer who loves designing road networks to connect cities numbered from to . He can build any number of bidirectional roads as long as the resultant network satisfies these constraints: It must be possible

Counting Sort 1

Cerinta completa Comparison Sorting Quicksort usually has a running time of , but is there an algorithm that can sort even faster? In general, this is not possible. Most sorting algorithms are comparison sorts, i.e. they sort a list just

Coprime Paths

Cerinta completa You are given an undirected, connected graph, , with nodes and edges where . Each node is initially assigned a value, , that has at most prime divisors. You must answer queries in the form u v. For

Count Scorecards

Cerinta completa In a tournament, players play against each other exactly once. Each game results in exactly one player winning. There are no ties. You have been given a scorecard containing the scores of each player at the end of