首页
DreamJudge
院校信息
考研初试
机试真题
兑换中心
登录
注册
上岸
leo110
这个人很懒,什么都没有写...
关注
发消息
文章
0
题解
17
发帖
0
笔记
0
Ta的粉丝
0
关注数
0
粉丝数
0
获赞数
8
阅读数
1521
百鸡问题 题解:
#include<iostream> #include<vector> #include<algorithm> using namespace std; //提高时间复杂度的代价就是牺牲空间复杂度来排序 //加速为O(n2),不加速则是...
P1348
2025年5月30日 17:30
回复 0
|
赞 0
|
浏览 28
后缀子串排序 题解:字符串切片+vector
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; void StrSort(const str...
P1294
2025年5月30日 14:21
回复 0
|
赞 0
|
浏览 33
二叉树的建立和遍历 题解:只看题注,没看输出要求,所以把二叉树的相关功能几乎都写了
#include<iostream> #include<string> #include<queue> #include<vector> #include<algorithm> using namespace std; ...
P1109
2025年5月18日 15:47
回复 0
|
赞 1
|
浏览 141
括号匹配 题解:
//1067题的代码稍微改一点就行。主要两点不同:①只有两个类型的括号②括号没有优先级 //解题思路:map映射字符为整数,结合数据结构的stack进行括号匹配。 #include<iostream> #include<map> #include&l...
P1501
2025年5月17日 16:11
回复 0
|
赞 0
|
浏览 81
括号的匹配 题解:"{{}}"这种平级括号内嵌也行!!!
//解题思路:map映射字符为整数,结合数据结构的stack进行括号匹配。 #include<iostream> #include<map> #include<stack> using namespace std; map<c...
P1067
2025年5月17日 15:58
回复 0
|
赞 0
|
浏览 113
二叉树遍历 题解:
#include<iostream> using namespace std; typedef struct node{ char data; struct node *lchild...
P1161
2025年5月16日 16:43
回复 0
|
赞 3
|
浏览 66
链表合并 题解:只为锻炼手搓链表以及合并链表,代码越长就越容易出一些小问题,因此一定要细心
#include<iostream> using namespace std; struct Node{ int data; struct Node *next; }; struct N...
P1025
2025年5月16日 14:27
回复 0
|
赞 0
|
浏览 82
删除最大最小数 题解:
#include #include #include using namespace std; pair delemm(const vector& a){ int min= *min_element(a.begin(),a.end()...
P1022
2025年5月16日 13:33
回复 0
|
赞 0
|
浏览 84
求S(n) 题解:二项展开(3a+b)的5次幂对3的余=b的5次幂%3
#include<iostream> #include<cmath> using namespace std; typedef long long ll; int main(){ ll n; &nbs...
P1500
2025年5月14日 16:00
回复 0
|
赞 0
|
浏览 82
水仙花数 题解:
#include<iostream> #include<cmath> using namespace std; int flag=0; void narcissus(int n){ int tmp=n,ans(0)...
P1034
2025年5月13日 20:29
回复 0
|
赞 0
|
浏览 87
日期计算 题解:先计算第几天然后判断输入合不合法
#include<iostream> using namespace std; int f[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; struct date{ int year,m...
P1051
2025年5月12日 21:17
回复 0
|
赞 0
|
浏览 110
字符棱形 题解:字符串切片解决
#include<iostream> #include<iomanip> #include<string> using namespace std; string str="*******************************...
P1473
2025年5月12日 18:10
回复 0
|
赞 0
|
浏览 101
进制转换3 题解:map+vector解决
/*(1)没注意到提示里的要求字母输出小写,于是正确率只有60 (2)更正(1)后能达到80,但是翻来覆去没想到错误点在哪,可能这就是小会员的悲哀,看不到数据 最后死马当活马医改中间过渡变量tmp类型为longlong,以后整型数据一律定义为longlong了 解题思路:map字典,用字...
P1422
2025年5月12日 16:46
回复 0
|
赞 2
|
浏览 100
随机数 题解:无语!一直以为求5位随机数的和与剩下15位的和
#include<iostream> #include<time.h> using namespace std; int main(){ int a[21]={0},sum,index,count=0; &...
P1009
2025年5月10日 14:10
回复 0
|
赞 0
|
浏览 104
删除字符串2 题解:思路:先转换成小写,找到位置后把原字符串的对应位置置为空格,再模仿cin输入流,将多个字符串拼接
#include<iostream> #include<string> #include<vector> #include<sstream> using namespace std; //思路:先转换成小写,找到位置后把原字符串的对应位...
P1027
2025年5月8日 13:31
回复 0
|
赞 0
|
浏览 120
字符移动 题解:利用两个char向量来完成
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(){ &nb...
P1012
2025年5月7日 14:11
回复 0
|
赞 0
|
浏览 89
单链表 题解:只为锻炼手搓单链表和相关功能
#include<bits/stdc++.h> using namespace std; struct Node{ int Element; struct Node *Next; }; ...
P1015
2025年5月3日 17:49
回复 0
|
赞 2
|
浏览 100
本科学校:保密
目标学校:东南大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!