链接: https://codeforces.com/contest/1278/problem/D 题意: As the name of the task implies, you are asked to do some work with segments and trees. Recall that a tree is a connected undirected graph such that there is exactly one simple path between every…
链接: https://codeforces.com/contest/1278/problem/C 题意: Karlsson has recently discovered a huge stock of berry jam jars in the basement of the house. More specifically, there were 2n jars of strawberry and blueberry jam. All the 2n jars are arranged in…
链接: https://codeforces.com/contest/1278/problem/B 题意: You are given two integers a and b. You can perform a sequence of operations: during the first operation you choose one of these numbers and increase it by 1; during the second operation you choos…
链接: https://codeforces.com/contest/1278/problem/A 题意: Polycarp has built his own web service. Being a modern web service it includes login feature. And that always implies password security problems. Polycarp decided to store the hash of the password…
A. Johny Likes Numbers time limit per test 0.5 seconds memory limit per test 256 megabytes input standard input output standard output Johny likes numbers n and k very much. Now Johny wants to find the smallest integer x greater than n, so it is divi…