C++竞赛代码模板


持续更新中


1基础模板

不一定用这个,看题目需要。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <bits/stdc++.h>
#define endl '\n'
using ll=long long;//定义long long为ll

using namespace std;

void solve()
{
// 解题
}

signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);//关闭cin同步,提高效率
cout.tie(0);//关闭cout同步,提高效率
int t = 1;
cin >> t; // 单测则注释
while (t--)
solve();
return 0;
}



C++竞赛代码模板
https://www.furinaluna.top/posts/d097ebe.html
作者
Furina
发布于
2025年11月21日
更新于
2026年9月11日
许可协议
BY FURINA