https://www.luogu.com.cn/problem/P3386 #include <bits/stdc++.h> using namespace std; const int maxn = 1e3 + 10; int n,m,e,link[maxn][maxn],ans; int us ...
分类:
其他好文 时间:
2020-02-28 14:20:36
阅读次数:
46
【模板】杜教筛(luogu) 仅有模板,不含讲解,推荐讲解 Description 题目描述 给定一个正整数N(N≤2^31?1) 求 $$ans_1=\sum_{i=1}^n\varphi(i)$$ $$ans_2=\sum_{i=1}^n \mu(i)$$ 输入格式 一共T+1行 第1行为数据组 ...
分类:
其他好文 时间:
2020-02-27 20:42:32
阅读次数:
55
https://subetter.com/algorithm/manacher-algorithm.html #include<bits/stdc++.h> #define N 2050001 using namespace std; int len,p[N],Case,ans; char ch[N ...
分类:
编程语言 时间:
2020-02-26 23:20:52
阅读次数:
132
https://www.luogu.com.cn/problem/P1181 模拟一下这个过程 从第一个数开始,如果符合条件.res += a[i]; 不符合的话,ans++;res = 0,res += a[i]; #include<bits/stdc++.h> using namespace s ...
分类:
其他好文 时间:
2020-02-26 11:34:30
阅读次数:
60
真的打起比赛来,连个贪心都写不好,呜呜呜。 1 #include <bits/stdc++.h> 2 using namespace std; 3 int a[5],t,ans; 4 void IF(int&a){if(a)ans++,a--;} 5 void IF(int&a,int&b){if( ...
分类:
编程语言 时间:
2020-02-24 12:32:43
阅读次数:
68
#include<bits/stdc++.h> using namespace std; const int N=1<<20; struct node{ int l,r; int id; }q[N]; int pos[N]; long long ans[N]; //每个前缀值出现的次数 long l ...
分类:
其他好文 时间:
2020-02-23 11:59:37
阅读次数:
83
今天学习快速幂。 定理一:积的取余等于取余的积的取余。即a%c*b=a*b%c; 定理二: 1.如果b是偶数,那么ans = (a^2 mod c)^(b/2); 2.如果b是奇数,那么ans=(a^2 mod c)^(b/2)*a; 由此,我们可以得出快速幂的算法为一下。 1 int PowerM ...
分类:
其他好文 时间:
2020-02-23 11:16:07
阅读次数:
61
建库脚本 USE [master] GO CREATE DATABASE [Example] GO USE [Example] GO /****** Object: Table [dbo].[Course] Script Date: 2016/12/6 0:16:24 ******/ SET ANS ...
分类:
数据库 时间:
2020-02-22 22:07:03
阅读次数:
105
题目大意:给一个长度为$n(n using namespace std; long long n; int m,ans,cc; const int mod=998244353; const int P=mod; int t=33; struct Mat{ int A[34][34]; Mat(){ ...
分类:
其他好文 时间:
2020-02-22 10:12:11
阅读次数:
82
1、 均值 数学定义: MATLAB中均值、方差、均方差的计算方法 Matlab函数:mean x=[1 2 3]; mean(x) ans = 2 如果X是一个矩阵,则其均值是一个向量组。mean(X,1)为列向量的均值,mean(X,2)为行向量的均值。 x=[1 2 3;4 5 6]; mea ...
分类:
其他好文 时间:
2020-02-22 09:48:43
阅读次数:
77