Suppose you have two points 𝑝=(𝑥𝑝,𝑦𝑝)p=(xp,yp) and 𝑞=(𝑥𝑞,𝑦𝑞)q=(xq,yq). Let's denote the Ma ...
Suppose you have two points 𝑝=(𝑥𝑝,𝑦𝑝)p=(xp,yp) and 𝑞=(𝑥𝑞,𝑦𝑞)q=(xq,yq). Let's denote the Ma ...
You have r red and b blue beans. You'd like to distribute them among several (maybe, one) packets in ...
A. Era 维护一个新数组的末尾位置变量pos,遍历的时候不断更新即可。 B. XOR Specia-LIS-t 注意到长度为1的序列也满足单调递增的条件(虽然比较特殊),所以如果n为偶数 ...
There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0)">(0,0) ...
You have n gifts and you want to give all of them to children. Of course, you don't want to offend a ...
Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explore ...
Codeforces Round #750 (Div. 2) A. Luntik and Concerts c要么为奇数要么为偶数,同时a和b都大于1,如果c为奇数的话拿出一个1一个2就可以把所有 ...
You are given the array aa a consisting of n positive (greater than zero) integers. In one move, yo ...