摘要:
Problem Description K国是一个热衷三角形的国度,连人的交往也只喜欢三角原则.他们认为三角关系:即AB相互认识,BC相互认识,CA 相互认识,是简洁高效的.为了巩固三角关系,K国禁止四边关系,五边关系等等的存在.所谓N边关系,是指N个人... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(23)
评论(0)
推荐(0)
摘要:
Problem Description In a highly modernized fishing village, inhabitants there make a living on fishery. Their major tools, fish... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(18)
评论(0)
推荐(0)
摘要:
Problem Description In a highly modernized fishing village, inhabitants there make a living on fishery. Their major tools, fish... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(43)
评论(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
阅读(28)
评论(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
阅读(17)
评论(0)
推荐(0)
摘要:
【概述】 在集合论中,子集是一个较常用的概念,当给出一个集合 {0,1,2,...,n-1} 时,常需要生成所有的子集。 生成子集有三种方法:增量构造法、位向量法、二进制法 其中,二进制法除了可以生成子集,还是一种集合的表示方法。 【子集生成算法】 1.增量构... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(698)
评论(0)
推荐(0)
摘要:
【唯一分解定理】 对于任意一个大于 1 的正整数 n,都有且只有一种方式写出其素因子的乘积表达式。 即:,其中, 均为素数 因此,当给出一个数 n 时,可以暴力枚举,以获取 n 的素因子 map num;//记录素因子个数int factor[N],cntF;... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(162)
评论(0)
推荐(0)
摘要:
Problem Description Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and ... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(14)
评论(0)
推荐(0)
摘要:
Problem Description Stancu likes space travels but he is a poor software developer and will never be able to buy his own spacec... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(37)
评论(0)
推荐(0)
摘要:
题目描述 给出一个有理数 ,求c mod 19260817的值。 输入输出格式 输入格式: 一共两行。 第一行,一个整数a。 第二行,一个整数b。 对于所有数据,0≤a,b≤10^10001 输出格式: 一个整数,代表求余后的结果。如果无解... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(58)
评论(0)
推荐(0)

浙公网安备 33010602011771号