A - Bi-shoe and Phi-shoe(LightOJ - 1370) 这道题的题意是给队员购买竹子,每一个队员都有一个幸运数字,购买竹子的价格的欧拉值大于等于幸运数字。换一个说法就是找比给你的幸运数字大的最小的质数。数据范围100000。先打个质数表。然后暴力加起来就ok了。 1 #in ...
分类:
其他好文 时间:
2018-12-21 00:01:21
阅读次数:
213
Easy Game LightOJ - 1031 You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take th ...
分类:
其他好文 时间:
2018-12-04 17:24:34
阅读次数:
389
1)矩阵快速幂 POJ - 3070 、HDU - 1575 、| 2)矩阵快速幂+玄学 *HDU - 3117、LightOJ - 1070 *HDU - 3306 、| HDU - 3483 、**HDU - 4566 、*HDU - 4565 、 3)组合恒等变换构造矩阵 *HDU - 285 ...
分类:
其他好文 时间:
2018-12-03 21:38:59
阅读次数:
160
题目:Algebraic Problem 链接:https://vjudge.net/problem/LightOJ-1070 分析: 1)$ a^n+b^n = ( a^{n-1}+b^{n-1} )*(a+b) - (a*b^{n-1}+a^{n-1}*b) $ 构造矩阵: $ \left[ \ ...
分类:
其他好文 时间:
2018-11-28 20:31:41
阅读次数:
176
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem yo ...
分类:
其他好文 时间:
2018-11-18 23:05:59
阅读次数:
265
Sigma Function LightOJ1336 题意:现在给你一个n,你需要求出有多少个数字的σ是偶数。 注:一个数字的σ指这个数的所有因子之和。 结论:n 完全平方数的个数 2倍的完全平方数的个数。 AC代码: include include include include include ...
分类:
其他好文 时间:
2018-11-12 11:25:00
阅读次数:
201
题目链接:https://cn.vjudge.net/problem/LightOJ-1224 Given a set of $n$ DNA samples, where each sample is a string containing characters from {A, C, G, T}, ...
分类:
其他好文 时间:
2018-11-09 22:56:18
阅读次数:
288
学习博客:戳这里 题意:有一个 n 面的骰子,问至少看到所有的面一次的所需 掷骰子 的 次数的期望; 第一个面第一次出现的概率是p1 n/n; 第二个面第一次出现的概率是p2 (n-1)/n; 第三个面第一次出现的概率是p3 (n-2)/n; ... 第 i 个面第一次出现的概率是pi (n-i+1 ...
分类:
其他好文 时间:
2018-10-08 19:37:02
阅读次数:
223
青岛赛训练 A Fantasy of a Summation LightOJ 1213 时间:10月5号23点30 "https://cn.vjudge.net/contest/258301 problem" 这个题,题意给出是一个k重循环,每个循环i重1到n,循环体为 res = ( res + ...
分类:
其他好文 时间:
2018-10-06 00:33:01
阅读次数:
145
题意:在a,b中(a,b<=n)(1 ≤ n ≤ 1014),有多少组(a,b) (a<b)满足lcm(a,b)==n; 先来看个知识点: 素因子分解:n = p1 ^ e1 * p2 ^ e2 *..........*pn ^ en for i in range(1,n): ei 从0取到ei的所 ...
分类:
其他好文 时间:
2018-10-04 10:56:03
阅读次数:
144