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 ...
Problem Description Give you a cube with a side length of n-1. Find the number of equilateral trian ...
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为偶数 ...
You have n gifts and you want to give all of them to children. Of course, you don't want to offend a ...
Codeforces Round #750 (Div. 2) A. Luntik and Concerts c要么为奇数要么为偶数,同时a和b都大于1,如果c为奇数的话拿出一个1一个2就可以把所有 ...