上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 97 下一页
摘要: 【概述】 集合,是集合论中主要研究对象,是指具有某种特定性质的具体的或抽象的对象汇总而成的集体,其中,构成集合的这些对象则称为该集合的元素。 集合中元素的数目称为集合的基数,集合 A 的基数记作:card(A),当其为有限大时,集合 A 称为有限集,反之则为无... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(544) 评论(0) 推荐(0)
摘要: Problem Description One day Petya got a birthday present from his mom: a book called "The Legends and Myths of Graph Theory". F... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(87) 评论(0) 推荐(0)
摘要: Problem Description General Payne has a battalion of n soldiers. The soldiers' beauty contest is coming up, it will last for k ... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(35) 评论(0) 推荐(0)
摘要: Problem Description You've got an undirected graph, consisting of n vertices and m edges. We will consider the graph's vertices... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(25) 评论(0) 推荐(0)
摘要: Problem Description Polycarpus has a sequence, consisting of n non-negative integers: a1, a2, ..., an. Let's define function f... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(16) 评论(0) 推荐(0)
摘要: 【概述】 在集合论中,子集是一个较常用的概念,当给出一个集合 {0,1,2,...,n-1} 时,常需要生成所有的子集。 生成子集有三种方法:增量构造法、位向量法、二进制法 其中,二进制法除了可以生成子集,还是一种集合的表示方法。 【子集生成算法】 1.增量构... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(683) 评论(0) 推荐(0)
摘要: 【概述】 桶排的思想是一种比较重要的技巧,在 由于桶排的特殊性,桶排仍需进行模拟装桶的过程,而且有时由于数据范围无法开很大的数组,需要使用 map 与其结合 关于桶排:点击这里 【例题】 Romaji(CF-1008A):点击这里明明的随机数(洛谷-P1059... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(42) 评论(0) 推荐(0)
摘要: 【概述】 找规律是一种常见的题型,当给出相关数据后,我们往往可以利用打表的方法,得到大量的数据,然后再寻找规律。 简单来说,打表就是需要对某个范围内的数据进行判断,判断它是否符合某种条件,然后在接下来的很多次数据中,可能会反复使用到这些判断的结果,为了减少重复... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(448) 评论(0) 推荐(0)
摘要: 【概述】 无根树转有根树是指:当给出 n 个结点与 n-1 条边后,给定一个要指定的根结点的编号 root,建立以 root 为根的树。 利用 STL 中的 vector,在输入 n-1 条边后,从 root 开始进行 dfs,遍历其邻接点,递归的将其转换为子... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(109) 评论(0) 推荐(0)
摘要: Problem Description We have N (N ≤ 10000) objects, and wish to classify them into several groups by judgement of their resembla... 阅读全文
posted @ 2022-09-20 22:52 老程序员111 阅读(8) 评论(0) 推荐(0)
上一页 1 ··· 73 74 75 76 77 78 79 80 81 ··· 97 下一页