摘要: 题目链接 题目 Find the smallest possible sum of the digits in the decimal notation of a positive multiple of K. 给定一个整数K.求一个K的整数倍SUM,使得SUM的数位累加和最小 思路 考虑翻倍。 如 阅读全文
posted @ 2022-01-24 15:23 zhangtingxi 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目 You are given a rooted tree with n n n vertices, the root of the tree is the vertex 1 1 1 . Each vertex has some non-negative price. A leaf of 阅读全文
posted @ 2022-01-24 14:13 zhangtingxi 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题目 魔术师的桌子上有 \(n\) 个杯子排成一行,编号为 \(1,2,…,n\),其中某些杯子底下藏有一个小球,如果你准确地猜出是哪些杯子,你就可以获得奖品。 花费 \(c_{ij}\) 元,魔术师就会告诉你杯子 \(i,i+1,…,j\) 底下藏有球的总数的奇偶性。 采取最优的询问策略 阅读全文
posted @ 2022-01-24 13:05 zhangtingxi 阅读(61) 评论(0) 推荐(0) 编辑