codeforces 603 A】的更多相关文章

[Codeforces]1263A Sweet Problem [Codeforces]1263B PIN Code [Codeforces]1263C Everyone is a Winner! [Codeforces]1263D Secret Passwords [Codeforces]1263E Editor…
题目大意:给你一个0,1串, 你可以反转一段连续的区间,问你最长的合法子串是多长, 合法字串相邻的两个不能相同. 思路:dp[ i ][ k ][ j ] 表示到第 i 个字符, 处于k这种状态, k = 0 表示 没有开始反转 k = 1 表示在反转的过程中, k = 2 表示反转结束, 最后一个字符为 j 的最大子序列. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #defi…
前言 之前做题都没有感觉,慢慢出去比赛后,打Codeforces,看别的人博客,知乎上的讨论,慢慢的对算法有一些自己的思考.特写是最近看知乎上别人说的Dijkstra利用水流去理解,LCA的学习,感觉自己原来还只是浮在表面的感觉,就是没有真的能做到深入思考,快速理解这些.无论什么算法,如果你能通俗易懂的让别人理解这个,才说明你真正理解了,这里面还有很大一段路要走,但是走着走着有些东西感觉比以前清晰了很多.而且我的博客已经很久没更新了,说明真的没有在用心搞,总是想着要怎么去学,不如每周打场比赛,把…
Codeforces Round #603 (Div. 2) A. Sweet Problem A. Sweet Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have three piles of candies: red, green and blue candies: the first pile…
E. Editor The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor consists of a line with infinite length and cursor, which points to the current character. Please note that…
D. Secret Passwords One unknown hacker wants to get the admin's password of AtForces testing system, to get problems from the next contest. To achieve that, he sneaked into the administrator's office and stole a piece of paper with a list of n passwo…
链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor consists of a line with infinite length and cursor, which point…
链接: https://codeforces.com/contest/1263/problem/D 题意: One unknown hacker wants to get the admin's password of AtForces testing system, to get problems from the next contest. To achieve that, he sneaked into the administrator's office and stole a piec…
链接: https://codeforces.com/contest/1263/problem/C 题意: On the well-known testing system MathForces, a draw of n rating units is arranged. The rating will be distributed according to the following algorithm: if k participants take part in this event, t…
链接: https://codeforces.com/contest/1263/problem/B 题意: A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN code can begin with any digit, even with 0. Polycarp has n (…