codeforces Round #259(div2) E解决报告】的更多相关文章

E. Little Pony and Summer Sun Celebration time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Twilight Sparkle learnt that the evil Nightmare Moon would return during the upcoming Summer Sun Ce…
D. Little Pony and Harmony Chest time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Princess Twilight went to Celestia and Luna's old castle to research the chest from the Elements of Harmony…
D. A Lot of Games time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrew, Fedor and Alex are inventive guys. Now they invent the game with strings for two players. Given a group of n non-em…
C. Little Pony and Expected Maximum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept…
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 equal characters, the resulting string is palindrome. F…
数学题. 关键是求最大值为k时有多少种情况,结果是kn-(k-1)n-1.可以这么想:每一次都从1至k里选,共kn种,这里需要再减去每一次都从1至k-1里面选的情况.当然也可以分类计数法:按出现几次k来分类,然后逆着用一下二项式定理得出结论. 整个的期望是Σk(kn-(k-1)n-1)/mn,其中k=1......n. 这里的技巧在于:由于n<=105,   kn显然会RE,那么就先把分母除上,每次算一个小于1的浮点数的n次方,肯定不会RE.C++中乘方用pow函数算是很快的. #include…
C. Predict Outcome of the Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n games in a football tournament. Three teams are participating in it. Currently k games had alread…
Codeforces Round#320 Div2 先做个标题党,骗骗访问量,结束后再来写咯. codeforces 579A Raising Bacteria codeforces 579B Finding Team Member codeforces 579C A Problem about Polyline codeforces 579D "Or" Game codeforces 579E Weakness and Poorness codeforces 579F LCS Aga…
Codeforces Round #539 div2 abstract I 离散化三连 sort(pos.begin(), pos.end()); pos.erase(unique(pos.begin(), pos.end()), pos.end());if (pos.size() == 0) pos.push_back(0);int id = lower_bound (pos.begin(), pos.end(), q[i].time) - pos.begin(); II java输入输出带模…
[第3站]Codeforces Round #512 Div2 第三题莫名卡半天……一堆细节没处理,改一个发现还有一个……然后就炸了,罚了一啪啦时间 Rating又掉了……但是没什么,比上一次好多了:) +传送门+ ◇ 简单总结 前两道题非常OK,秒掉还好.心态爆炸是从第三题开始的……一开始设计的判断方法没有考虑0,然后就错了很多次,然后改了过后又没有考虑整个数要分成2个及以上的数,继续WA,最后整个程序删了重新魔改了一次终于AC.感觉最后的AC代码的复杂度要比原来高一些,但是毕竟AC了,还是不…