摘要:
题目描述 You are given a rooted tree with root in vertex 1 1 1 . Each vertex is coloured in some colour. Let's call colour c c c dominating in the subtree 阅读全文
摘要:
Problem DescriptionGiven two positive integers a and b,find suitable X and Y to meet the conditions: X+Y=a Least Common Multiple (X, Y) =b InputInput 阅读全文
摘要:
SubsetTime Limit: 30000MS Memory Limit: 65536KTotal Submissions: 6754 Accepted: 1277DescriptionGiven a list of N integers with absolute values no larg 阅读全文
摘要:
Matrix Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 8674 Accepted: 2634 Description Given a N × N matrix A, whose element in the i-th ro 阅读全文
摘要:
题意翻译给定数组AAA 和值kkk ,你可以重排AAA 中的元素,使得∑i=1n−k∣Ai−Ai+k∣\displaystyle\sum_{i=1}^{n-k} |A_i-A_{i+k}|i=1∑n−k∣Ai−Ai+k∣ 最小。输出最小值。题目描述You've got array A A A 阅读全文