枚举
文章平均质量分 73
140625730
这个作者很懒,什么都没留下…
展开
-
CF156B - Suspects
CF156B - Suspects(枚举)As Sherlock Holmes was investigating a crime, he identified n suspects. He knows for sure that exactly one of them committed the crime. To find out which one did it, the detective lines up the suspects and numbered them from 1 to n. A原创 2021-03-25 13:41:41 · 144 阅读 · 0 评论 -
Maximum Value
Maximum Value(枚举剪枝+二分)You are given a sequence a consisting of n integers. Find the maximum possible value of (integer remainder of ai divided by aj), where 1 ≤ i, j ≤ n and ai ≥ aj.InputThe first line contains integer n — the length of the sequence (1原创 2021-03-14 22:55:03 · 279 阅读 · 0 评论 -
A - Mike and Children
A - Mike and Children(枚举)Mike decided to teach programming to children in an elementary school. He knows that it is not an easy task to interest children in that age to code. That is why he decided to give each child two sweets.Mike has n sweets with siz原创 2021-03-14 18:34:20 · 108 阅读 · 0 评论