跳到正文

LanPeilin

634202

不是看到希望才坚持,而是坚持才能看到希望!

在洛谷打开
资料、奖项与版本

资料

编号
634202
抓取

AFOed on February 21,2023…

此号致敬我的初中OI生活

小号:xiao1002


好题目


好友(大佬们):数学小天才——李默玄武门之变、 梁格尔大佬、 包包 、 李俊烨大佬 、 吕志琳吕承阳


个人目标:

AC黄题*100

AC绿题*100

已完成目标:

AC红题*100

AC橙题*100


大事祭

2021.11.29 注册洛谷

2021.12.5 AC人生第一道OI题目——P1001

2022.1.25 AC100题

2022.1.26 AC第一道蓝题&&绿题

2022.2.11 第一次绿名

2022.7.17 第一次参加洛谷月赛

2022.9.20 第一次被JC(Atcoder)

2022.9.26 AC第一道紫题

2022.10.25 AC300祭

2022.11.8 发帖子被洛谷管理员回复祭(VinstaG173)

2023.2.21 AFOed


C++缺省源:

C++
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

using namespace std;

int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9')	{if(ch=='-')f=-1;ch=getchar();}
	while('0'<=ch&&ch<='9')	{x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return x*f;
}

void justprint(int x)
{
    if(x<0)putchar('-'),x=-x;
    if(x>9)justprint(x/10);
    putchar(x%10^48);
}

void print(int x)
{
	justprint(x);
	putchar(' ');
}

void println(int x)
{
	justprint(x);
	puts("");
}

signed main()
{
	
	return 0;
}

\def{\cW}{ffffff} \def{\cB}{000000} \newcommand{\a}[1]{\fcolorbox{\cB}{F39C11}{\color{\cW}\text{#1}}} \newcommand{\b}[1]{\fcolorbox{\cB}{FFC116}{\color{\cW}\text{#1}}} \newcommand{\c}[1]{\fcolorbox{\cB}{52C41A}{\color{\cW}\text{#1}}} \newcommand{\d}[1]{\fcolorbox{\cB}{3498DB}{\color{\cW}\text{#1}}} \newcommand{\e}[1]{\fcolorbox{\cB}{9D3DCF}{\color{\cW}\text{#1}}} \newcommand{\f}[1]{\fcolorbox{\cB}{0E1D69}{\color{\cW}\text{#1}}} \newcommand{\t}[1]{\text{#1}} \newcommand{\k}[1]{\kern{#1}} \def\arraystretch{1.5}\begin{array}{|l|l|l|}\hline \t{普及-- 模板}\\\hline \a{并查集}&\a{快速幂-取余运算}&\a{线性筛素数}\\\hline \a{最小生成树}&\a{堆}&\a{快速排序}\\\hline \a{字符串哈希}&\a{栈}&\a{队列} \\\hline \t{普及/提高-- 模板}\\\hline \b{负环}&\b{ST 表}&\b{字典树} \\\hline \b{单调栈}&\b{乘法逆元}&\b{裴蜀定理} \\\hline \b{线段树 1}&\b{三分法}&\b{树状数组 1} \\\hline \b{矩阵快速幂}&\b{树状数组 2}&\b{矩阵加速(数列)} \\\hline \b{KMP字符串匹配}&\b{最近公共祖先(LCA)}&\b{单调队列} \\\hline \b{单源最短路径(弱化版)}&\b{单源最短路径(标准版)}&\b{传递闭包}\\\hline \t{普及+ 模板}&\t{} &\t{} \\\hline \c{二元一次不定方程}&\c{乘法逆元2}&\c{康托展开}\\\hline \c{子序列自动机}&\c{nim游戏}&\c{线段树 2}\\\hline \c{最长公共子序列}&\c{全源最短路}&\\\hline \t{提高+/省选-- 模板}\\\hline \d{拉格朗日插值}&\d{树上 k 级祖先}&\d{笛卡尔树}\\\hline \d{原根}&\d{最小费用最大流}&\d{左偏树(可并堆)}\\\hline \d{有理数取余}&\d{差分约束算法}&\d{StoerWagner算法}\\\hline \d{无向图三元环计数}&\d{Prufer 序列}&\d{最小表示法}\\\hline \d{扫描线}&\d{manacher算法}&\d{强连通分量}\\\hline \d{缩点}&\d{高斯消元法}&\d{中国剩余定理}\\\hline \d{负环}&\d{二维凸包}&\d{二分图匹配}\\\hline \d{割点(割顶)}&\d{网络最大流A}&\d{重链剖分}\\\hline \d{欧拉定理}&\d{卢卡斯定理}&\d{线性基}\\\hline \d{AC自动机A}&\d{AC自动机B}&\\\hline \t{省选/NOI--模板}\\\hline \e{可持久化数组}&\e{普通平衡树}&\e{半平面交}\\\hline \e{多项式乘法逆}&\e{可持久化Splay}&\e{静态仙人掌}\\\hline \e{回文自动机}&\e{线段树分裂}&\e{回滚莫队}\\\hline \e{Dirichlet 前缀和}&\e{下降幂多项式乘法}&\e{后缀排序}\\\hline \e{斜率优化}&\e{莫队}&\e{带修莫队}\\\hline \e{快速沃尔什变换}&\e{树同构}&\e{第二类斯特林数-行}\\\hline \e{二次剩余}&\e{有源汇上下界最大流}&\e{后缀自动机}\\\hline \e{自适应辛普森法2}&\e{最小树形图}&\e{多项式对数函数}\\\hline \e{舞蹈链}&\e{可持久化线段树1}&\e{线段树分治}\\\hline \e{三维偏序}&\e{扩展中国剩余定理}&\e{一般图最大匹配}\\\hline \e{质数前缀统计}&\e{可持久化平衡树}&\e{快速 GCD}\\\hline \e{子集卷积}&\e{可持久化Trie}&\e{树上后缀排序}\\\hline \e{FFT快速傅里叶}&\e{文艺平衡树}&\e{LinkCutTree动态树}\\\hline \e{多项式乘法}&\e{自适应辛普森法1}&\e{失配树}\\\hline \e{分治 FFT}&\e{扩展 KMP}&\e{线段树合并}\\\hline \e{点分治1}&\e{矩阵求逆}&\e{AC自动机C}\\\hline \e{2-SAT 问题}&\e{可持久化并查集}&\e{最大流B}\\\hline \e{严格次小生成树}&\e{扩展卢卡斯}&\e{exBSGS}\\\hline \e{树套树}&\e{杜教筛}&\e{任意模数NTT}\\\hline \t{NOI/NOI+/CTSC模板}\\\hline \f{三维凸包}&\f{支配树}&\f{第一类斯特林数-行}\\\hline \f{Polya定理}&\f{动态 DP A}&\f{动态 DP B}\\\hline \f{莫队二次离线}&\f{多项式快速幂}&\f{第二类斯特林数-列}\\\hline \f{Lyndon 分解}&\f{k短路}&\f{常系数齐次线性递推}\\\hline \f{最小割树}&\f{第一类斯特林数-列}&\f{Pollard-Rho算法}\\\hline \f{多项式多点求值}&\f{动态图完全连通性}&\f{快速阶乘算法}\\\hline \f{Min\_25筛}&\f{多项式复合逆}&\f{多项式除法}\\\hline \f{多项式开根A}&\f{多项式开根B}&\f{普通多项式转下降幂}\\\hline \f{多项式复合函数}&\f{BerlekampMassey算法}&\f{常系数非齐次线递推}\\\hline \f{多项式指数函数}&\f{多项式快速插值}&\f{多项式幂函数B}\\\hline \f{下降幂多项式转普通}&\f{N次剩余}&\f{整式递推}\\\hline \f{插头dp}&\f{类欧几里得算法}&\\\hline \end{array}

快读快输(支持所有常用类型):

C++
namespace fastio
{
    const int bufl=1<<20;
    const double base1[16]={1,1e-1,1e-2,1e-3,1e-4,1e-5,1e-6,1e-7,1e-8,1e-9,1e-10,1e-11,1e-12,1e-13,1e-14,1e-15};
    const double base2[16]={1,1e1,1e2,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15};
    struct IN{
        FILE *IT;char ibuf[bufl],*is=ibuf,*it=ibuf;
        IN(){IT=stdin;}IN(char *a){IT=fopen(a,"r");}
        inline char getChar(){if(is==it){it=(is=ibuf)+fread(ibuf,1,bufl,IT);if(is==it)return EOF;}return *is++;}
        template<typename Temp>inline void getInt(Temp &a){a=0;int b=0,c=getChar();while(c<48||c>57)b^=(c==45),c=getChar();while(c>=48&&c<=57)a=(a<<1)+(a<<3)+c-48,c=getChar();if(b)a=-a;}
        template<typename Temp>inline void getDouble(Temp &a){a=0;int b=0,c=getChar(),d=0;__int128 e=0,f=0;while(c<48||c>57)b^=(c==45),c=getChar();while(c>=48&&c<=57)e=(e<<1)+(e<<3)+c-48,c=getChar();if(c==46){c=getChar();while(c>=48&&c<=57)d++,f=(f<<1)+(f<<3)+c-48,c=getChar();}a=e+base1[d]*f;if(b)a=-a;}
        IN& operator>>(char &a){a=getChar();return *this;}
        IN& operator>>(char *a){do{*a=getChar();}while(*a<=32);while(*a>32)*++a=getChar();*a=0;return *this;}
        IN& operator>>(string &a){char b=getChar();while(b<=32)b=getChar();while(b>32)a+=b,b=getChar();return *this;}
        IN& operator>>(int &a){getInt(a);return *this;}
        IN& operator>>(long long &a){getInt(a);return *this;}
        IN& operator>>(__int128 &a){getInt(a);return *this;}
        IN& operator>>(float &a){getDouble(a);return *this;}
        IN& operator>>(double &a){getDouble(a);return *this;}
        IN& operator>>(long double &a){getDouble(a);return *this;}
    };
    struct OUT{
        FILE *IT;char obuf[bufl],*os=obuf,*ot=obuf+bufl;int Eps;long double Acc;
        OUT(){IT=stdout,Eps=6,Acc=1e-6;}OUT(char *a){IT=fopen(a,"w"),Eps=6,Acc=1e-6;}
        inline void ChangEps(int x=6){Eps=x;}
        inline void flush(){fwrite(obuf,1,os-obuf,IT);os=obuf;}
        inline void putChar(int a){*os++=a;if(os==ot)flush();}
        template<typename Temp>inline void putInt(Temp a){if(a<0){putChar(45);a=-a;}if(a<10){putChar(a+48);return;}putInt(a/10);putChar(a%10+48);}
        template<typename Temp>inline void putDouble(Temp a){if(a<0){putChar(45);a=-a;}__int128 b=a;putInt(b);a-=b;a*=base2[Eps];b=a+Acc;putChar(46);putInt(b);}
        OUT& operator<<(char a){putChar(a);return *this;}
        OUT& operator<<(char *a){while(*a>32)putChar(*a++);return *this;}
        OUT& operator<<(string a){for(auto c:a)putChar(c);return *this;}
        OUT& operator<<(int a){putInt(a);return *this;}
        OUT& operator<<(long long a){putInt(a);return *this;}
        OUT& operator<<(__int128 a){putInt(a);return *this;}
        OUT& operator<<(float a){putDouble(a);return *this;}
        OUT& operator<<(double a){putDouble(a);return *this;}
        OUT& operator<<(long double a){putDouble(a);return *this;}
        ~OUT(){flush();}
    };
}
using fastio::IN;
using fastio::OUT;
IN fin;
OUT fout;

读写用法:

用fin,fout 代替 cin,cout 。

不能用 endl 。

———————分割线—————————

…暴力出奇迹,骗分过样例。……模拟只会猜题意,…
…数学先打表,DP看运气。……贪心只能过样例,…
…穷举TLE,递推UKE。……数学上来先打表,…
…模拟MLE,贪心还CE。……DP一般看规律。…
…想要骗到分,就要有方法。……组合数学靠运气,…
…动规背方程,高精背代码。……图论一顿套模板,…
…如果都没背,干脆输样例。……如果都没背,干脆输样例。…

刷题是一种出路

打表是一种勇气

搜索是一种信仰

剪枝是一种精神

骗分是一种日常

爆零是一种宿命

WA 是一种绝望

TLE 是一种痛苦

RE 是一种放弃

UKE 是一种无奈

AC 是一种原谅

AK 是一种希望

弃赛是一种颓废

NOI是一种梦想


收起

最后,请大家在洛谷关注一下LanPeilin吧!

还没有收录这位用户的文章。