版本比较
笔记
正文
增加 39 行删除 4 行
4 行未改动567899111011121314151618171819202122232411 行未改动363738394041424344454647484950515253545556252 行未改动全部展开309310311312299313314315316317349 行未改动全部展开6676686696706716726736746756766776786796806816826836846856866876886896906914 行未改动using namespace std;#define endl '\n'typedef long long ll;const int N=1e8+10;
int main(){ ios::sync_with_stdio(false); ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); return 0;}```
# 求质数模板# 求质数
## 普通质数求法
```#include<bits/stdc++.h>using namespace std;bool s(int a){11 行未改动 }```
## 质数筛
```vis[1]=1; for(int i=1;i<=n;i++){ if(vis[i]==1) continue; for(int j=2*i;j<=n;j+=i){ vis[j]=1; } }```
# 字符串
## 大小写转换
252 行未改动全部展开```
## [函数二分](https://blog.csdn.net/weixin_45031801/article/details/137544229)
# 前缀和# 质数筛
```vis[1]=1; for(int i=1;i<=n;i++){349 行未改动全部展开 } x*=f;}```
# 快读快输
```void out(ll x){//快输 if(x<0)putchar('-'),x=-x; if(x<10)putchar(x+'0'); else out(x/10),putchar(x%10+'0');}ll in(){//快读 int k=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-')f=-1; c=getchar(); } while(c>='0'&&c<='9')k=k*10+c-'0',c=getchar(); return k*f;}```