GT and set Accepts: 35 Submissions: 194 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) 问题描述 有NN个集合,每个集合中有A_iAi个数. 你要将这NN个集合划成LL个部分,使得每个部分的集合至少有一个共有的数. 如果至少有一个解输出YESYES,否则输出NONO 输入描述 第一行一个数T表示数据组数.(TT\leq≤2020)…
zxa and leaf Problem Description zxa have an unrooted tree with n nodes, including (n−1) undirected edges, whose nodes are numbered from 1 to n. The degree of each node is defined as the number of the edges connected to it, and each node whose degree…
传送门 GTY's gay friends Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 264 Accepted Submission(s): 57 Problem Description GTY has n gay friends. To manage them conveniently, every morning he o…
Problem Description You are given two numbers NNN and MMM. Every step you can get a new NNN in the way that multiply NNN by a factor of NNN. Work out how many steps can NNN be equal to MMM at least. If N can't be to M forever,print −1-1−1. Input In t…
Problem Description You are given a sequence of NNN integers. You should choose some numbers(at least one),and make the product of them as big as possible. It guaranteed that the absolute value of any product of the numbers you choose in the initial…