跳到正文

个人记录

缺省源

SalN约 2 分钟
原文
文章信息与版本

文章信息

发布
2023年9月3日
收录
2025年12月12日
更新
2026年11月17日
篇幅
约 2 分钟

版本

  1. v1当前

祝福。

qq3334538495

「」

C++
#pragma GCC optimize(1,2,3,"Ofast","inline")
#include<bits/stdc++.h>
#define int long long
#define up(i,l,r) for(int i=l; i<=r; ++i)
#define dn(i,r,l) for(int i=r; i>=l; --i)

using namespace std;

inline int read() {
    int X=0; bool flag=1; char ch=getchar_unlocked();
    while(ch<'0'||ch>'9') { if(ch=='-') flag=0; ch=getchar_unlocked(); }
    while(ch>='0'&&ch<='9') { X=(X<<1)+(X<<3)+ch-'0'; ch=getchar_unlocked(); }
    if(flag) return X;
    return ~(X-1);
}

void write(int X) {
    if(X<0) { X=~(X-1); putchar('-'); }
    if(X>9) write(X/10);
    putchar(X%10+'0');
}

signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
    mt19937_64 rd(chrono::steady_clock::now().time_since_epoch().count());
	chrono::steady_clock::now().time_since_epoch().count();
	srand((unsigned)time(0));
	
	return 0;
}

/*
random_shuffle(a,a+1+n); // 随机打乱
next_permutation(a+1,a+1+n); // 排列 
prev_permutation(a+1,a+1+n); // 存在/不存在 返回 1/0 
*/
原文