摘要:
In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are given n, you have to fi 阅读全文
posted @ 2020-10-30 19:02
lipu123
阅读(754)
评论(0)
推荐(0)
摘要:
传输门 给出了 n 个人和 m 条关系,每一个团体的价值为当前团体的关系数-人数,如果这个团体的关系数小于等于人数那么就是 0 ,也就相当于不选择。 可以使用并查集来考虑对于每个节点计算点数和边数的关系,符合边数-点数>0的就加上边数-点数,最后求总和。 #pragma GCC optimize(1 阅读全文
posted @ 2020-10-30 00:20
lipu123
阅读(116)
评论(0)
推荐(0)
摘要:
lcm: 传送门 找到以下代码的结果: long long pairsFormLCM( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ) for( int j = i; j <= n; j++ ) if( lcm(i, j) == 阅读全文
posted @ 2020-10-30 00:17
lipu123
阅读(173)
评论(0)
推荐(0)

浙公网安备 33010602011771号