首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
搜索
推 荐
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
数据结构 1074
有两个循环链表,链头指针分别为L1和L2,要求写出算法将L2链表链到L1链表之后
408King
回复 9+
|
赞 0
|
浏览 26.9k
p=L1;q=L2; while(p!=null){ p=p->next; } p->next=L2; while(q!=null){ q=q->next;} q->next=L1;
C语言 1121
有一分段函数,y=f(x),当x<5时,y=x-9;当x大于等于5且小于15时,
1262882661
回复 9+
|
赞 0
|
浏览 16.5k
#include<stdio.h> int main(){ int x,y; scanf("%d/n",&x); y=func(x); return 0; } int func(int x){ int y; if(x<5){ y...
P1393
矩阵转置 题解:C
hellokitty1679
回复 0
|
赞 6
|
浏览 1.8k
#include<stdio.h> int main(void) { int n; while(scanf("%d",&n)!=EOF) &n...
P1027
删除字符串2 题解:transform()函数+erase()函数(有坑)
FCC
回复 0
|
赞 2
|
浏览 754
#include <bits/stdc++.h> using namespace std; int main(){ string str, str1; cin >> str; str1 = str; int pos = 0; /*tolo...
P1829
希尔排序
JohnWang
回复 0
|
赞 4
|
浏览 6.8k
#include <iostream> using namespace std; void shellSort(int arr[], int n) { int gap = n / 2; while(gap >= 1) { for(int i = g...
同济大学
2019年双非二战上岸同济大学计算机初复试经验分享,Q&A,(很长的一篇经验帖)
18670099126
回复 0
|
赞 4
|
浏览 10.1k
这是一篇6000+字的经验贴,很长,希望点进来的你能耐心看完,希望对你有帮助呀~ Ⅰ.基本情况 首先介绍一下基本情况,大学毕业于某双非一本。由于各种原因未能保研,从来没有想过自己会考研,所以在保研失败后,才开始思考考研这个问题。9月中旬决定考研,选择了自己...
P1008
C++
光明守护神
回复 0
|
赞 3
|
浏览 802
#include<iostream> #include<string> using namespace std; int main() { int n; cin >> n; string s; while (n) { ...
P1106
排序2 题解:纯c
williams
回复 0
|
赞 14
|
浏览 942
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <string.h> int partition(int a[],int low,int hig...
P1832
字符串的差 题解:C
小王桐学
回复 0
|
赞 2
|
浏览 723
#include <stdio.h> #include <string.h> int main() { int i,j,flag; char s[1000],t[1000]; gets(s); gets(t); for(i = 0; i...
P1011
日期 题解:C
hellokitty1679
回复 0
|
赞 48
|
浏览 1.8k
#include<stdio.h> int day_count(int mon) { int d; switch(mon) { &...
P1811
解一元一次方程 题解:
倪克斯
回复 2
|
赞 9
|
浏览 384
为什么我这个只能过80%? 思路:分别计算等式左边的x系数l_x和常数l_n,右边x系数r_x和常数r_n。然后进行判断是否有解,若有解,res=(r_n-l_n)/(l_x-r_x)。 #include <iostream> #include <cstri...
P2009
温度转换计算 题解:
G517
回复 0
|
赞 5
|
浏览 594
很基础的一道 #include <stdio.h> int main(void) { double celsius; double fahrenheit; scanf("%lf", &fahrenheit); ...
P1233
P1233题解
ymw1836828452
回复 2
|
赞 1
|
浏览 10.8k
#include <stdio.h> #include <stdlib.h> int main() { int m,n,max,min,a[10]={0},b[10]={0},i=0,j=0,k,l,o=0; scanf("%d%d",...
P1290
日期差值 题解:分为两种情况 一种算年份一种不算年份
dongqing
回复 0
|
赞 2
|
浏览 1.1k
总体解决思路是算出当前日期在本年的第多少天,同一年可直接相减,不是同一年要再加上年份限制。注意加1. #include<bits/stdc++.h> using namespace std; struct node { int y,m,d;...
P1273
先排序 再输出
想想y总会怎么做
回复 0
|
赞 2
|
浏览 4.7k
思路:直接调用sort库函数将数组排序。 然后先输出下标为0的元素,之后再输出是先判断该元素与前一个元素是否相同,若不相等则输出,否则不输出。 C++代码 #include <iostream> #include <algorith...
北京航空航天大学
2021北航计算机学院上岸-专业课140、机试满分经验谈
Leonardo
回复 0
|
赞 2
|
浏览 42.2k
2021北航计算机学院上岸,专业课140+和机试满分经验谈 先介绍一下我自己的基本情况,本科是某985计算机专业科班,2021年应届生,初试380+,其中专业课140+,复试200+成功上岸。 数学、英语、政治这三门公共课已经有大量的经验贴,所以不多做赘述。 接下来主要从961专业课的...
P1020
最长连续因子 题解:排序大法
西电机试专家
回复 0
|
赞 4
|
浏览 201
#include <bits/stdc++.h> using namespace std; struct node{ int shi; int chang; }b[10001]; b...
数据结构
【2025年】408计算机统考真题模拟考试 - 第42题答案笔记
Enzo104
回复 0
|
赞 0
|
浏览 309
P1672
序列求平均 题解:
阿灿
回复 0
|
赞 3
|
浏览 179
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,tmp; int index; while(cin>>n>>m){ int t = n/m; ...
P1265
暴力打表(
lamda
回复 0
|
赞 8
|
浏览 5.6k
本题可采用打表的方式通过。(我是蒟蒻.jpg) 首先,输出所有八皇后问题的解。考虑到后续需要字典序,这里直接从0开始遍历。 #include<cstdio> using namespace std; int ans[8]={0}; int q=0; void...
P1081
猴子报数 题解:
wuyo
回复 0
|
赞 0
|
浏览 196
#include <iostream> #include <cstdlib> using namespace std; // 定义链表节点结构 struct node { int data; &n...
南开大学
2019南开大学计算机考研成功经验分享
deaoK
回复 0
|
赞 1
|
浏览 8.9k
距离复试已过一周,想想去年考研时受到很多很多学长学姐的帮助和指导,决定写下这一篇文章供各位参考,并预祝各位早日步入理想的学校。 个人情况: 初试:政治:65、英语二:71、数学:121、专业课:130; 复试:77,最后加权总成绩第五; 【初试篇】 一、政治、英语...
P2010
寻找二叉树的最后一层的最后一个结点 题解:
honevid
回复 0
|
赞 12
|
浏览 796
## 分析 - **注意第二个测试样例有毒,ABC##构不成先序序列,改成ABC####就好了** - 考察基本功,主要思路是根据带空树提醒的先序序列构建二叉树,然后输出层序遍历序列的最后一个元素 - 关于重建二叉树的思路可以参考我之前发的博文,链接如下: 【[6.二叉树—...
P1375
素数 题解:我才是真的暴力
阿灿
回复 0
|
赞 0
|
浏览 110
#include<bits/stdc++.h> using namespace std; int ans[306]={11,31,41,61,71,101,131,151,181,191,211,241,251,271,281,311,331,401,421,431,461...
P1979
股票交易(常规暴力和贪心) 题解:
Candour
回复 0
|
赞 8
|
浏览 313
常规 O(N^2): #include<bits/stdc++.h> using namespace std; const int N = 1e4 + 10; int n, a[N]; int main() { cin >> n; ...
P1209
如何在刷出一道墙中理解、设计前缀和数组
928上岸梦校!
回复 0
|
赞 17
|
浏览 1.5k
使用前缀和思想简化时间复杂度,设计前缀和数组,使输出的数组中元素的值代表其对应节点被刷的次数。 首先初始化前缀和数组,使每一个元素等于为0。 该题的巧妙之处就在于:对于每一个输入的索引B与E,B作为开始刷的节点索引令前缀和数组中对应元素的值+1,E+1作为刷墙结束的下一个节点的索引...
P1024
二元组整数 题解:
huanghu
回复 0
|
赞 6
|
浏览 937
#include <stdio.h> #include <algorithm> using namespace std; int main() { int n; scanf("%d", &n); int arr[n]...
P1394
统计单词(C++) 题解:
Candour
回复 0
|
赞 11
|
浏览 964
#include<bits/stdc++.h> using namespace std; string str; int main() { while(getline(cin, str)) { int cnt = 0; ...
P1903
字符串解析 题解:
18919717626
回复 0
|
赞 1
|
浏览 191
#include<iostream> #include<string> #include<sstream> #include<set> using namespace std; //aaabbcaaabaa int main(){ ...
P4777
二叉树叶结点的个数 题解:
LittleEleven
回复 0
|
赞 3
|
浏览 412
#include<bits/stdc++.h> using namespace std; int ans; int dfs(){ char ch; cin>>ch; ...
P1109
P1109 解题思路分享
杨德胜
回复 0
|
赞 2
|
浏览 10.6k
#include <bits/stdc++.h> using namespace std; typedef struct BinNode{ char e; struct BinNode* lchild; struct BinNode* rchild; }B...
P1474
大整数加法 题解:自用笔记(C语言)
zx142407789
回复 0
|
赞 1
|
浏览 774
#include<stdio.h> #include<string.h> #include<stdlib.h> void largeplus(char* s1, char* s2) { int len1 = strlen(s1); int ...
P1747
01背包变体,背包大小是时间总和的一半
zjx140
回复 0
|
赞 2
|
浏览 6.0k
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<int> d...
P1032
变位词 题解:先sort()排序再比较
遨游
回复 0
|
赞 6
|
浏览 1.1k
#include <iostream> #include <string> #include <algorithm> using namespace std; bool judge(string s1,string s2){  ...
P1062
c 简单二维数组实现
LianG_nnuo
回复 0
|
赞 1
|
浏览 4.5k
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #include<time.h> #include<malloc.h&g...
P1623
String to int 题解:希望大佬解释,为什么过不去验证,对于常规例子可
RingoCrystal
回复 2
|
赞 3
|
浏览 306
#include <bits/stdc++.h> using namespace std; int main() { string s; while (getline(cin, s)) { int i = 0, flag = 0...
P1177
查找学生信息 纯C题解:
qq1915133275
回复 0
|
赞 6
|
浏览 1.1k
#include<stdio.h> //两个数组,stu[i]表示学生i喜欢的书号,book[i]表示喜欢书i的人数 注意书号从1-m int main() { int n,m; wh...
P1040
利润提成 题解:
阿灿
回复 0
|
赞 13
|
浏览 379
#include<bits/stdc++.h> using namespace std; int main(){ double n,ans; while(cin>>n){ ans = 0; if(n<=100000) ans = n*0...
P1385
打牌
kas
回复 0
|
赞 5
|
浏览 4.8k
#include<iostream> #include<map> using namespace std; int main() { string a, b; map<int,...
P1004
句子正序 题解:用vector将每个单词存储再进行输出
18919717626
回复 0
|
赞 0
|
浏览 64
#include <iostream> #include <vector> #include <sstream> using namespace std; int main() { string sentence; ...
P1022
删除最大最小数 题解:易错点总结
孙某人
回复 0
|
赞 3
|
浏览 1.1k
#include <iostream> #include <string.h> #include <math.h> using namespace std; int main(){ int n; cin >>n; in...
数据结构
【2024年】408计算机统考真题模拟考试 - 第42题答案笔记
admin
回复 0
|
赞 0
|
浏览 86
123 321 1234567
P1174
大阶乘超详细解析
blackevil
回复 1
|
赞 3
|
浏览 3.9k
用整型数组来保存大阶乘结果。 原理:因为根据乘法的原理两个数相乘,这样可以保证每次相乘的数能够被int容纳下 (假设都是三位整数)可以看作a分别乘上b的个位,然后只保留结果的个位赋给数组,将剩余的前面的所有位赋给进位数 ,然后将a乘上b的十位,并将刚才各位进位的数加上这次的结...
P1565
最短路 (朴素Dijkstra)题解:
Candour
回复 0
|
赞 9
|
浏览 398
稠密图用朴素Dijkstra算法,用链式前向星存储图 #include<bits/stdc++.h> using namespace std; const int N = 110; int g[N][N]; int dist[N]; boo...
P1161
二叉树遍历 题解:大佬,帮我看看,我这个怎么不对啊。
张会老儿
回复 2
|
赞 4
|
浏览 927
#include<bits/stdc++.h> using namespace std; # typedef struct node{ char data; struct node *lchi...
P1348
百鸡问题 题解:鸡你太美
西电机试专家
回复 0
|
赞 21
|
浏览 392
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin&g...
P1856
烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫烫解决方案
13574856643
回复 0
|
赞 5
|
浏览 4.4k
#include <stdio.h> #include<string.h> #include<iostream> using namespace std; int main() { char a[50], b[...
P3501
回文数的判断 题解:reverseInt方法
RingoCrystal
回复 0
|
赞 4
|
浏览 304
#include <bits/stdc++.h> using namespace std; int reverseInt(int x){ int ans=0; while(x!=0){ ans*=10; ans+=...
P1542
这题不严格按照10位,投机取巧不行,直接find找分割
GENARDING
回复 0
|
赞 2
|
浏览 191
#include <bits/stdc++.h> using namespace std; bool isleap(int year) { // 判断是否是闰年 if ((year % 4 == 0 && year % 100 != ...
P1014
加密算法 题解:灵活使用模运算
tofu
回复 0
|
赞 19
|
浏览 444
#include <iostream> #include<string> using namespace std; int main(){ string str; getline(ci...
P1478
贪心
阔赛英
回复 0
|
赞 1
|
浏览 3.7k
#include <iostream> #include <algorithm> using namespace std; struct Drink { double mi, wi;//毫升,价格 } dri[1024]; bool ...
P2006
字符串对齐 题解:C语言
ASDF807
回复 0
|
赞 1
|
浏览 166
#include<stdio.h> #include<string.h> int main() { int n; scanf("%d",&n); &nbs...
1
2
我要提问
全站热榜
1
无法正确通过题目都是哪些原因造成的?
2
机试如何才能快速提高?
3
题目难点:数学公式不断化解
4
[置顶]计算机考研择校分析【25考研必读】
5
逻辑很简单,但是实现却要小心多多
6
A+B问题 题解:C
7
1017 幂次方 快速幂模板
8
日期 题解:
9
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
10
负二进制 题解: