Educational Codeforces Round 116 ABCE Solutions (Java/C++)
A. AB Balance Solution: Obviously, if the beginning and ending letters are the same letter, AB(s) must be equal to BA(s). Code: Java C++…
A. AB Balance Solution: Obviously, if the beginning and ending letters are the same letter, AB(s) must be equal to BA(s). Code: Java C++…
Solution: Based on the size of the data, we can almost infer that the final complexity should be $n\cdot x$.…
A. Two Subsequences Solution: Obviously the string a will only have one letter. We only need to find the smallest letter in the original string. Code: Java C++…
Solution: First of all, because after reaching 0, there will be no slip. Therefore, we consider slip as part of the ability to jump.…
A. Luntik and Concerts It's easy to guess the result: just look at the parity of the total time. But the proof of this topic is still a bit interesting.…
Solution: Let's take k=3, n=10 as an example, consider the choice of [l1, r1], consider the following two choices: [4, 6] and [3, 5].…
Solution: Let me show the conclusion first. The conclusion is that if the total time is an even number, output 0, otherwise output 1.…
A. Elections Solution: Calculate the difference between the maximum number of votes of the other two people and add one. Code: Java C++…