Distinct Values Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2298 Accepted Submission(s): 740 Problem Description Chiaki has an array of n positive integers. You are told some facts about…
给你一个数 n ( 2 <= n <= 109 ),现在需要你找到一对数a, b (a + b = n),并且使得LCM(a, b)尽可能的大,然后输出最大的 LCM(a, b). (为什么我每次看到题目都想去暴力..Orz 题外话) 这道题先对 n = 2 的情况进行判断,从输出可以知道 n = 2 的时候 ans = 1.接着对 n 进行分情况讨论.当 n = 2k + 1 的时候,ans = k * (k + 1). 当 n = 2k 的时候: 当 k 为偶数的时候 ans…
Turn the pokers Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1064 Accepted Submission(s): 398 Problem Description During summer vacation,Alice stay at home for a long time, with nothing to…
Naive Operations Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem Description In a galaxy far, far away, there are two integer sequence a and b of length…