[题目链接] http://codeforces.com/contest/451/problem/D [算法] 合并后的字符串一定是形如"ababa","babab",ab交替出现的字符串 那么,判断一段是否为回文,只需判断首尾字符是否相等即可 [代码] #include<bits/stdc++.h> using namespace std; ; int i; long long ans1,ans2; char s[MAXN]; ][]; int mai…
[POJ 2777] Count Color(线段树区间更新与查询) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40949 Accepted: 12366 Description Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable. In total the table A…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the len…
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Peppa the Pig was walking and walked into the forest. What a strange coincidence! The forest has the shape of a rectangle, consisting of n rows…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are some beautiful girls in Arpa's land as mentioned before. Once Arpa came up with an obvious problem: Given an array and a number x, coun…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Professor GukiZ doesn't accept string as they are. He likes to swap some letters in string to obtain a new one. GukiZ has strings a, b, and c. H…