![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学类算法
GreyBtfly王宝彤
业精于勤,荒于嬉;行成于思,毁于随
展开
-
C - Generation I 组合数学+化简+逆元 牛客网暑期ACM多校训练营(第六场)
博客目录 链接:https://www.nowcoder.com/acm/contest/144/C 来源:牛客网 时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Oak is given N empty and non-repeatable sets which are nu...原创 2018-08-10 12:31:42 · 269 阅读 · 0 评论 -
CCPC-WannaFly-Camp #4 L - 数论之神 数论题
链接:https://www.nowcoder.com/acm/contest/205/L 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 终于活成了自己讨厌的样子。 这是她们都还没长大的时候发生的故事。那个时候,栗子米也不需要为了所谓的爱情苦恼。 她们可以在夏日的...原创 2018-10-05 13:25:47 · 596 阅读 · 1 评论 -
Calculation HDU - 2837 欧拉降幂 坑死人了原来还有这种细节
博客目录 原题 传送门 Assume that f(0) = 1 and 0^0=1. f(n) = (n%10)^f(n/10) for all n bigger than zero. Please calculate f(n)%m. (2 ≤ n , m ≤ 10^9, x^y means the y th power of x). Input The first line cont...原创 2018-09-19 21:06:19 · 350 阅读 · 0 评论 -
ACM-ICPC 2018 北京网络赛:K-Dimensional Foil II 一题多解
博客目录 原题 题目链接 #1835 : K-Dimensional Foil II 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 "K-Dimensional Foil" is a dimensional weapon. Its function is quite easy: It can ascend a region in 3D space to...原创 2018-09-24 22:38:20 · 580 阅读 · 0 评论 -
卡精度题目
本来想出到校赛上的,然后被出题组否了。 时间限制:10s 你跟一个人比赛,你第i局获胜的概率为1/i,第i局获胜所得money是ai,输了不赔钱,求n局后赢的money数的期望 ai<=1e9 n<=2e4 Input: 第一行输入T表示case数 ,T后面是一行空行 对于每组样例:第一行输入n 接下来一行输入a1到an Output: 输出期望 ,保留8位小数 样例输入:...原创 2019-04-22 18:08:59 · 515 阅读 · 0 评论 -
ACM-ICPC 2018 焦作赛区网络预赛 L Poor God Water 线性模板题 or 矩阵快速幂推导
博客目录 原题 原题传送门 40.26% 1000ms 65536K God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous. Ev...原创 2018-09-15 20:31:40 · 210 阅读 · 0 评论 -
ACM-ICPC 2018 焦作赛区网络预赛 G. Give Candies 打表+指数循环节 or欧拉降幂(费马小定理) 一题多解
博客目录 原题 传送门 26.61% 1000ms 65536K There are NN children in kindergarten. Miss Li bought them NN candies. To make the process more interesting, Miss Li comes up with the rule: All the children l...原创 2018-09-15 17:31:37 · 654 阅读 · 0 评论 -
ACM-ICPC 2018 南京赛区网络预赛 J - Sum 素数筛求最小质因子+只动态不规划+常数优化
博客目录 原题 题目链接 24.07% 1000ms 512000K A square-free integer is an integer which is indivisible by any square number except 11. For example, 6 = 2 \cdot 36=2⋅3 is square-free, but 12 = 2...原创 2018-09-03 17:55:37 · 239 阅读 · 0 评论 -
Snakes and Ladders LightOJ - 1151 复杂期望,高斯全主元消去法解方程 [模板] —— 标程精度不够,你信我啊
博客目录 返回二级目录——kaugnbin概率dp习题集 原题 题目链接 'Snakes and Ladders' or 'Shap-Ludu' is a game commonly played in Bangladesh. The game is so common that it would be tough to find a person who hasn't played it...原创 2018-08-19 17:19:52 · 557 阅读 · 0 评论 -
HDU - 6395 Sequence 分段矩阵快速幂 ——矩阵快速幂模板
博客目录 题目传送门 原题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1159 Accepted Submission(s): 426 Problem Description Let us...原创 2018-08-14 15:06:25 · 317 阅读 · 0 评论 -
2017ACM/ICPC沈阳 F - Heron and His Triangle HDU - 6222 找规律 + java大数
博客目录 原题 题目传送门 A triangle is a Heron’s triangle if it satisfies that the side lengths of it are consecutive integers t-1, t, t+ 1 and thatits area is an integer. Now, for given n you need to find a ...原创 2018-10-08 21:50:19 · 328 阅读 · 0 评论