随笔分类 -  基本算法-枚举、模拟、递推

摘要:"C. Maximal Intersection" 【题目描述】 You are given $n$ segments on a number line; each endpoint of every segment has integer coordinates. Some segments ca 阅读全文
posted @ 2018-08-26 21:21 飞飞翔滴少年 阅读(202) 评论(0) 推荐(0)
摘要:【题目描述】 Elections are coming. You know the number of voters and the number of parties — n and m respectively. For each voter you know the party he is g 阅读全文
posted @ 2018-08-12 11:22 飞飞翔滴少年 阅读(349) 评论(0) 推荐(0)
摘要:【题目】 一个给定的正整数序列,在每个数之前都插入+号或-号后计算它们的和。所有结果中至少有一个可被整数k整除,我们则称此正整数序列可被k整除。 现判断一个正整数序列是否能被k整除。输入的第一行包含两个数:N(2 < N < 10000)和k(2 < k< 100),其中N代表一共有N个数,k代表被 阅读全文
posted @ 2018-07-17 11:22 飞飞翔滴少年 阅读(911) 评论(0) 推荐(0)