首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
P1683
选球问题 题解:
ZeroQi_404
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int n, k; while ...
高等数学
2025年考研数学(一)考试试题 - 第12题回答
admin
2 评分及理由 (1)得分及理由(满分5分) 学生答案为“2”。 本题要求计算傅里叶正弦级数和函数 \(S(x)\) 在 \(x = -\frac{7}{2}\) 处的值。已知函数 \(f(x)\) 定义在 \([0, 1]\) 上,其傅里叶正弦级数展开为奇延拓后的周期函数(周期为2)。因此...
P1412
大整数排序 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; in...
P807
K站中转内最便宜的航班 题解:Bellman-Ford 算法
快乐小土狗
#include <iostream> #include <vector> using namespace std; int main() { const int INF = 1e9; int n, src, dst, k; ...
P8725
余数相同 题解:
zeta558
暴力循环,循环到数组最大值会超时,但循环到100即可全对,为何 #include <bits/stdc++.h> using namespace std; int main() { int t; cin>...
P1663
破译密码 题解:我们是在破密,是往前5位
滴滴答答302
#include <stdio.h> #include <string.h> #include <stdlib.h> char s[205]; int main() { while(scanf("%...
P1638
Aggressive cows 题解:二分答案查找+贪心思想
岸上的乌龟
通过83原因:题目是多组数据输入,但题目上没说 #include<bits/stdc++.h> using namespace std; long long int x[100005]= {0}; long long int n,c;//n个棚,c个牛 bool ju...
P1476
查找学生信息2 题解:
yauqq
#include<bits/stdc++.h> using namespace std; struct Student { string num, name, gender, age; }; int main() { int n; ci...
P1074
水王争霸 题解:
yauqq
#include<bits/stdc++.h> using namespace std; struct node{ string id,num; }; bool cmp(node a,node b){ int lena = a.num.length(); ...
P1013
判断素数 题解:
ZeroQi_404
#include <iostream> using namespace std; bool isPrime(int x){ if(x < 2) return false; for(int i = 2; i * i <= x; i++){ if(...
P1916
全1字符串 题解:先把连续的1提取出来,再计算
ryuki
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; //计数函数 int cou...
P1221
旋转矩阵 C语言 题解:费内存
无名吟
#include<stdio.h> #include<stdlib.h> void c1(int** arr, int max){ int** brr = (int**)malloc((max + 1) * sizeof(int*)); for ...
P1383
查找第K小数 题解:容器内部默认从小到大排序,用迭代器指向最小的数,向后找k-1
HKX9XAS
#include<stdio.h> #include<string.h> #include<map> #include<iostream> using namespace std; int main(){ &nbs...
P1380
二进制数 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { &nbs...
P1394
统计单词 题解:
ZeroQi_404
#include <iostream> #include <string> using namespace std; int main(){ string s; getline(cin, s); int count = 0...
P807
K站中转内最便宜的航班 题解:
快乐小土狗
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; const int INF...
P5132
车厢的重组 题解:冒泡排序
th123
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> nums(n); for(int i=0;i<n;i++){...
P1338
EXCEL排序 题解:
Cat111
#include <bits/stdc++.h> using namespace std; struct Student{ char id[10]; char name[10]; int score; }Stu[100000]; b...
P1106
排序2 题解:纯C,参照王道书完成的
HKX9XAS
#include<stdio.h> #include<malloc.h> void Insertion_Sort(int arr[],int out[],int n){ for(int i=0; i<n ;i++...
P1044
阶乘和 题解:
yauqq
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll fac(ll n){ if (n <= 0) return 1; else return n * f...
P1161
二叉树遍历 题解:c++
bro
#include <bits/stdc++.h> using namespace std; string s; int i; typedef struct Node{ char data; Node *le...
P807
K站中转内最便宜的航班 题解:Dijkstra+优先队列
快乐小土狗
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; int main() { c...
P1971
求HSL的值 题解:
快乐小土狗
#include <stdio.h> #include <math.h> // 用于fabs()、fmod() int main() { // 1. 输入RGB整数值 int R, G, B; scanf("%d %d %d"...
P1020
最长连续因子 题解:结构体存储连续因子数组及其长度
HKX9XAS
#include<stdio.h> #include<iostream> #include<string> #include<vector> using namespace std; struct Lian{ ...
P1035
简单背包问题 题解:
曾不会
#include<stdio.h> int main() { int s,n; while(scanf("%d %d",&s,&n)!=EOF) &...
P8681
位1的个数 题解:
HKX9XAS
#include<stdio.h> #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std...
P1382
哈夫曼树 题解:C ,利用哈夫曼树 WPL 等于所有非叶子节点权值之和
qtexpsem
#include <stdio.h> #include <stdlib.h> #include <string.h> int cmp (const void *a, const void *b) { int x = *(int *)a; ...
P1134
矩阵翻转 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; in...
P1041
最大公约数和最小公倍数 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int ...
P1042
字符个数 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int ...
P1033
细菌的繁殖 题解:找规律
cc123
#include<bits/stdc++.h> using namespace std; // 1、1+3+1、1+3+5+3+1、1+3+5+7+5+3+1.... // 定义sum[i]表示前i个奇数的和,根据等差数列,sum[i]=(1+2*i-1)*i/2=i^2...
P1375
素数 题解:
ZeroQi_404
#include <iostream> using namespace std; bool isPrime(int x){ if(x < 2) return false; for(int i = 2; i * i <= x; i++){ ...
P2021
整数去重 题解:
不羡仙
只用C语言,且极其简单明了 #include <stdio.h> int main() { int n, num; while (scanf("%d",&n)!=EOF) { &nbs...
C语言
考研智能组卷(C语言) - 第9题回答
叉叉
A
P1344
最短路径问题 这题这里的数据有点弱,我之前写的代码在牛客那里ac不了在这里可以a
liux662
错误: #include <bits/stdc++.h> using namespace std; const int N = 1e3 + 9; struct Node{ int v, w, c; bool operator &l...
P1394
统计单词 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { &nbs...
P5387
最大连续子序列和 题解:
ZeroQi_404
#include <iostream> using namespace std; int main() { int n; cin >> n; int x; cin >> x; int cu...
P1380
二进制数 题解:反转字符串
磊磊公爵
//#pragma GCC optimize(3) #include<bits/stdc++.h> #define rep(i,a,n) for(ll i=a;i<=n;i++) #define per(i,a,n) for(ll i=a;i&g...
P1047
分数求和 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; in...
P1960
子序列-ECNU 题解:
123456pan
暴力80% #include<bits/stdc++.h> using namespace std; #define INF 1e9 long long int cal(long long int b,long long int a) { &...
P5127
动态查找的问题 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int ...
P1478
喝饮料 题解:
MEGURI
#include <bits/stdc++.h> using namespace std; double suan(int x, int n){ int i, j...
P1292
字母统计 题解:
白米饭607
//注意!!!要专门处理一下最后一行没有换行符号 !!!找这个问题找了很久很久 #include <stdio.h> #include <vector> using namespace std; bool is_alpha(char c) { &n...
P1430
递归求阶乘 题解:
ZeroQi_404
#include <iostream> using namespace std; long long jiecheng(int n){ if(n == 1) return 1; return n * jiecheng(n - 1); } in...
P1414
回文字符串 题解:
xsw
#include<iostream> #include<algorithm> using namespace std; bool check(string s) { int n = s.size(); for(int i = 0; i <...
P8730
路径计数 题解:
lize1317
这题,用dfs百分百超时 本题求的是路径数,并且限制了只能向下走和向右走 首先考虑2x2的格子,对于右下角的格子,路径就是右->下和下->右,恰好就是前往终点格子上面与左边的路径之和 再考虑3x3的格子,发现前往最上边的任意格子或最左边的任意格子,路径都是只有一条...
P1002
数字统计 题解:
zzzx
#include<bits/stdc++.h> using namespace std; int counttwo(int x){ int ans = 0; string s = to_stri...
P1658
上楼梯 题解:
太一
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; in...
P1175
剩下的树 题解:
uly
#include <bits/stdc++.h> using namespace std; int main() { int L,M; while (cin >> L>>M) { int tree[L+1];...
P1259
进制转换2 题解:
StarGazer
#include<bits/stdc++.h> using namespace std ; int main(){ string s; while ...
1
2
我要提问
全站热榜
1
无法正确通过题目都是哪些原因造成的?
2
[置顶]计算机考研择校分析【25考研必读】
3
机试如何才能快速提高?
4
题目难点:数学公式不断化解
5
详细题解(站在巨人的肩膀上)
6
A+B问题 题解:C
7
逻辑很简单,但是实现却要小心多多
8
【25计算机考研】39所985院校录取分数线汇总
9
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
10
2048游戏 题解:简洁实现