Codeforces 17E Palisection E. Palisection In an English class Nick had nothing to do at all, and remembered about wonderful strings called palindromes. We should remind you that a string is called a palindrome if it can be read the same way both from…
The value of a string s is equal to the number of different letters which appear in this string. Your task is to calculate the total value of all the palindrome substring. Input The input consists of a single ≤∣s∣≤×^ ). The string s only contains low…
A. k-rounding time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros i…
C. Journey time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other…
Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4345 Accepted Submission(s): 1791 Problem Description After an uphill battle, General Li won a great victory. Now the head of state…
Harry and magic string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 576 Accepted Submission(s): 287 Problem Description Harry got a string T, he wanted to know the number of T’s disjoint p…
Codeforces 1012C Hills Welcome to Innopolis city. Throughout the whole year, Innopolis citizens suffer from everlasting city construction. From the window in your room, you see the sequence of n hills, where i-th of them has height ai. The Innopolis…
Codeforces 25E Test E. Test Sometimes it is hard to prepare tests for programming problems. Now Bob is preparing tests to new problem about strings - input data to his problem is one string. Bob has 3 wrong solutions to this problem. The first gives…
E. Palisection time limit per test 2 seconds memory limit per test 128 megabytes input standard input output standard output In an English class Nick had nothing to do at all, and remembered about wonderful strings called palindromes. We should remin…