Entries from 2016-12-30 to 1 day
Problem Statement You are given the s n, K, and v. Consider the following modular equation with n variables: (x[0] * x[1] * x[2] * ... * x[n-1]) mod K = v. How many solutions does it have? Formally, we want to find the number of sequences …
Problem Statement Any undirected graph can be decomposed into connected components. Two vertices u and v belong to the same connected component if we can travel from u to v by following a sequence of zero or more consecutive edges. The siz…