Nobles.
Nobles.
全部文章
题解
java(3)
微信小程序(3)
算法(11)
归档
标签
去牛客网
登录
/
注册
简单堆点杂物
在深渊挣扎中。
全部文章
/ 题解
(共19篇)
【题解】gcd——GCD Length
下面是题目复述: You are given three integers aaa, bbb and ccc. Find two positive integers xxx and yyy (x>0x > 0x>0, y>0y > 0y>0) such that:...
C++
gcd
2022-02-12
0
334
【题解】 Semi-prime H-numbers
下面是题目复述: This problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do onl...
C++
2022-02-12
0
234
【题解】筛法——Sum of Consecutive Prime Numbers
卡了半天竟然卡在输入上面了,,,我恨。非文件末尾不要用while(scanf)。 下面是题目复述: Some positive integers can be represented by a sum of one or more consecutive prime numbers. How man...
C++
2022-02-11
0
388
【题解】gcd——Happy 2006
初体验==死活找不到错误在哪儿。 下面是题目复述: Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1,...
C++
gcd
2022-02-10
0
393
【题解】约数——分解因数
大部分是数学知识+计算机思维。 下面是题目复述: 给出一个正整数a,要求分解成若干个正整数的乘积,即a = a1 * a2 * a3 * ... * an,并且1 < a1 <= a2 <= a3 <= ... <= an,问这样的分解的种数有多少。注意到a = a也是...
C++
2022-02-10
0
403
【题解】DFS——Average Length
下面是题目复述: Sample Input 1 3 0 0 1 0 0 1 Sample Output 1 2.2761423749 There are six paths to visit the towns: 1 → 2 → 3, 1 → 3 → 2, 2 → 1 → 3, 2 → 3 → 1...
C++
深度优先搜索
2022-01-29
0
244
【题解】Unique Bid Auction
暴力解题的暴力题解……我以为会超时,结果它放过了我…… 下面是题目描述: There is a game called "Unique Bid Auction". You can read more about it here: https://en.wikipedia.org/wiki/Uniqu...
C++
2022-01-29
0
361
【题解】Strange Functions
本题我是暴力做的……就没有算法分类了。 下面是题目复述: Let's define a function f(x) (x is a positive integer) as follows: write all digits of the decimal representation of x ba...
2022-01-29
0
286
【题解】DFS——7-7 小朋友崇拜圈-第九届蓝桥省赛-C组
班里 N 个小朋友,每个人都有自己最崇拜的一个小朋友(也可以是自己)。 在一个游戏中,需要小朋友坐一个圈,每个小朋友都有自己最崇拜的小朋友在他的右手边。 求满足条件的圈最大多少人? 小朋友编号为 1,2,3,…N。 输入格式: 第一行,一个整数 N。 3<N<10^5 接下来一行 N ...
C++
深度优先搜索
2022-01-23
0
462
【题解】完全二叉树的权值-第十届蓝桥省赛-B组
给定一棵包含 N 个节点的完全二叉树,树上每个节点都有一个权值,按从上到下、从左到右的顺序依次是 A1,A2,⋅⋅⋅AN,如下图所示: 现在小明要把相同深度的节点的权值加在一起,他想知道哪个深度的节点权值之和最大? 如果有多个深度的权值和同为最大,请你输出其中最小的深度。 注:根的深度是 1。 输...
C++
2022-01-23
0
340
首页
上一页
1
2
下一页
末页