版本比较
个人用 C++ 模板
正文
增加 8 行删除 4 行
3 行未改动4567891011121314151616 行未改动33343536333738353940413842434441454647484910 行未改动3 行未改动#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 pii pair<int, int>#define st first#define nd second#define ll long long#define ull unsigned long longusing namespace std;
//const int N = ;
16 行未改动
```cpp line-numbersstruct Int { int val; Int(int x = 0) : val(x) {} Int(int x = 0) : val((x % mod + mod) % mod) {} inline Int operator + (const Int &rhs) const { return (1LL * val + rhs.val) % mod; return (1ll * val + rhs.val) % mod; } inline Int operator - (const Int &rhs) const { return (1LL * val - rhs.val + mod) % mod; return (1ll * val - rhs.val + mod) % mod; } inline Int operator * (const Int &rhs) const { return 1LL * val * rhs.val % mod; return 1ll * val * rhs.val % mod; }};```
10 行未改动