![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
知识点
Genevieve_xiao
还未而立却想躺平的蒟蒻oier和ta的渗透学习ing 应付高考停更
2021.11.20 AFO.
展开
-
【数学】大组合数巧算
总之就是非常orz求在模p的意义下大数据的组合数,可以利用求逆元的递推式初始化inv[1]=1; fc[0]=fc[1]=1; fcv[1]=1;循环从2->n+m递推求逆元inv[]阶乘fc[]阶乘的逆元fcv[]在模的意义下,逆元就当成倒数使用就好了P1641 [SCOI2010]生成字符串#include<iostream>#include<cstdio>using namespace std;typedef long long ll;const原创 2021-10-28 10:20:28 · 320 阅读 · 0 评论 -
【字符串】表达式求值
转载后缀表达式处理模板#include<iostream>#include<cstdio>#include<cstring>#include<stack>#include<cmath>#include<algorithm>#define Maxn 100000using namespace std;int n,m;stack<int> s1;stack<char> s2;inline i转载 2021-10-27 18:06:25 · 287 阅读 · 1 评论 -
【高精度】重载运算之高精加减乘除模
这是我见过的最好写的高精度板子重载运算符也太香了吧洛谷传送门 P1932 A+B A-B A*B A/B A%B Problem#include<iostream>#include<cstdio>#include<cstring> using namespace std;struct data{ int num[20100]; int len; char op; data(){memset(num,0,sizeof(num)); len=1; op原创 2021-10-27 18:02:35 · 469 阅读 · 1 评论 -
对拍bat程序及随机数
loop:rand >in.txtsta<in.txt>sta_out.txttest<in.txt>test_out.txtfc sta_out/txt test_out.txtif not errorlevel 1 goto looppause#include<bits/stdc++.h>#include<windows.h>using namespace std;int main(){ while(true){ syst原创 2021-10-23 11:30:55 · 457 阅读 · 0 评论 -
优先队列重载运算符
bool operator 重载小于号关于重载运算符的理解第一种写法若满足dis>x.dis 则结构体node<node x由于优先队列由大到小排序 则node x排在前面也就使得结构体根据dis 由小到大排序struct node{ int now,dis; bool operator<(const node &x)const{ return dis>x.dis; }};第二种写法若满足a.dis>b.dis 则结构体node a<原创 2021-10-23 11:21:36 · 721 阅读 · 0 评论