跳到正文

个人记录

C++ 模板

DanseSolo约 2 分钟
原文

这是 2026年9月17日 存档的第 2 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2026年4月15日
收录
2026年8月17日
更新
2026年11月22日
篇幅
约 2 分钟

版本

  1. v6当前
  2. v5
  3. v4
  4. v3
更早的 2 个版本
  1. v2
  2. v1

空模板:

C++
#include<bits/stdc++.h>
#define LoveFurina ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define F(x, l, r) for(int x = l; x <= r; ++x)
#define B(x, r, l) for(int x = r; x >= l; --x)
#define ll long long
using namespace std;

//const int N = ;



signed main() {
	LoveFurina;
	
	
	
return 0;
}

// 生命如同戏剧,你永远预料不到转折出现在哪一篇章。
// 世间的奇遇之所以存在,就是为了给世人带来转机。

取模模板:

C++
struct Int {
	int val;
	Int(int x = 0) : val(x) {}
	inline Int operator + (const Int &rhs) const {
        return (1LL * val + rhs.val) % mod;
    }
    inline Int operator - (const Int &rhs) const {
        return (1LL * val - rhs.val + mod) % mod;
    }
    inline Int operator * (const Int &rhs) const {
        return 1LL * val * rhs.val % mod;
    }
};