摘要:
C++ stdlower_bound and stdset::lower_bound 在set中使用stdlower_bound发现非常耗时,而使用stdsetlower_bound发现速度明显提升。 该文章解释说明了这两个的区别,在set中使用stdset::lower_bound才是最好的选择。 阅读全文
摘要:
若两个数$n,m$相乘,不允许使用$*$运算符. 我们发现$n*m$的性质类似于快速幂$n^m$的性质,故可以使用快速幂加速。` int n_mul_m(int n, int m) { int ans = 0; while(m) { if(m&1) ans += n; n += n; m >>= 1 阅读全文
摘要:
A - ReLU def main(): x = int(input()) print(x if x >= 0 else 0) if __name__ = "__main__": main() B - Billiards def main(): a,b,c,d = map(int,input().s 阅读全文