# Yuki 550 夏休みの思い出（１）

Problem Description: Solve f(x) = x * x * x + A * x * x + B * x + C, given A, B, and C. Output the solutions in increasing order.Constraints: -1e18 -1e9 It is guaranteed that there are exactly 3 distinct solutionsSolution: pekempey showed …

# Yuki 626 Randomized 01 Knapsack

Problem Description: 0/1 Knapsack problem. Test cases are generated at complete randomness.Constraints: 2 ≤ N ≤ 5000 v[i], w[i] is uniformly distributed in range [1, 1e12] 1 ≤ W ≤ 1e12 * NSolution: Branch and Bound. Referenced kimiyuki's b…

# CFR 525 E. Anya and Cubes ( Search )

Problem - E - Codeforces題意： 給 N 個數字的數列 A[]。你可以選至多 K 個數字，將它們變成自己的階乘，這個操作對同一個元素只能使用一次。問有幾種方法可以得到一個子集合，其總和恰為 S。兩種方法相同若且唯若集合相同且施加的操作相同。資料規模： The…

# CFR 285 D. Permutation Sum ( Meet in the Middle, Search )

Problem - D - Codeforces題意： 問有多少 A, B, C 數列的組合，使得 ( A[ i ] + B[ i ] ) % N = C[ i ]，且 A, B, C 都是 [ 0, N ) 的排列。資料規模： The single line contains integer n (1 ≤ n ≤ 16). TL: 1500 ms ML: 256 MB解法： 有用到這題的結論，…

# IOICJ 57 LCM Problem ( Math, Search )

Problem Description: Given N, you want to know max{ LCM(x,y,z), 1≤x,y,z≤N }.Constraints: 1≤T≤1000 1≤n≤1e6Sample Input: 3 7 9 100Sample Output: 210 504 960300Solution: It is obvious that we would like some of the largest x, y, z, such that …