逆元
ITKaven
ACMER
本科软件工程专业
硕士计算机技术专业
专注于WEB开发的烟酒僧
展开
-
牛客网暑期ACM多校训练营(第一场)A : Monotonic Matrix
比赛的时候不会写这个题,一直在找规律,可惜找不到。。。然后就放弃了这个题 今天补题看了题解又不是很懂,花了大半天的时间去理解叉姐的解题思路,终于理解了一点 #include<bits/stdc++.h> using namespace std; typedef long long ll; const ll mod=1e9+7; const int maxn=1000+100;...原创 2018-07-22 17:23:28 · 3357 阅读 · 0 评论 -
洛谷 P4781 【模板】拉格朗日插值
题目传送门 参考:拉格朗日插值 学习笔记 代码: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=2000+100; const int mod=998244353; int x[maxn],y[maxn]; ll mypow(ll a,ll b){ ...原创 2018-08-07 14:55:11 · 3490 阅读 · 0 评论 -
HDU 6410 序列期望
题目传送门 代码: #include<bits/stdc++.h> using namespace std; #define max(a,b) (a>b?a:b) #define min(a,b) (a<b?a:b) typedef long long LL; const int mod=1e9+7; int l[110],r[110]; LL mypow(LL...原创 2018-08-21 14:48:10 · 1051 阅读 · 0 评论 -
牛客小白月赛9 A、B、C、D、E、H
传送门 A 被砸到的概率 = 1 - 不被砸到的概率 而不被砸到的概率很容易计算。 代码: #include&lt;cstdio&gt; using namespace std; typedef long long ll; const ll mod=1e9+7; const int maxn=100000+100; ll mypow(ll a,ll b){ ll sum=1; ...原创 2018-11-29 13:38:31 · 4607 阅读 · 0 评论