Two Substrings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings "AB" and…
[链接]:CF Examples inputCopy ((?)) outputCopy 4 inputCopy ??()?? outputCopy 7 说明 For the first sample testcase, the pretty substrings of s s are: "(?" which can be transformed to "()". "?)" which can be transformed to "()&…
Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....". Now we have another string p. Your job is to find…
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a…
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... 其实这个应该是昨天就写完的,不过没时间了,就留到了今天.. 地址:http://codeforces.com/contest/651/problem/A A. Joysticks time limit per test 1 second memory limit per test 256…
CF memsql Start[c]UP 2.0 A A. Golden System time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl got bored with binary, decimal and other integer based counting systems. Recently she dis…
CF memsql Start[c]UP 2.0 B B. Distributed Join time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl was asked to implement two table join operation for distributed database system, minim…
Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....". Now we have another string p. Your job is to find…
E. Sign on Fence time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Bizon the Champion has recently finished painting his wood fence. The fence consists of a sequence of n panels of 1 meter w…
Description String analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One interesting problem is to find how many substrings are repeated (at least twice) in a long string. In this proble…
Could not load file or assembly 'MySql.Data.CF, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047 I so…
Codeforces Round #258 (Div. 2) Count Good Substrings D. Count Good Substrings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output We call a string good, if after merging all the consecutive eq…
题目 Source http://acm.hust.edu.cn/vjudge/problem/19225 Description The Hamming distance between two strings of the same length is defined as the number of positions at which the corresponding characters are different. For example, the Hamming distance…
Freelancer's Dreams time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mikhail the Freelancer dreams of two things: to become a cool programmer and to buy a flat in Moscow. To become a cool p…