B. Divisiblity of Differences time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output You are given a multiset of n integers. You should select exactly k of them in a such way that the difference b…
B. Divisiblity of Differences You are given a multiset of n integers. You should select exactly k of them in a such way that the difference between any two of them is divisible by m, or tell that it is impossible. Numbers can be repeated in the origi…
B. Divisiblity of Differences time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output You are given a multiset of n integers. You should select exactly k of them in a such way that the difference b…
B. Divisiblity of Differencestime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a multiset of n integers. You should select exactly k of them in a such way that the difference between an…
D. Palindrome Degree 题目连接: http://www.codeforces.com/contest/7/problem/D Description String s of length n is called k-palindrome, if it is a palindrome itself, and its prefix and suffix of length are (k - 1)-palindromes. By definition, any string (ev…