跳到正文

个人记录

彩蛋

an_unique_Gambler约 35 分钟
原文
文章信息与版本

文章信息

发布
2025年8月27日
收录
2025年12月12日
更新
2026年11月22日
篇幅
约 35 分钟

版本

  1. v1当前

恭喜你,发现\Huge\textcolor{red}{恭}\textcolor{blue}{喜}\textcolor{green}{你,}\textcolor{purple}{发}\textcolor{yellow}{现}

了彩蛋!!!\Huge\textcolor{orange}{了}\textcolor{black}{彩}\textcolor{gray}{蛋!!!}

既然这样,那本蒟蒻也不装了,就给大家发点福利和多年来我研究出来的东西。

无耻的求点赞\textcolor{red}{无耻的求点赞}

所有点赞的都是美女帅哥,将来一定

切入主题\textcolor{yellow}{切入主题}

part1:头文件源码part 1 :头文件源码

iostream:

C++
// Standard iostream objects -*- C++ -*-

// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @file include/iostream
 *  This is a Standard C++ Library header.
 */

//
// ISO C++ 14882: 27.3  Standard iostream objects
//

#ifndef _GLIBCXX_IOSTREAM
#define _GLIBCXX_IOSTREAM 1

#pragma GCC system_header

#include <bits/c++config.h>
#include <ostream>
#include <istream>

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   *  @name Standard Stream Objects
   *
   *  The &lt;iostream&gt; header declares the eight <em>standard stream
   *  objects</em>.  For other declarations, see
   *  http://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html
   *  and the @link iosfwd I/O forward declarations @endlink
   *
   *  They are required by default to cooperate with the global C
   *  library's @c FILE streams, and to be available during program
   *  startup and termination. For more information, see the section of the
   *  manual linked to above.
  */
  //@{
  extern istream cin;		/// Linked to standard input
  extern ostream cout;		/// Linked to standard output
  extern ostream cerr;		/// Linked to standard error (unbuffered)
  extern ostream clog;		/// Linked to standard error (buffered)

#ifdef _GLIBCXX_USE_WCHAR_T
  extern wistream wcin;		/// Linked to standard input
  extern wostream wcout;	/// Linked to standard output
  extern wostream wcerr;	/// Linked to standard error (unbuffered)
  extern wostream wclog;	/// Linked to standard error (buffered)
#endif
  //@}

  // For construction of filebuffers for cout, cin, cerr, clog et. al.
  static ios_base::Init __ioinit;

_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

#endif /* _GLIBCXX_IOSTREAM */

istream:

C++
#include <ios>
#include <ostream>
template<typename _CharT, typename _Traits>
class basic_istream : virtual public basic_ios<_CharT, _Traits>
{
public:
    // Types (inherited from basic_ios (27.4.4)):
    typedef _CharT    char_type;       			//_CharT  字符流的类型
    typedef typename _Traits::int_type 		int_type;
    typedef typename _Traits::pos_type 		pos_type;
    typedef typename _Traits::off_type 		off_type;
    typedef _Traits   traits_type;       			//_Traits  字符的类型特征
}

ostream:

C++
#include <ios>
#include <bits/ostream_insert.h>
template<typename _CharT, typename _Traits>
class basic_ostream : virtual public basic_ios<_CharT, _Traits>
{
public:
    // 类型 (从basic_ios继承而来,basic_ios在basic_ios.h中):
    typedef _CharT  char_type;       			//_CharT  字符流的类型
    typedef typename _Traits::int_type 		int_type;
    typedef typename _Traits::pos_type 		pos_type;
    typedef typename _Traits::off_type 		off_type;
    typedef _Traits  traits_type;       			//_Traits  字符的类型特征
}

algorithm:

C++
// 示例性结构,基于GCC的libstdc++
#ifndef _GLIBCXX_ALGORITHM
#define _GLIBCXX_ALGORITHM 1

#pragma GCC system_header

#include <utility>          // 包含std::pair等
#include <bits/stl_algobase.h> // 包含一些基础算法,如min, max, swap, iter_swap, copy, move等
#include <bits/stl_algo.h>  // 包含更多算法,如排序、查找、分区、集合操作等

// ... 可能有其他条件编译包含的内容

#endif /* _GLIBCXX_ALGORITHM */

剩下的由于我太蒟了QAQ,搞不出来,所以为了补偿,把所有头文件就摆在这里了。

容器

C++
<array>
<vector>
<deque>
<forward_list>
<list>
<set>
<map>
<unordered_set>
<unordered_map>
<stack>
<queue>
<bitset>

算法与迭代器

C++
<algorithm>
<numeric>
<iterator>
<functional>

字符串与文本处理

C++
<string>
<regex>
<cctype>
<cstring>
<cstdlib>

输入输出流

C++
<iostream>
<fstream>
<sstream>
<iomanip>
<ios>
<iosfwd>
<istream>
<ostream>
<streambuf>

数值计算

C++
<cmath>
<complex>
<valarray>
<random>
<ratio>
<cfenv>

内存管理

C++
<memory>
<scoped_allocator>
<new>
<cstdlib>

多线程与并发

C++
<thread>
<mutex>
<condition_variable>
<future>
<atomic>

时间日期

C++
<chrono>
<ctime>

类型支持

C++
<type_traits>
<typeinfo>
<typeindex>
<limits>
<cstddef>
<cstdint>
<cfloat>
<climits>

异常处理

C++
<exception>
<stdexcept>

实用工具

C++
<utility>
<tuple>
<optional>
<variant>
<any>
<filesystem>
<initializer_list>
<codecvt>
<locale>

C标准库头文件(C++版本)

C++
<cassert>
<ccomplex>
<cctype>
<cerrno>
<cfenv>
<cfloat>
<cinttypes>
<ciso646>
<climits>
<clocale>
<cmath>
<csetjmp>
<csignal>
<cstdalign>
<cstdarg>
<cstdbool>
<cstddef>
<cstdint>
<cstdio>
<cstdlib>
<cstring>
<ctgmath>
<ctime>
<cuchar>
<cwchar>
<cwctype>

已弃用或特殊用途

C++
<ccomplex>        (C++17弃用)
<cstdalign>       (C++17弃用)
<cstdbool>        (C++17弃用)
<ctgmath>         (C++17弃用)
<codecvt>         (C++17弃用)
<ciso646>         (通常为空)

part2:OI梗图\textcolor{orange}{part 2 :OI梗图}

我知道你们最期待这个。

OIerDb选手成绩资料库

mikutap音乐游戏

graph图论绘图工具

weavesilk对称之美

euclidea尺规作图游戏

diep.io

florr.io

nightz.io

zombsroyale.io

iogames

在线PS

标准指法练习TT(不一定适合打代码) 及 安装包

截屏转换Latex数学公式软件:Mathpix Snip

markdown latex表格在线生成

sm.ms在线图库

geogebra数学绘图工具

numberempire数学计算器

oeis数列大全

萌新妹子,刚学OI,请问:可持久化非确定状态AC自动分块维护线段平衡仙人掌优化最小费用最大流预处理混合图上莫比乌斯反演莫队带花舞蹈链并查集树状数组套主席树预处理动态DP分治FFT求多项式逆元对数函数的指数函数用可持久化并查集合并最小费用循环流上插头DP怎么写?

警告,下列梗图爆笑程度开始增加,请勿在吃饭时,挤电梯时,路过精神病院时食用

part3:神贴集合\textcolor{blue}{part 3 :神贴集合}

相信大家都很激动吧,那我们就废话不多说,一起

★★★GOGOGO★★★★★★GOGOGO★★★

举报,建议禁言!!!

如果你封了我,会让全天下的oiers知道,洛谷管理员的腐朽!!洛谷将会臭名昭著!!!

大家一起反对chen_zhe!!!(它亖了)

关于平衡树

关于洛谷管理员

洛谷管理员好【数据删除】啊

该解封了(它亖了)

关于数据结构

默哀(它亖了)

洛谷第一高楼

最古老帖子

新人求助

我要投诉!

part4:其他\textcolor{green}{part 4 :其他}

懒得说明

横扫TLE,做回AC,卡常必备:

C++
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)

超级快读快写,同样卡常必备:

C++
#include<iostream>
#include<cstring>
#include<cmath>
using namespace std ;
namespace IO
{
	#define isdigit(ch) (ch >= '0' && ch <= '9')
	#define SIZE (1 << 16)
	namespace Read
	{
		char buf[SIZE] , *_now = buf , *_end = buf ;
		inline char getchar()
		{
			if(_now == _end)
			{
				_now = _end = buf ;
				_end += fread(buf , 1 , SIZE , stdin) ;
				if(_now == _end)
					return EOF ;
			}
			return *(_now++) ;
		}
		template<typename T>
		inline void read(T& w)
		{
			w = 0 ;
			short f = 1 ;
			char ch = getchar() ;
			while(!isdigit(ch))
			{
				if(ch == '-')
					f = -1 ;
				ch = getchar() ;
			}
			while(isdigit(ch))
				w = (w << 1) + (w << 3) + (ch ^ 48) , ch = getchar() ;
			w *= f ;
		}
		#define sb(ch) (ch == ' ' || ch == '\n' || ch == '\r')
		inline void read(char& c)
		{
			char tmp = getchar() ;
			while(sb(tmp))
				tmp = getchar() ;
			c = tmp ;
		}
		inline void read(char* s)
		{
			char ch = getchar() ;
			while(sb(ch) && ch != EOF)
				ch = getchar() ;
			int len = 0 ;
			while(!sb(ch) && ch != EOF)
				s[len++] = ch , ch = getchar() ;
			s[len] = '\0' ;
		}
		inline void read(string& s)
		{
			s.clear() ;
			char ch = getchar() ;
			while(sb(ch) && ch != EOF)
				ch = getchar() ;
			while(!sb(ch) && ch != EOF)
				s.push_back(ch) , ch = getchar() ;
		}
		inline void read(double& w)
		{
			w = 0 ;
			short f = 1 ;
			char ch = getchar() ;
			while(!isdigit(ch))
			{
				if(ch == '-')
					f = -1 ;
				ch = getchar() ;
			}
			while(isdigit(ch))
				w = w * 10 + (ch ^ 48) , ch = getchar() ;
			if(ch == '.')
			{
				ch = getchar() ;
				int len = 0 ;
				while(isdigit(ch))
					w = w * 10 + (ch ^ 48) , ch = getchar() , ++len ;
				while(len)
					w /= 10 , --len ;
			}
			w *= f ;
		}
		inline void read(float& w)
		{
			w = 0 ;
			short f = 1 ;
			char ch = getchar() ;
			while(!isdigit(ch))
			{
				if(ch == '-')
					f = -1 ;
				ch = getchar() ;
			}
			while(isdigit(ch))
				w = w * 10 + (ch ^ 48) , ch = getchar() ;
			if(ch == '.')
			{
				ch = getchar() ;
				int len = 0 ;
				while(isdigit(ch))
					w = w * 10 + (ch ^ 48) , ch = getchar() , ++len ;
				while(len)
					w /= 10 , --len ;
			}
			w *= f ;
		}
		inline void read(long double& w)
		{
			w = 0 ;
			short f = 1 ;
			char ch = getchar() ;
			while(!isdigit(ch))
			{
				if(ch == '-')
					f = -1 ;
				ch = getchar() ;
			}
			while(isdigit(ch))
				w = w * 10 + (ch ^ 48) , ch = getchar() ;
			if(ch == '.')
			{
				ch = getchar() ;
				int len = 0 ;
				while(isdigit(ch))
					w = w * 10 + (ch ^ 48) , ch = getchar() , ++len ;
				while(len)
					w /= 10 , --len ;
			}
			w *= f ;
		}
		class qistream
		{
			public:
			template<typename T>
			inline qistream& operator>>(T& a)
			{
				read(a) ;
				return *this ;
			}
			inline qistream& operator>>(char* s)
			{
				read(s) ;
				return *this ;
			}
		} qcin ;
	}
	namespace Write
	{
		#define SIZE (1 << 16)
		char buf[SIZE] , *p = buf ;
		template<typename T>
		struct pres
		{
			T num ;
			int len ;
		} ;
		template<typename T>
		inline pres<T> make_lf(T num , int len)
		{
			pres<T> ret ;
			ret.num = num , ret.len = len ;
			return ret ;
		}
		inline void flush()
		{
			fwrite(buf , 1 , p - buf , stdout) ;
			p = buf ;
		}
		inline void putchar(char ch)
		{
			if(p == buf + SIZE)
				flush() ;
			*p = ch ;
			++p ;
		}
		class Flush{public:~Flush(){flush() ;};}_;
		template<typename T>
		inline void write(T x)
		{
			char st[50] ;
			int len = 0 ;
			if(x < 0)
				putchar('-') , x = -x ;
			do
			{
				st[++len] = x % 10 + '0' ;
				x /= 10 ;
			} while(x) ;
			while(len)
				putchar(st[len--]) ;
		}
		inline void write(char c)
		{
			putchar(c) ;
		}
		inline void write(const char* s)
		{
			int siz = strlen(s) ;
			for(int i = 0 ; i < siz ; ++i)
				putchar(s[i]) ;
		}
		inline void write(char* s)
		{
			int siz = strlen(s) ;
			for(int i = 0 ; i < siz ; ++i)
				putchar(s[i]) ;
		}
		inline void write(string& s)
		{
			int siz = s.size() ;
			for(int i = 0 ; i < siz ; ++i)
				putchar(s[i]) ;
		}
		inline void write(double x , int len = 6)
		{
			double tmp = x ;
			if(x < 0)
				putchar('-') , x = -x , tmp = -tmp ;
			double y = 5 * powl(10 , -len - 1) ;
			x += y , tmp += y ;
			int lennow = 0 ;
			char st[50] ;
			if(x < 1)
				putchar('0') ;
			else
				for( ; x >= 1 ; x /= 10)
					st[++lennow] = floor(x) - floor(x / 10) * 10 + '0' ;
			while(lennow)
				putchar(st[lennow--]) ;
			putchar('.') ;
			for(tmp *= 10 ; len ; --len , tmp *= 10)
				putchar(floor(tmp) - floor(tmp / 10) * 10 + '0') ;
		}
		inline void write(float x , int len = 6)
		{
			float tmp = x ;
			if(x < 0)
				putchar('-') , x = -x , tmp = -tmp ;
			float y = 5 * powl(10 , -len - 1) ;
			x += y , tmp += y ;
			int lennow = 0 ;
			char st[50] ;
			if(x < 1)
				putchar('0') ;
			else
				for( ; x >= 1 ; x /= 10)
					st[++lennow] = floor(x) - floor(x / 10) * 10 + '0' ;
			while(lennow)
				putchar(st[lennow--]) ;
			putchar('.') ;
			for(tmp *= 10 ; len ; --len , tmp *= 10)
				putchar(floor(tmp) - floor(tmp / 10) * 10 + '0') ;
		}
		inline void write(long double x , int len = 6)
		{
			long double tmp = x ;
			if(x < 0)
				putchar('-') , x = -x , tmp = -tmp ;
			long double y = 5 * powl(10 , -len - 1) ;
			x += y , tmp += y ;
			int lennow = 0 ;
			char st[50] ;
			if(x < 1)
				putchar('0') ;
			else
				for( ; x >= 1 ; x /= 10)
					st[++lennow] = floor(x) - floor(x / 10) * 10 + '0' ;
			while(lennow)
				putchar(st[lennow--]) ;
			putchar('.') ;
			for(tmp *= 10 ; len ; --len , tmp *= 10)
				putchar(floor(tmp) - floor(tmp / 10) * 10 + '0') ;
		}
		class qostream
		{
			public:
			template<typename T>
			inline qostream& operator<<(T x)
			{
				write(x) ;
				return *this ;
			}
			inline qostream& operator<<(const char* s)
			{
				write(s) ;
				return *this ;
			}
			template<typename T>
			inline qostream& operator<<(const pres<T> x)
			{
				write(x.num , x.len) ;
				return *this ;
			}
		} qcout ;
	}
	using Read::qcin ;
	using Write::qcout ;
	using Write::make_lf ;
}

我的黑历史: cz黑历史: 玩游戏闲的截图: 把kkk号盗了:

教你怎么作弊

deepseek也会这样的:

后记

本文用时本蒟蒻2小时半,求求你点个赞再走在行不行啊QAQ。

最后,我祝大家

AKCSP\Huge \textcolor{red}{AK CSP}

AKAPIO\Huge \textcolor{blue}{AK APIO}

AKIOI\Huge \textcolor{yellow}{AK IOI}

最后再多说一句

上面有隐藏的彩蛋哦 (彩蛋中的彩蛋,玩套娃是吧)。 还记得你是在哪里发现文章的?考考你的记性。 嗯?好像两句了,不对,加上这句就有三句了,算了,不管了。

原文