快捷键

切换暗色模式 CtrlD
搜索 CtrlK
关闭弹窗 Esc
返回顶部 Ctrl
快捷键面板 Ctrl/
C++信息学奥赛打字闯关
首页 闯关训练 段位系统 题库中心
技术博客 新闻资讯
排行榜 信奥社区 成就殿堂 在线留言 AI助手
对标 CSP-J/S 2025/2026 考纲

C++ 题库中心

逐字符检测 · 实时反馈 · 涵盖 CSP-J/S 全部知识点

0
全部题目
0
入门
0
基础
0
中档
0
提高
0
真题冲刺
266 道题目
中档

删数问题

贪心算法

#include <iostream> #include <string> using namespace std; int main() { string s; int k; cin >> s >> k; ...
15行 5分0秒 贪心,删数问题,
中档

部分背包问题

贪心算法

#include <iostream> #include <algorithm> using namespace std; struct Item { double w, v, ratio; }; bool cmp(Item a, Ite...
18行 6分0秒 贪心,部分背包,
中档

最大连通块(DFS染色/FloodFill)

递归与搜索

#include <iostream> using namespace std; int n, m, mp[105][105], vis[105][105]; int dx[]={0,0,1,-1}; int dy[]={1,-1,0,0...
23行 7分0秒 DFS,连通块,
中档

01背包的DFS搜索

递归与搜索

#include <iostream> using namespace std; int n, cap, w[30], v[30], ans=0; void dfs(int idx, int cw, int cv) { if (...
14行 5分0秒 DFS,01背包
中档

数字三角形

动态规划DP

#include <iostream> using namespace std; int main() { int n, a[105][105], dp[105][105]={0}; cin >> n; for (...
16行 5分0秒 数字三角形,DP
中档

二叉搜索树查找

树结构

#include <iostream> using namespace std; struct Node { int val, l, r; }; Node bst[1005]; int search(int u, int x) { ...
16行 5分0秒 二叉搜索树,BS
中档

埃氏筛求质数表

基础数论

#include <iostream> #include <cstring> using namespace std; int main() { int n; cin >> n; bool isPrime[1000...
18行 5分0秒 埃氏筛,质数,筛
中档

质因数分解

基础数论

#include <iostream> using namespace std; int main() { int n; cin >> n; cout << n << " = "; bool first =...
20行 5分0秒 质因数分解,试除
中档

括号匹配(栈)

复杂模拟

#include <iostream> #include <string> #include <stack> using namespace std; int main() { string s; cin >> s; ...
20行 5分0秒 栈,括号匹配,符
中档

CSP-J 2022 分苹果模拟

历年真题

#include <iostream> using namespace std; int main() { int n; cin >> n; int day=0, remain=n; while (rema...
14行 4分0秒 真题,CSP-J
中档

质数回文数判断

历年真题

#include <iostream> #include <cmath> using namespace std; bool isPrime(int n) { if (n<2) return false; for (int...
20行 5分0秒 回文质数,函数组
中档

并查集模板初始化

并查集

#include <iostream> using namespace std; int fa[100005]; int find(int x) { if (fa[x]==x) return x; return fa[x...
18行 5分0秒 并查集,DSU,
中档

并查集判环

并查集

#include <iostream> using namespace std; int fa[1005]; int find(int x) { if (fa[x]==x) return x; return fa[x]=...
17行 5分0秒 并查集,判环,连
中档

并查集统计连通块大小

并查集

#include <iostream> using namespace std; int fa[100005], sz[100005]; int find(int x) { if (fa[x]==x) return x; ...
19行 6分0秒 并查集,连通块大
中档

lowbit与二进制操作

位运算

#include <iostream> using namespace std; int main() { int x; cin >> x; cout << "lowbit: " << (x & -x) << en...
14行 4分0秒 位运算,lowb
中档

二进制枚举所有子集

位运算

#include <iostream> using namespace std; int main() { int n, a[15]; cin >> n; for (int i=0; i<n; i++) a[i]=...
17行 4分0秒 二进制枚举,子集
16
请先登录
提高

DFS全排列

递归与搜索

#include <iostream> using namespace std; int n, path[10]; bool used[10] = {false}; void dfs(int depth) { if (depth...
20行 5分0秒 DFS,回溯,全
16
请先登录
提高

DFS组合枚举

递归与搜索

#include <iostream> using namespace std; int n, m, path[10]; void dfs(int depth, int start) { if (depth == m) { ...
14行 5分0秒 DFS,组合,枚
17
请先登录
提高

BFS走迷宫

递归与搜索

#include <iostream> #include <queue> #include <cstring> using namespace std; int n, m; char g[105][105]; int dist[105][...
28行 7分0秒 BFS,迷宫,最
17
请先登录
提高

BFS层序遍历二叉树

递归与搜索

#include <iostream> #include <queue> using namespace std; struct Node { int val; Node *left, *right; }; void l...
18行 4分0秒 BFS,二叉树,
18
请先登录
提高

爬楼梯问题

动态规划DP

#include <iostream> using namespace std; int main() { int n; cin >> n; int dp[50]; dp[1] = 1; dp[2] = 2...
10行 3分0秒 DP,爬楼梯,斐
18
请先登录
提高

最长上升子序列(LIS)

动态规划DP

#include <iostream> using namespace std; int main() { int n, a[1005], dp[1005]; cin >> n; for (int i = 1; i...
13行 5分0秒 DP,LIS,最
18
请先登录
提高

数字三角形

动态规划DP

#include <iostream> #include <algorithm> using namespace std; int main() { int n, a[105][105], dp[105][105]; ci...
14行 5分0秒 DP,数字三角形
19
请先登录
提高

01背包问题

动态规划DP

#include <iostream> #include <algorithm> using namespace std; int main() { int n, m, w[100], v[100]; int dp[100...
12行 5分0秒 DP,01背包,
1... 6 7 8 9 10 ...12
在线

给管理员留言

每条留言老师都会认真阅读并回复

📚 课程咨询 🔧 技术求助 💡 建议反馈 🤝 合作联系

留言发送成功!

您的留言已送达管理员后台

追踪码(请保存以便查询回复)
------