The main city magazine offers its readers an opportunity to publish their ads. The format of the ad should be like this: There are space-separated non-empty words of lowercase and uppercase Latin letters. There are hyphen characters '-' in some words…
C. Maximal GCD time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a1, a2, ...…
C. Maximal GCD time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a1, a2, ...…
C. Maximal GCD time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given positive integer number n. You should create such strictly increasing sequence of k positive numbers a1, a2, ...…
B. Distances to Zero time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given the array of integer numbers a0, a1, ..., an - 1. For each element find the distance to the nearest zero…
A. Maximal Binary Matrix time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given matrix with n rows and n columns filled with zeroes. You should put k ones in it in such a way that th…
Description You are given the array of integer numbers a0, a1, ..., an - 1. For each element find the distance to the nearest zero (to the element which equals to zero). There is at least one zero element in the given array. Input The first line cont…