跳到正文

闲话

C++缺省源

Pygorithm约 3 分钟
原文
文章信息与版本

文章信息

发布
2026年1月13日
收录
2026年8月19日
更新
2026年8月23日
篇幅
约 3 分钟
获赞
1

版本

  1. v2当前
  2. v1
C++
#include<bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(){
    T x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-') f = -1; ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + (ch - '0'); ch = getchar();}
    return x * f;
}
template <typename T>
inline T write(T x){
    if(x < 0){ putchar('-'); x = -x;}
    if(x > 9) write(x / 10);
    putchar(x % 10 + '0');
} // int a = read<int>(); write<int>(a);
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vii = vector<pii>;
const int INF = 1e9; // 记得改
const int MOD = 1e9 + 7; // 记得改
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define eb emplace_back
#define ft first
#define sd second
#define lb lower_bound
#define ub upper_bound
#define endl '\n'
#define rep(i, a, b) for(int i = (a); i < (b); ++ i)
#define per(i, a, b) for(int i = (b) - 1; i >= (a); -- i)
#define each(x, a) for(auto &x : a)
template <typename T>
T ftpow(T a, T b, T mod){
    T res = 1;
    for(; b; b >>= 1, a = a * a % mod){
        if(b & 1) res = res * a % mod;
    }
    return res;
} // x = ftpow<int>(a, b, mod);
void ftit(){
    cin.tie(0) -> sync_with_stdio(0);
}
void fp(){
    freopen("data.in","r",stdin);
    freopen("data.out","w",stdout);
}
void solve(){
    ; // 请输入文本
}
int main(){
    solve();
    return 0;
}
原文