首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
emoji
这个人很懒,什么都没有写...
关注
发消息
文章
0
题解
7
发帖
0
笔记
0
Ta的粉丝
0
关注数
0
粉丝数
0
获赞数
39
阅读数
1549
二叉树 题解:
观察可知,i节点的父节点是i/2,由此可知可以通过除以2的方法求父节点 #include<iostream> using namespace std; int main(){ int a,b; while(cin>>a>>b){ ...
P1233
2025年3月20日 21:13
回复 0
|
赞 2
|
浏览 127
二叉树遍历 题解:难点在于题目输入的字符串最后‘#’不够,导致没做完树,没有返回
在这里借鉴了大佬们的全局变量想法,设置全局变量char s[100]和int a,主要作用是当输入 '\0'时,自动为没建好的树叶节点全部为NULL。 #include<iostream> #include<string> using na...
P1161
2025年3月20日 21:04
回复 0
|
赞 17
|
浏览 330
遍历链表 题解:vector和链表
#include<iostream> #include<algorithm> #include<vector> using namespace std; //先用vector秒杀 /* int main(){ int n,temp...
P1405
2025年3月19日 21:27
回复 0
|
赞 4
|
浏览 114
链表合并 题解:链表卡40分钟,用vector直接秒杀。。。
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int>v; int n,m,te...
P1025
2025年3月19日 20:51
回复 0
|
赞 0
|
浏览 117
查找学生信息 题解:
还得是map简单 #include<iostream> #include<map> #include<utility> using namespace std; int main(){ int n,m; int a[200]={0}...
P1177
2025年3月18日 20:24
回复 0
|
赞 4
|
浏览 317
查找学生信息2 题解:
初次使用map,真滴好用!!! #include<iostream> #include<map> #include<string> #include<iomanip> using namespace std; struct...
P1476
2025年3月18日 19:38
回复 0
|
赞 9
|
浏览 319
日期差值 题解:
#include<stdio.h> const int x[12]={31,28,31,30,31,30,31,31,30,31,30,31}; const int y[12]={31,29,31,30,31,30,31,31,30,31,30,31}; typede...
P1290
2025年3月12日 15:37
回复 0
|
赞 3
|
浏览 225
本科学校:贵州大学
目标学校:贵州大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!