首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
C++ 12
12
orange2099
a d
C语言 1431
若有定义语句:char s[10]="1234567\0\0";,则 strle
历战王搔鸟
7
P1392
杨辉三角形 - 西北工业大学 题解:
lllyf
#include <iostream> using namespace std; int sum[1000][1000] = {0}; int di(int x, int y) { if (y < 1 || y > x) re...
政治
2026年考研思想政治理论考试试题 - 第21题回答
LaJeunesse
bc 评分及理由 本题为多项选择题,标准答案为BC。学生作答为“bc”,与标准答案完全一致。 选项分析: A选项“文明之间的交流主要通过河流完成的”表述过于绝对,夸大了河流在文明交流中的作用,不符合历史事实和政治学科中关于文明交流渠道多样性的观点,故错误。 B选项“每一种文明都产生于独特的自...
P1098
前缀字符串 题解:
Carol815
#有没有大佬帮忙看一下,哪里有错误,谢谢,非常感谢! #include<stdio.h> #include<string.h> #先按长度排序,然后检查前缀关系,最后统计不在任何前缀关系中的字符串。 int main() { &nbs...
P1906
位运算 关于bitset常见操作记录题解:
liux662
#include<bits/stdc++.h> using namespace std; int main() { int x, i, j; cin >> x >> i >> j; bitset<32> bit(...
P1930
进制转换 - 中南大学 题解:
2022214449
#include <iostream> #include <string> #include <algorithm> using namespace std; string decimalToOctal(long long n) {  ...
P1097
负二进制 题解:
盐焗鱼丸
第一步:先看题目 → 负二进制 题目说:把十进制数转成 -2 进制 我立刻反应: 这不就是进制转换吗?只是基数是 -2! 第二步:回忆普通进制转换怎么做? 普通转二进制: 除以 2 取余数 商继续算 最后倒着输出 那...
P1033
细菌的繁殖 题解:
上岸啊641
#include <bits/stdc++.h> using namespace std; int func(int x){ if(x==0) return 1; return func(x-1)+...
P1838
括号匹配2 题解:
kkkkkkllll
#include<iostream> #include<string> #include<stack> using namespace std; int main(){ string str1; &nbs...
P1716
快速排序 - 西工大 题解:
sadhjksdj
#include<bits/stdc++.h> using namespace std; void quick(vector<int>&arr,int low,int high){ if(low>=high) ...
P1197
吃糖果 题解:
曾不会
#include<stdio.h> int main() { long long a[25]; a[1]=1; a[2]=2; &...
P997
排队打饭 题解:
dddd225
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin>>n;...
P1175
剩下的树 题解:合并区间
herobie
#include<bits/stdc++.h> using namespace std; bool cmp(pair<int, int>& a, pair<int, int>& b) { return a.f...
P1177
查找学生信息 题解:用数组记录i号人喜欢什么书,用map容器记录那本书有几个人喜
HKX9XAS
#include<stdio.h> #include<string> #include<string.h> #include<iostream> #include<map> using namespace std; ...
学习交流
海明码模拟-西电25机试还原
ggyh99
题目: 题目还原:海明码纠错与数据提取 题目描述: 海明码是一种具有纠错能力的编码方式。现有一种 11 位的海明码,其中包含 7 位数据位($D_1$ 到 $D_7$)和 4 位校验位($P_1, P_2, P_3, P_4$)。 它们在 11 位传输码中的排列位置如下...
P5386
中缀表达式转后缀表达式 题解:
ZeroQi_404
#include <iostream> #include <stack> using namespace std; int pri(char c){ if(c=='+'||c=='-') return 1; if(c=='*'||c==...
P8672
找出两个字符串的独有字符 题解:
Heart997
#include<bits/stdc++.h> using namespace std; int main(){ string s1; string s2; ...
P1834
整数序列 题解:
无敌暴龙战神
暴力 //#include<bits/stdc++.h> #include <iostream> using namespace std; int sumfunc(int start,int len){ &nb...
P1827
有向树形态 题解:
dddd225
#include<bits/stdc++.h> using namespace std; typedef long long LL; int main(){ int n; cin>>n; LL dp[n+1] = {0}; //dp[i]:i个...
P1726
不连续1的子串 题解:看到题没思考,直接递归
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; in...
P1184
放苹果 题解:
白米饭607
分为两种情况 苹果多 或 盘子不小于苹果,当苹果多的时候 考虑为盘子少一个的时候(即空出一个盘子)的方案数加上在每个都先放一个苹果之后的方案数(即盘子数不变 苹果数减n)当盘子多于苹果时 必定有空盘子 忽略空盘子(即极限情况下一个盘子放一个苹果 最多有m个盘子被放了苹果 所以 方案数就等于dp...
P8715
K 顶点统计 题解:
快乐小土狗
#include <iostream> #include <cstring> using namespace std; const int MAXV = 100; // 最大顶点数,对应题目定义 // 邻接矩阵存储的有向图结构(适配C++语法) ...
P5336
数组排序3 题解:
NUISTQQQ
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int n; &n...
P5236
表达式求值 题解:
sevendish
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; // 运算符优先级 int precedence(string op) { if (...
P5229
非降序排列 题解:
mlx
#include<iostream> #include<algorithm> using namespace std; const int N=1e5+10; int n,a[N]; int main() { cin>>...
P1740
是(四)素数 C语言题解:埃拉托斯特尼筛法
无名吟
埃拉托斯特尼筛法 #include<stdio.h> #define N 10000000 int primes[N]; int st[N],s=0; void isPrime(int n){ st[1]=0; for(int i=2; i<n;...
P2006
字符串对齐 题解:
xsw
#include<iostream> #include<vector> using namespace std; int main() { vector<string> v; int n; cin >> ...
P3666
单词翻转 题解:
秋砚舟
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<stri...
P1563
迷宫 题解:c语言,数组模拟队列
滴滴答答302
#include <stdio.h> #include <string.h> struct node{ int x,y; int step; }; struct node q[10000]={0}; //模拟队列 char mpt [105][...
写作
2025年考研英语(一)考试试题 - 第44题回答
LaJeunesse
The table provides a revealing glimpse into the steady growth of major durable consumer goods owned per 100 households in China from 2014 to 2023. ...
C语言
考研智能组卷(C语言) - 第9题回答
叉叉
A,D
P1151
成绩排序 题解:
ZeroQi_404
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool cmp_up(pair<string,int> a, pai...
P1206
删除公共字符 题解:
mlx
#include<iostream> #include<map> using namespace std; string a,b; map<char,int> m; int main() { getline(cin,...
P1674
切木棍 题解:
ZeroQi_404
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ if(n % 2) cout <&...
P1307
组队刷题 题解:
yauqq
#include<bits/stdc++.h> using namespace std; struct node{ double w,m; }; bool cmp(node a,node b){ return a.m*b.w < b.m*a.w; ...
P1259
进制转换2 题解:
ZeroQi_404
#include <iostream> using namespace std; int main() { long long x; while (cin >> hex >> x) cout <<...
P1966
数字排序 题解:
123456pan
1.pair<xx,xx>记录double值和小数位数 2.字符串查找不到:==string::npos #include<bits/stdc++.h> using namespace std; int main(...
P1292
字母统计 题解:模拟
Tyu0871
#include<bits/stdc++.h> using namespace std; int main(){ string ss; while(getline(cin,ss)){ int zimu[101]={0}; in...
P1353
最大公约数 题解:
uly
#include <bits/stdc++.h> using namespace std; int gcd(int a,int b) { if (b==0) { return a; } else { re...
P5345
小花狮的扑克 题解:
iroy
解题思路 1. 牌面映射 首先需要将牌面字符串映射为可比较的数值:3最小,赋值为1;2最大,赋值为13;中间按扑克牌规则递增 2. 牌型判断 对三张牌排序后(从小到大),可以判断牌型: 豹子:三张牌相等 对子:两张相等(可能是前两张相等...
P1013
判断素数 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { &nbs...
P5271
字符串的单词颠倒 题解:
wjcwjccc
// 时间复杂度O(n), 空间复杂度O(1) #include <stdio.h> #include <string.h> #include <ctype.h> char str[1000005]; void revStr(int i, in...
P4356
二叉树的深度 题解:
ljh61
两种方式求树高,一种直接后序遍历逻辑,一种层序遍历 #include<bits/stdc++.h> using namespace std; struct TreeNode{ char val; &nbs...
P1396
二叉排序树 - 华科 C语言题解:递归查找,根据返回值输出父结点
yourgaba233
#include <stdio.h> #include <stdlib.h> typedef struct TNode{//结点 int id; struct TNode* lchild;  ...
P1156
质因数个数 题解:
liux662
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 9; //其实1e5好像就够有点忘记了,开多点保险一些 int prime[N]; bool is_prime[N]; void ...
P1102
素数判定 题解:
ZeroQi_404
#include <iostream> using namespace std; bool isPrime(int x){ if(x < 2) return false; for(int i = 2; i * i <= x; i++) ...
P1413
N阶楼梯上楼问题 题解:非递归 longlong
uly
#include <bits/stdc++.h> using namespace std; long long num[91]; int main() { num[1]=1; num[2]=2; for (int i=3;i<=...
P1703
最大子串和 题解:
yauqq
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin >> n){ vector<int> a(n); for(int i=0;i&l...
P1123
小偷的背包 题解:
uly
#include <bits/stdc++.h> using namespace std; int main() { int s; cin>>s; int n; cin>>n; int w[n+1];...
P5210
体重排序 题解:
NUISTQQQ
#include<iostream> #include<vector> #include<algorithm> using namespace std; bool compare(const pair<string,float&...
P1735
统计卡牌的值 题解:
zeta558
#include <bits/stdc++.h> using namespace std; int main() { int n; string m;  ...
1
2
我要提问
全站热榜
1
无法正确通过题目都是哪些原因造成的?
2
[置顶]计算机考研择校分析【25考研必读】
3
机试如何才能快速提高?
4
题目难点:数学公式不断化解
5
详细题解(站在巨人的肩膀上)
6
A+B问题 题解:C
7
逻辑很简单,但是实现却要小心多多
8
【25计算机考研】39所985院校录取分数线汇总
9
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
10
2048游戏 题解:简洁实现