版本比较
模板-缺省源
标题
增加 1 行删除 1 行
1模板1模板-缺省源
正文
增加 523 行删除 259 行
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333::::success[算法模板]---:::info[[B3647 【模板】Floyd](https://www.luogu.com.cn/problemnew/show/B3647)][AC记录](https://www.luogu.com.cn/record/253934206)C++代码:```cpp line-numbers// 邻接矩阵for(int k=1;k<=n;k++){for(int i=1;i<=n;i++){for(int j=1;j<=n;j++){G[i][j]=min(G[i][j],G[i][k]+G[k][j]);G[j][i]=G[i][j];// 有向图删这行}}}```- [B3611 【模板】传递闭包](https://www.luogu.com.cn/problemnew/show/B3611)::::::info[[P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problemnew/show/P4779)][AC记录](https://www.luogu.com.cn/record/260525532)注意:这里可以使用dijkstra,但是$m$离$n$更近,所以选择堆优化的dijkstra,当然,SPFA也行```cpp line-numbers#include<bits/stdc++.h>using namespace std;const int INF=(1LL<<31)-1;const int MAXN=1e5+5,MAXM=2e5+5;struct edge{int v,w;edge(){}edge(int v_,int w_){ v=v_;w=w_; }};vector<edge> G[MAXN];int* heap_dijkstra(const int& s,const int& count){ // 堆优化的dijkstra - O(n logm)struct Edge_Compare{ bool operator()(edge a,edge b){ return a.w>b.w; } };priority_queue<edge,vector<edge>,Edge_Compare> pq;int n=count+1;int *dis=new int[n+5];bool *vis=new bool[n+5];for(int i=0;i<=n;i++) dis[i]=INF;memset(vis,0,sizeof(bool)*n);dis[s]=0;pq.emplace(s,dis[s]);while(!pq.empty()){int cu=pq.top().v;int d=pq.top().w;pq.pop();if(vis[cu]) continue;vis[cu]=1;for(const auto& e:G[cu]){if(dis[e.v]>d+e.w){dis[e.v]=d+e.w;pq.emplace(e.v,dis[e.v]);}}}return dis;}```本题弱化版:[P3371 【模板】单源最短路径(弱化版)](https://www.luogu.com.cn/problemnew/show/P3371)(这道题$m$离$n^2$更近,所以选择朴素dijkstra)::::::info[[P10815 【模板】快速读入](https://www.luogu.com.cn/problemnew/show/P10815)]C++代码:```cpp line-numbersinline long long read() {long long res = 0;char c = getchar();bool f = false;// 跳过空白while (c < '0' || c > '9') {if (f) f = false;if (c == '-') f = true;c = getchar();}while (c >= '0' && c <= '9') {res = res * 10 + (c - '0');c = getchar();}return f ? -res : res;}```:::::::---::::success[数据结构模板]---:::warning[注意]{open}不要用STL!::::::info[[B3614 【模板】栈](https://www.luogu.com.cn/problemnew/show/B3614)][AC记录](https://www.luogu.com.cn/record/254020653)C++类代码:```cpp line-numberstemplate<typename _Tp=int>class mystack{private:_Tp *buf;unsigned long long ptr=0, ms;public:mystack(long long size) : ms(size) {buf = new _Tp[ms];}~mystack() { delete[] buf; }bool empty() const { return !ptr; }bool full() const { return ptr == ms; }int push(const _Tp& x) {if(full()) return -1;buf[ptr++] = x;return 0;}int pop() {if(empty()) return -1;ptr--;return 0;}_Tp top() const {return empty() ? _Tp(-1) : buf[ptr-1];}long long size() const { return ptr; }void clear() { ptr = 0; }mystack(const mystack&) = delete;mystack& operator=(const mystack&) = delete;};```实践:> - [P1449 后缀表达式](https://www.luogu.com.cn/problemnew/show/P1449)::::::info[[B3616 【模板】队列](https://www.luogu.com.cn/problemnew/show/B3616)][AC记录](https://www.luogu.com.cn/record/254019948)C++类代码:```cpp line-numberstemplate<typename _Tp=int>class myqueue{private:_Tp *q;unsigned long long f=0, r=0, ms;public:myqueue(long long size) : ms(size+1) {q = new _Tp[ms];}~myqueue() { delete[] q; }bool empty() const { return f == r; }bool full() const { return (r+1)%ms == f; }int push(const _Tp& x) {if(full()) return -1;q[r] = x;r = (r+1)%ms;return 0;}int pop() {if(empty()) return -1;f = (f+1)%ms;return 0;}_Tp front() const {return empty() ? _Tp(-1) : q[f];}long long size() const {return (r - f + ms) % ms;}void clear() { f = r = 0; }myqueue(const myqueue&) = delete;myqueue& operator=(const myqueue&) = delete;};```::::::info[[P3378 【模板】堆](https://www.luogu.com.cn/problemnew/show/P3378)][AC记录](https://www.luogu.com.cn/record/260394149)C++类代码:```cpp line-numbers#include <stdexcept>#include <algorithm>template<typename T=int, typename Compare=std::greater<T>>class myheap{private:unsigned long long ms;T *p;unsigned long long len;Compare comp;bool valid(unsigned long long pos) const {return pos >= 1 && pos <= len;}// 二分查找插入位置unsigned long long findInsertPos(const T& val) const {if(len == 0) return 1;unsigned long long left = 1, right = len;while(left <= right) {unsigned long long mid = left + (right - left) / 2;if(!comp(p[mid], val) && (mid == 1 || comp(p[mid-1], val))) {return mid;} else if(comp(p[mid], val)) {left = mid + 1;} else {if(mid == 1) return 1;right = mid - 1;}}return left;}// 二分查找元素位置unsigned long long findElementPos(const T& val) const {unsigned long long left = 1, right = len;while(left <= right) {unsigned long long mid = left + (right - left) / 2;if(p[mid] == val) {// 找到最左边的相等元素while(mid > 1 && p[mid-1] == val) mid--;return mid;} else if(comp(val, p[mid])) {left = mid + 1;} else {if(mid == 1) return 0; // 不存在right = mid - 1;}}return 0; // 不存在}public:myheap(unsigned long long size_max) : ms(size_max), len(0) {if(!size_max) throw std::invalid_argument("Max size can not be 0.");p = new T[ms + 1];}~myheap() { delete[] p; }myheap(const myheap&) = delete;myheap& operator=(const myheap&) = delete;T get(unsigned long long pos) const {if(!valid(pos)) throw std::out_of_range("Access location does not exist.");return p[pos];}void modify(unsigned long long pos, const T& x) {if(!valid(pos)) throw std::out_of_range("Modify location does not exist.");erase(pos);push(x);}void erase(unsigned long long pos) {if(!valid(pos)) throw std::out_of_range("Delete location does not exist.");// 将后面元素前移for(unsigned long long i = pos; i < len; ++i) {p[i] = p[i+1];}len--;}void push(const T& val) {if(len >= ms) throw std::overflow_error("Heap is full, cannot insert.");// 找到插入位置并移动元素unsigned long long insertPos = findInsertPos(val);for(unsigned long long i = len; i >= insertPos; --i) {p[i+1] = p[i];}p[insertPos] = val;len++;}T top() const {if(!len) throw std::underflow_error("Heap is empty, no top.");return p[1];}void pop() {if(!len) throw std::underflow_error("Heap is empty, no top.");// 第一个元素后移for(unsigned long long i = 1; i < len; ++i) {p[i] = p[i+1];}len--;}bool empty() const { return len == 0; }bool full() const { return len >= ms; }unsigned long long size() const { return len; }void clear() { len = 0; }// 验证数组是否有序bool isOrdered() const {for(unsigned long long i = 1; i < len; ++i) {if(comp(p[i+1], p[i])) return false;}return true;}};```练习:- [P1177 【模板】排序](https://www.luogu.com.cn/problem/P1177)::::::info[[U643423 【模板】动态大小数组](https://www.luogu.com.cn/problemnew/show/U643423)]由于 [U645395 【模板】动态大小数组(弱化版)](https://www.luogu.com.cn/problemnew/show/U645395)是本题弱化版,所以本题类代码和该题通用。C++类代码:```cpp```:::> - [B4324 【模板】双向链表](https://www.luogu.com.cn/problemnew/show/B4324)::::---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597:::::success[1. 数据结构模板]---:::warning[注意]{open}不要使用 STL!:::::::info[1.1 基础线性容器]:::info[1.1.1 [B3614 【模板】栈](https://www.luogu.com.cn/problemnew/show/B3614)][AC记录](https://www.luogu.com.cn/record/254020653)[C++类代码](https://github.com/fruit32820/Content-Delivery-Network/blob/main/luogu/header/classes/structures/mystack.hpp)练习:> - [P1449 后缀表达式](https://www.luogu.com.cn/problemnew/show/P1449)::::::info[1.1.2 [B3616 【模板】队列](https://www.luogu.com.cn/problemnew/show/B3616)][AC记录](https://www.luogu.com.cn/record/254019948)[C++类代码](https://github.com/fruit32820/Content-Delivery-Network/blob/main/luogu/header/classes/structures/myqueue.hpp):::::::::::info[1.2 单调优化线性容器]:::info[1.2.1 [P5788【模板】单调栈](https://www.luogu.com.cn/problemnew/show/P5788)]```暂无模板代码```::::::info[1.2.2 [P1886【模板】单调队列](https://www.luogu.com.cn/problemnew/show/P1886)]```暂无模板代码```:::::::::::info[1.3 堆(优先队列)]:::info[1.3.1 [P3378 【模板】堆](https://www.luogu.com.cn/problemnew/show/P3378)][AC记录](https://www.luogu.com.cn/record/260394149)[C++类代码](https://github.com/fruit32820/Content-Delivery-Network/blob/main/luogu/header/classes/structures/myheap.hpp)练习:> - [P1177 【模板】排序](https://www.luogu.com.cn/problem/P1177):::::::::::info[1.4 Trie 字典树]:::info[1.4.1 基础 Trie]```暂无模板代码```::::::::::::---:::::success[2. 图论模板]---::::info[2.1 最短路]:::info[2.1.1 [B3647 【模板】$\text{Floyd}$](https://www.luogu.com.cn/problemnew/show/B3647)][AC记录](https://www.luogu.com.cn/record/253934206)```cpp line-numbers// 邻接矩阵for(int k=1;k<=n;k++){for(int i=1;i<=n;i++){for(int j=1;j<=n;j++){G[i][j]=min(G[i][j],G[i][k]+G[k][j]);G[j][i]=G[i][j];// 有向图删除此行}}}```练习:> - [B3611 【模板】传递闭包](https://www.luogu.com.cn/problemnew/show/B3611)::::::info[2.1.2 [P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problemnew/show/P4779)][AC记录](https://www.luogu.com.cn/record/260525532)注意:这里可以使用朴素 $\text{Dijkstra}$,但是 $m$ 离 $n$ 更近,所以选择堆优化的 $\text{Dijkstra}$,当然,$\text{SPFA}$ 也行。```cpp line-numbers#include<bits/stdc++.h>using namespace std;const int INF=(1LL<<31)-1;const int MAXN=1e5+5,MAXM=2e5+5;struct edge{int v,w;edge(){}edge(int v_,int w_){ v=v_;w=w_; }};vector<edge> G[MAXN];int* heap_dijkstra(const int& s,const int& count){ // 堆优化的 Dijkstrastruct Edge_Compare{ bool operator()(edge a,edge b){ return a.w>b.w; } };priority_queue<edge,vector<edge>,Edge_Compare> pq;int n=count+1;int *dis=new int[n+5];bool *vis=new bool[n+5];for(int i=0;i<=n;i++) dis[i]=INF,vis[i]=false;dis[s]=0;pq.emplace(s,dis[s]);while(!pq.empty()){int cu=pq.top().v;int d=pq.top().w;pq.pop();if(vis[cu]) continue;vis[cu]=1;for(const auto& e:G[cu]){if(dis[e.v]>d+e.w){dis[e.v]=d+e.w;pq.emplace(e.v,dis[e.v]);}}}return dis;}```本代码复杂度:$O(n \log m)$本题弱化版:[P3371 【模板】单源最短路径(弱化版)](https://www.luogu.com.cn/problemnew/show/P3371)(这道题 $m$ 更接近 $n^2$,所以选择朴素 $\text{Dijkstra}$)。:::::::::::info[2.2 $\textrm{Tarjan}$]:::info[2.2.1 强连通分量]```暂无模板代码```::::::info[2.2.2 缩点]```暂无模板代码```::::::::::::---:::::success[3. IO工具模板]---::::info[3.1 快速读入]前置(程序缓冲区的getchar):```cpp// 缓冲区const int BUF_SIZE = 1 << 25; // 如果MLE可以把25改成22,20char inbuf[BUF_SIZE]; // 避免输出缓冲区重名int pin = 0, lenin = 0;// 一次性填充缓冲区版 getcharinline char gc() {if (pin == lenin) { // inbuf 中已经没有数据可读lenin = fread(inbuf, 1, BUF_SIZE, stdin); // 从 stdin 一次性读入pin = 0;if (!lenin) return EOF;}return inbuf[pin++]; // 后续直接返回 inbuf 中的内容,不使用 stdin}// 判断是否空白字符inline bool isws(char c){return c == ' ' || c == '\r' || c == '\n' || c == '\t' || c == '\v';}// 跳过空白字符inline void skws(){char c;while ((c=gc()) != EOF && isws(c));// 非空白字符放回缓冲区if (c != EOF) pin--;}```:::warning如果本地测试时,程序一直在等待输入(光标不停闪烁且可以输入),那么请使用 `Ctrl+D`(Linux)/`Ctrl+Z`(Windows) 终止输入(即键入 `EOF` 标志)。**一定要换一行!** 不然会出现许多玄学问题(比如导致答案与预期不同,但程序其实没有问题,然后调半天,**尤其是这种需要单字符读入的!**)::::::info[3.1.1 [P10815 【模板】快速读入](https://www.luogu.com.cn/problemnew/show/P10815)(整数)][AC记录](https://www.luogu.com.cn/record/282147558)```cpp line-numbers// 在这里加上前置inline bool is_digit(char c){return '0' <= c && c <= '9';}inline long long read_int() {long long res = 0;skws();char c = gc();bool neg = false;if (c == '-'){neg = true;c = gc();}while (is_digit(c)) {res = (res << 3) + (res << 1) + (c ^ 48); // 位运算优化c = gc();}if (c != EOF) pin--;return neg ? -res : res;}```但我们通常会像下面这样写:```cpp line-numbers#include<cstdio>inline long long read() {long long res = 0;char c = getchar();bool f = false;while (c == ' ' || c == '\n' || c == '\r' || c == '\t')c = getchar();if (c == '-') {f = true;c = getchar();}while (c >= '0' && c <= '9') {res = res * 10 + (c - '0');c = getchar();}return f ? -res : res;}```但该代码使用 `getchar` 单字符读入,每次读入都需要访问 `stdin` 缓冲区,所以只能应付 $10^6$ 的数据([关于此的教训](https://www.luogu.com.cn/record/282066694))。对于本题 $10^8$ 数据,需要采用开头的 `fread` 一次性读入缓冲区方案。::::::info[3.1.2 快速读入字符串]```cpp// 在这里加上前置inline string read_str() {skws();vector<char> buf;buf.reserve(1024); // 预分配初始容量减少扩容char c;while ((c = gc()) != EOF && !isws(c)) {buf.push_back(c);}if (c != EOF) pin--;return string(buf.begin(), buf.end());}```:::::::::::info[3.2 快速输出]:::info[3.2.1 `__int128` 输出]```cpp line-numbersinline void write(__int128_t n){ // 有符号 __int128if(n < 0){putchar('-');n = -n;}if(n > 9) write(n / 10);putchar(n % 10 + '0');}inline void write(__uint128_t n){ // 无符号 __int128if(n > 9) write(n / 10);putchar(n % 10 + '0');}```需要注意的是,`__int128` 类型是 `GCC` 扩展,在洛谷和 NOI 系列比赛中可用,但**不保证**部分 OJ 或环境(如 `MSVC`)可用。::::::info[3.2.2 快速输出整型]```cpp line-numbers#include <type_traits>template<typename T>inline void write(T x) {// 判断是否是无符号类型constexpr bool is_uns = std::is_unsigned<T>::value;if (!is_uns) {if (x < 0) {putchar('-');// 转无符号避免负数取模溢出x = -static_cast<typename std::make_unsigned<T>::type>(x);}}if (x > 9) write(x / 10);putchar(x % 10 + '0');}```迭代版防栈溢出:```cpp line-numbers#include <type_traits>#include <algorithm> // swaptemplate<typename T>inline void write(T x) {constexpr bool uns = std::is_unsigned<T>::value;// 临时存数字字符,足够容纳64位整数最多20位char tmp[32];int top = 0;// 负数符号处理if (!uns) {if (x < 0) {putchar('-');x = -static_cast<typename std::make_unsigned<T>::type>(x);}}// 逆序拆分数字存入tmpdo {tmp[top++] = static_cast<char>((x % 10) + '0');x /= 10;} while (x);// 逆序输出,还原正确数字顺序for (int i = top - 1; i >= 0; --i) {putchar(tmp[i]);}}```::::::info[3.2.3 快速输出字符串]```暂无模板代码```::::::::::::---:::::success[4. 高精度计算模板]---:::info[4.1 Python 高精度]`Python` 在逻辑前加上这两句就可以了:```pythonimport syssys.set_int_max_str_digits(0)# 其实就是解除字符串长度限制# 因为 input() 读进来是字符串,而 Python 原生支持大整数# 所以只需要保证读进来的字符串不被截断就可以了```~~555为什么这么少,不像其他语言还要字符串/数组~~:::::::info[4.2 C++高精度]也可以直接用我的 [`bint` 类](https://github.com/fruit32820/Content-Delivery-Network/blob/main/luogu/header/classes/structures/bint.hpp):::info[4.2.1 字符串存储高精度数字]```暂无模板代码```::::::info[4.2.2 整型数组存储高精度数字]```暂无模板代码```::::::::::::---:::::success[5. 字符串算法模板]---::::info[5.1 模式串匹配]:::info[5.1.1 KMP 单模式串匹配]```暂无模板代码```::::::info[5.1.2 AC自动机 多模式串匹配]```暂无模板代码```::::::::::::---:::::success[6. 数论模板]---::::info[6.1 快速幂]:::info[6.1.1 普通取模快速幂]```cpp line-numberslong long qpow(long long a,long long b,long long mod=0) {long long ans=1;if(mod) a%=mod;while(b){if(b&1) ans=(__int128)ans*a;if(mod) ans%=mod;a=(__int128)a*a;if(mod) a%=mod;b>>=1;}return ans;}```特别的,如果传入的 $mod=0$ 或者没有传入 $mod$,那么将不会取模。::::::info[6.1.2 浮点快速幂]```long double qpow(long double a,long long b) {long double ans=1;while(b){if(b&1) ans=ans*a;a=a*a;b>>=1;}return ans;}```:::::::::::info[6.2 GCD/欧几里得算法]:::info[6.2.1 朴素GCD]```暂无模板代码```::::::info[6.2.2 exGCD/扩展欧几里得算法]```暂无模板代码```::::::info[6.2.3 乘法逆元]```暂无模板代码```:::::::::::info[6.3 素数筛]:::info[6.3.1 普通筛法]```暂无模板代码```::::::info[6.3.2 埃氏筛/埃拉托色尼筛法/Eratosthenes Sieve]```暂无模板代码```但我们通常可能会这样写:```暂无模板代码```上述代码复杂度为 $O(n \log \log n)$。但代码中,还有一处可以优化:用 $i$ 去筛掉 $2i, 3i, 4i\dots$ 时,我们发现:- $2i \le n$ 的话,其一定被 $2$ 给筛掉了。- 而 $3i$ 也一定被 $3$ 筛掉了。所以我们不需要从 $2i$ 开始筛,直接从 $i^2$ 开始筛即可(必须满足 $i^2 \le n$),于是可以优化为开头的代码::::::info[6.3.3 线性筛/欧拉筛]```暂无模板代码```::::::info[6.3.4 分块筛]```暂无模板代码```:::::::::::info[6.4 CRT/中国剩余定理]:::info[6.4.1 朴素CRT]```暂无模板代码```::::::info[6.4.2 exCRT/扩展中国剩余定理]```暂无模板代码```::::::::::::---::::success[7. DP 模板]:::info[7.1 数位 DP]```cpp line-numbers#include<bits/stdc++.h>using namespace std;using ll=long long;const int MAXDIG=20,MAXST=25,MAXPRE=20;int dig[MAXDIG];// dp[pos] [state][pre]ll dp[MAXDIG][MAXST][MAXPRE];ll dfs(int pos,int st,int pre,bool lim,bool lead0){// 边界if(pos==0)return 1;// 使用记忆化结果if(!lim && !lead0 && dp[pos][st][pre]!=-1)return dp[pos][st][pre];ll res=0;int maxlim=lim?dig[pos]:9; // 当前位限制for(int i=0;i<=maxlim;i++){bool nlim=lim&&(i==maxlim);bool nlead0=lead0&&!i;int npos=pos-1;int nst=st/* 根据题意修改 */;int npre=nlead0?-1:i;if(i==4 || (pre==6 && i==2)) continue;res+=dfs(npos,nst,npre,nlim,nlead0);}// 加入记忆化if(!lim && !lead0)dp[pos][st][pre]=res;return res;}ll calc(ll x){// 拆分 xint len=0;while(x){dig[++len]=x%10;x/=10;}return dfs(len,0,-1,true,true);}int main(){ios::sync_with_stdio(false);cin.tie(nullptr);memset(dp,-1,sizeof(dp));ll l,r;cin>>l>>r;cout<<calc(r)-calc(l-1)<<'\n';}```::::---::::success[8. 其他模板]:::info[8.1 算法竞赛极限卡常(保留浮点精度)]```cpp line-numbers#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,inline")#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,f16c,tune=native")```::::::info[8.2 极速数值计算专用]```cpp line-numbers#pragma GCC optimize("Ofast,no-stack-protector,fast-math,unroll-loops,inline")#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,f16c,tune=native")```::::::warning{open}洛谷通过 [修改 GCC](https://github.com/luogu-dev/judge-env/blob/master/gcc/13_disable-pragma-and-attribute-for-optimize.patch) 禁用了 `#pragma` 和 `__attribute__` 打开优化,所以如有这两个的代码会直接 `CE`。::::::info[8.3 体积缩小编译指令]```-Wl,--gc-sections -Wl,--strip-all -Wl,--discard-all -Wl,-e,WinMainCRTStartup -fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables -fexec-charset=gbk```::::::info[8.4 文件初始缺省源]```cpp line-numbers// C++ std#include<bits/stdc++.h>using namespace std;// GNU pb_ds#include<bits/extc++.h>using namespace __gnu_cxx;using namespace __gnu_pbds;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);}```:::::::---:::warning[AI 声明]{open}本文章初次写作完成后使用 DeepSeek(实则豆包) 进行文字润色与格式规范修正,在 AI 完成后**人工**进行了格式修复。:::