摘要:
http://codeforces.com/problemset/problem/848/A 题目大意:刚开始集合里面都是单字符可认为是字符串,然后让你去合并任意两个串合并要消耗∑c=(a~z) f ( s , c ) * f ( t , c ) 的能量,其中 f ( s , c )表示字符串s中单 阅读全文
摘要:
To stay woke and attentive during classes, Karen needs some coffee! Karen, a coffee aficionado, wants to know the optimal temperature for brewing the 阅读全文
摘要:
You are given a sequence a1, a2, ..., an consisting of different integers. It is required to split this sequence into the maximum number of subsequenc 阅读全文
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=6069 题目大意:求 i 从 l 到 r 中 i 的k次方的因子数之和。 解题思路:我们可以知道一个数有因子,则这个数的因子一定是若干个质数因子排列组合得到的。我们首先要得到10^6中的素数,然后它的因子数量是 相 阅读全文
摘要:
Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
摘要:
D. The Bakery time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output Some time ago Slastyona 阅读全文
摘要:
E-pang Palace was built in Qin dynasty by Emperor Qin Shihuang in Xianyang, Shanxi Province. It was the largest palace ever built by human. It was so 阅读全文
摘要:
Dear Liao I never forget the moment I met with you. You carefully asked me: "I have a very difficult problem. Can you teach me?". I replied with a smi 阅读全文
摘要:
Function Fx,yFx,ysatisfies: For given integers N and M,calculate Fm,1Fm,1 modulo 1e9+7. InputThere is one integer T in the first line. The next T line 阅读全文
摘要:
sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with mm coming cont 阅读全文
摘要:
Talented Mr.Tang has nn strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ra 阅读全文
摘要:
Let’s play a game.We add numbers 1,2...n in increasing order from 1 and put them into some sets. When we add i,we must create a new set, and put iinto 阅读全文
摘要:
Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows: (0|9|7) (5|6) (2) (4|5) Above regular 阅读全文
摘要:
Problem Description Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, 阅读全文