题目描述: Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jzzhu is the president of country A. There are n cities numbered from 1 to n in his country. City 1 is the capital of…
题目描述: A Simple Task time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Given a simple graph, output the number of simple cycles in it. A simple cycle is a cycle with no repeated vertices or…
Blake is a CEO of a large company called "Blake Technologies". He loves his company very much and he thinks that his company should be the best. That is why every candidate needs to pass through the interview that consists of the following probl…
Description While dad was at work, a little girl Tanya decided to play with dad characters. She has written all the possible n three-letter continuous substrings of the password on pieces of paper, one for each piece of paper, and threw the password…
D2. Kirk and a Binary String (hard version) time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The only difference between easy and hard versions is the length of the string. You can hack this pro…
You are given an array a consisting of n integers, and additionally an integer m. You have to choose some sequence of indices \(b_1, b_2, ..., b_k (1 ≤ b_1 < b_2 < ... < b_k ≤ n)\) in such a way that the value of \(\sum^{k}_{i=1}a_{b_i}\) is maxi…