摘要:
CF Round 620 E "1 Trees and Queries" 题意:给你一颗树,进行$q$次查询,每次查询时在树上加一条边,然后问此时两点间的距离能否为一个特定的值$k$,(能反复经过同一个节点或同一条边)。 基本思路:加了一条边连接了x,y以后,a,b两点间的距离就有三种形式,即 $ 阅读全文
摘要:
Codeforces Round 615(Div.3) A. Collecting Coins 注意\(n\)可能不够用的情况。 C. Product of Three Numbers 枚举因数,看看能不能成。 D. MEX maximizing 根据贪心的思路我们可以发现答案一定是递增的,所以我们 阅读全文
摘要:
Codeforces Round 612 (Div. 2) C. Garland Vadim loves decorating the Christmas tree, so he got a beautiful garland as a present. It consists of n light 阅读全文
摘要:
codeforces Round 604 E. Beautiful Mirrors(期望DP) 链接: https://codeforces.com/contest/1265/problem/E 题意: Examples input output input output Note In the f 阅读全文