摘要:
题目描述 给定一棵n个节点的树,并且根节点的编号为p,第i个节点有属性值vali, 定义F(i): 在以i为根的子树中,属性值是vali的合约数的节点个数。y 是 x 的合约数是指 y 是合数且 y 是 x 的约数。小埃想知道对1000000007取模后的结果. 输入描述: 输入测试组数T,每组数据 阅读全文
摘要:
E. Short Code time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Short Code time limit pe 阅读全文
摘要:
B. Destruction of a Tree time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Destruction o 阅读全文
摘要:
F. Machine Learning time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output F. Machine Learning 阅读全文
摘要:
H. Queries for Number of Palindromes time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output H. 阅读全文
摘要:
F. Cutlet time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Arkady wants to have a dinner. 阅读全文
摘要:
B. A Leapfrog in the Array time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output B. A Leapfrog 阅读全文