B. Football Kit time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Consider a football tournament where n teams participate. Each team has two football kits: for home games, and for away games…
D. Prefixes and Suffixes You have a string s = s1s2...s|s|, where |s| is the length of string s, and si its i-th character. Let's introduce several definitions: A substring s[i..j] (1 ≤ i ≤ j ≤ |s|)…
D. Prefixes and Suffixes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have a string s = s1s2...s|s|, where |s| is the length of string s, and si its i-th character. Let's introduce s…