快读及快输出
摘要:来源:https://www.cnblogs.com/CharlieWade/p/11410770.html
阅读全文
权值线段树模板题
摘要:array Time Limit: 1500ms Memory Limit: 256M Description You are given an array . Initially, each element of the array is unique.Moreover, there are in
阅读全文
区间素数筛
摘要:题目描述 A positive integer is called a "prime-factor prime" when the number of its prime factors is prime. For example, 12 is a prime-factor prime becaus
阅读全文
后缀自动机
摘要:题目链接:http://icpc.upc.edu.cn/problem.php?cid=1828&pid=7 题目描述 Now you have a string consists of uppercase letters, two integers A and B. We call a subst
阅读全文
矩阵快速幂模板题
摘要:题目描述 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 po
阅读全文
矩阵快速幂模板
摘要:struct Mat { LL m[101][101]; };//存储结构体 Mat a,e; //a是输入的矩阵,e是输出的矩阵 Mat Mul(Mat x,Mat y) { Mat c; for(int i=1;i>=1; } return ans; }
阅读全文
常见的代码错误情况
摘要:(1),把Max赋了一个最大值或者把Min赋了一个最小值;
阅读全文
十进制快速幂
摘要:给你一个大数n,求2的n次幂; 由于n很大,用普通的快速幂已经不能够很快的算出了,因为不好判断奇偶以及除2这些,不过不过用十进制快速幂求普通的ll及int型数也很快;
阅读全文
用唯一分解定理求m/n
摘要:用唯一分解定理求m/n,保证m能够被n整除; 这其中用到了素数筛以及快速幂
阅读全文
map用法
摘要:#include using namespace std; struct node{ int x,y; bool operator Map; node temp; temp.x=1,temp.y=1; Map[temp]=1; cout<<Map[temp]<<endl; temp.x=2; cout<<Map[temp]<<end...
阅读全文