摘要:
D - Black and White Tree Time limit : 2sec / Memory limit : 256MB Score : 900 points Problem Statement There is a tree with N vertices numbered 1 thro 阅读全文
摘要:
Discription You are given an undirected graph consisting of n vertices and edges. Instead of giving you the edges that exist in the graph, we give you 阅读全文
摘要:
题目描述 Let's denote a function You are given an array aa consisting of nn integers. You have to calculate the sum of d(a_{i},a_{j})d(ai,aj) over all p 阅读全文
摘要:
Discipntion Let's call an array a of size n coprime iff gcd(a1, a2, ..., an) = 1, where gcd is the greatest common divisor of the arguments. You are g 阅读全文
摘要:
Discription The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform operations on numbers. 阅读全文