摘要:
It turns out that you are a great fan of rock band AC/PE. Peter learned that and started the following game: he plays the first song of the list of n 阅读全文
摘要:
E. Cannon time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output E. Cannon time limit per test 阅读全文
摘要:
The crowdedness of the discotheque would never stop our friends from having fun, but a bit more spaciousness won't hurt, will it? The discotheque can 阅读全文
摘要:
题目描述 为了得到书法大家的真传,小 E 同学下定决心去拜访住在魔法森林中的隐 士。魔法森林可以被看成一个包含 n 个节点 m 条边的无向图,节点标号为 1,2,3,…,n,边标号为 1,2,3,…,m。初始时小 E 同学在 1 号节点,隐士则住在 n 号节点。小 E 需要通过这一片魔法森林,才能够 阅读全文
摘要:
题目描述 一棵n个点的树,每个点的初始权值为1。对于这棵树有q个操作,每个操作为以下四种操作之一: + u v c:将u到v的路径上的点的权值都加上自然数c; - u1 v1 u2 v2:将树中原有的边(u1,v1)删除,加入一条新边(u2,v2),保证操作完之后仍然是一棵树; \* u v c:将 阅读全文