关于缺省源

灌水区

沉石鱼惊旋 @ 2022-03-04 22:08:42

大家有什么推荐的缺省源吗,就是正常做题常用的都能用,我目前缺省源是这样的

#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
const int mod=998244353;
const int N=1e5+5;
void solve()
{

}
int main()
{
    int t;
    t=1;
    cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}

by Ew_Cors @ 2022-03-04 22:09:31


by hy233 @ 2022-03-04 22:10:53


by Ginger_he @ 2022-03-04 22:11:15

#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    int 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<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
void write(int x)
{
    if(x<0)
    {
        putchar('-');
        x=-x;
    }
    if(x>9)
        write(x/10);
    putchar(x%10+'0');
}
int main()
{
//  freopen("example.in","r",stdin);
//  freopen("example.out","w",stdout);

    return 0;
}

by 蒟酱 @ 2022-03-04 22:11:24

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using std::cin;using std::cout;
signed main(){
//  freopen(".in","r",stdin);
//  freopen(".out","w",stdout);
    std::ios::sync_with_stdio(false);
    cin.tie(nullptr);cout.tie(nullptr);
    int i,n,m;
    return 0;
}

自用 七成新


by rsdbk_husky @ 2022-03-04 22:11:29

#include<bits/stdc++.h>
using namespace std;

template <typename T>
inline void read(T &a) {
    char c;for (c = getchar(); (c < '0' || c > '9') && c != '-'; c = getchar());bool f = c == '-';T x = f ? 0 : (c ^ '0');for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) {x = x * 10 + (c ^ '0');}a = f ? -x : x;
}
template <typename T, typename ...Argv>
inline void read(T &a, Argv &...argv) {
    read(a), read(argv...);
}

by Micnation_AFO @ 2022-03-04 22:12:11

https://www.luogu.com.cn/paste/kjrmk8ts


by Whitely @ 2022-03-04 22:13:18

用了差不多半年的板子

#include <bits/stdc++.h>
using namespace std;
template <typename T> inline void read(T &t) {
    t = 0;
    char c = getchar();
    int f = 1;
    while (!isdigit(c)) {
        if (c == '-') {
            f = -f;
        }
        c = getchar();
    }
    while (isdigit(c)) {
        t = (t << 3) + (t << 1) + (c ^ '0');
        c = getchar();
    }
    t *= f;
}
template <typename T, typename ... Args> inline void read(T &t, Args&... args) {
    read(t), read(args...);
}
template <typename T> inline void write(T x, char c = '\0') {
    if (x < 0) {
        x = -x;
        putchar('-');
    }
    if (x > 9) {
        write(x / 10);
    }
    putchar(x % 10 + '0');
    if (c != '\0') {
        putchar(c);
    }
}
int main() {
//  ios :: sync_with_stdio(0);
//  cin.tie(0), cout.tie(0);

    return 0;
}

by Eason_AC @ 2022-03-04 22:16:12

link


by 沉石鱼惊旋 @ 2022-03-04 22:17:10

谢谢各位,此帖终结


by MichaelDickson @ 2022-03-05 08:32:38

@chenyuxuan__2009

#include <algorithm>
#include <iostream>

using namespace std;

int main() {

  return 0;
}

|