impossible

Candy Distribution

百般思念 提交于 2019-11-27 08:43:13
Kids like candies, so much that they start beating each other if the candies are not fairly distributed. So on your next party, you better start thinking before you buy the candies. If there are K K kids, we of course need K ⋅ X K⋅X candies for a fair distribution, where X X is a positive natural number. But we learned that always at least one kid looses one candy, so better be prepared with exactly one spare candy, resulting in ( K ⋅ X ) + 1 (K⋅X)+1 candies. Usually, the candies are packed into bags with a fixed number of candies C C. We will buy some of these bags so that the above

C - Ekka Dokka

让人想犯罪 __ 提交于 2019-11-27 03:57:40
Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's why they want to share the cake after buying it. As the name suggested that Ekka is very fond of odd numbers and Dokka is very fond of even numbers, they want to divide the cake such that Ekka gets a share of N square centimeters and Dokka gets a share of M square centimeters where N is odd and M is even. Both N and M are positive integers. They want to divide the cake such that N * M = W , where W is the dashing factor set by them. Now you know their dashing factor, you have to find whether they can buy the

Equidistant String (周赛2)

被刻印的时光 ゝ 提交于 2019-11-27 03:33:37
Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n , that the distance from p to s was equal to the distance from p to t . It's time for Susie to

Codeforces Round #303 Equidistant String

爷,独闯天下 提交于 2019-11-27 03:33:20
Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n , that the distance from p to s was equal to the distance from p to t . It's time for Susie to

CodeForces - 545B Equidistant String 构造

﹥>﹥吖頭↗ 提交于 2019-11-27 03:32:51
题目链接: 点击查看 Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n , that the distance from p to s was equal to the distance from p to t . It's time for

周赛-Equidistant String

只愿长相守 提交于 2019-11-27 03:32:21
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i, such that si isn’t equal to ti. As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of

Codeforces Round #303 (Div.2)-B. Equidistant String(模拟)

╄→гoц情女王★ 提交于 2019-11-27 03:31:58
B. Equidistant String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of

CodeForces 545B Equidistant String

回眸只為那壹抹淺笑 提交于 2019-11-27 03:31:12
http://codeforces.com/problemset/problem/545/B Equidistant String Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n , that the distance from p to

B. Equidistant String

谁都会走 提交于 2019-11-27 03:30:46
B. Equidistant String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i , such that s i isn't equal to t i . As besides everything else Susie loves symmetry, she wants to find for two strings s and t of

Equidistant String

僤鯓⒐⒋嵵緔 提交于 2019-11-27 03:27:01
Problem:Equidistant String Description: Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance: We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i, such that si isn’t equal to ti. As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n, that the distance from p to s was equal to the distance