首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
RingoCrystal
我是菜逼
关注
发消息
文章
0
题解
166
发帖
0
笔记
49
Ta的粉丝
68
关注数
0
粉丝数
68
获赞数
827
阅读数
50423
打印杨辉三角形 题解:dp方式
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ std::vector<vector<int&g...
P4922
2025年2月5日 15:06
回复 0
|
赞 2
|
浏览 324
二叉树的先序序列 题解:利用后续创建,先序输出
#include <bits/stdc++.h> using namespace std; struct tnode{ char val; struct tnode* left,* right; tnode(char val):val(va...
P4355
2025年2月5日 14:29
回复 0
|
赞 4
|
浏览 196
二叉搜索树 题解:效率不是很高,但是好理解
#include <bits/stdc++.h> using namespace std; struct tnode{ char val; tnode *left,*right; tnode():val(' '),left(nullptr)...
P1317
2025年2月4日 14:35
回复 0
|
赞 8
|
浏览 291
二叉树(北京邮电大学) 题解:先序建树,中序递归锁定
#include <bits/stdc++.h> using namespace std; struct tnode{ char val; tnode *left,*right; tnode():val(' '),left(nullptr)...
P1561
2025年2月4日 14:10
回复 0
|
赞 6
|
浏览 380
二叉树遍历2 题解:利用先序建树
#include <bits/stdc++.h> using namespace std; struct tnode{ char val; tnode *left,*right; tnode():val(' '),left(nullptr)...
P1401
2025年2月4日 14:04
回复 0
|
赞 4
|
浏览 313
谁是你的潜在朋友 题解:map vector联合
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m){ map<int,std::vec...
P1225
2025年2月3日 16:31
回复 0
|
赞 2
|
浏览 311
完数 题解:平方范围下判断,同时存储
#include <bits/stdc++.h> using namespace std; bool isPerfectNumber(int num,vector<int>&a) { vector<int>b; if ...
P1046
2025年2月3日 15:38
回复 0
|
赞 1
|
浏览 289
找最小数 题解:自定义比大小,利用cpp机制
#include <bits/stdc++.h> using namespace std; struct newInt{ int x,y; newInt():x(0),y(0){} newInt(int x,int y):x(x),y(y)...
P1374
2025年2月3日 15:23
回复 0
|
赞 0
|
浏览 246
最大公约数 题解:__gcd(int x,int y)
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; while(cin>>a>>b){ cout<<__gcd(a...
P1353
2025年2月3日 15:07
回复 0
|
赞 2
|
浏览 299
猴子吃桃 题解:函数很简单
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int a[n]; a[0]=1; ...
P1049
2025年2月3日 15:02
回复 0
|
赞 3
|
浏览 322
旋转矩阵 题解:三种操作,三个函数
#include <bits/stdc++.h> using namespace std; vector<vector<int>> op1(vector<vector<int>>a){ vector<vec...
P1221
2025年2月3日 14:51
回复 0
|
赞 20
|
浏览 451
最大连续子序列 题解:深度分析dp数组的本质及扩展条件
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ if(n==0){break;} int ...
P1334
2025年2月2日 15:36
回复 0
|
赞 18
|
浏览 496
石油储藏 题解:挖掘解决法
#include <bits/stdc++.h> using namespace std; //挖掘方向 vector<vector<int>> direction {{-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, ...
P1564
2025年2月2日 14:02
回复 0
|
赞 9
|
浏览 351
成绩排序 - 华科 题解:自定义排序函数
#include <bits/stdc++.h> using namespace std; struct SC{ string name; int age; int score; SC():name(""),age(0),scor...
P1404
2025年1月31日 10:18
回复 0
|
赞 10
|
浏览 305
采药 题解:经典01背包问题
#include <bits/stdc++.h> using namespace std; int main(){ int t,n; while(cin>>t>>n){ int dp[n+1][t+1]; ...
P1086
2025年1月31日 10:02
回复 0
|
赞 13
|
浏览 416
小偷的背包 题解:详细解释一下适配背包问题
适配背包问题有两种,第一种就是这种,不存在最优结果的适配问题,也就是我们只考虑能否放下的可能性是否存在,但是不考虑价值,第二种就是考虑价值的。 对于第一种的解法,其实很简单,我们只需要利用布尔型的背包解决即可,全部的情况就只有这几种,当前物品对于当前背包大小,能放入,则判定,这时候不需要...
P1123
2025年1月31日 09:45
回复 0
|
赞 17
|
浏览 476
剩下的树 题解:数组存一下
#include <bits/stdc++.h> using namespace std; int main(){ int l,m; while(cin>>l>>m){ int a[l]; ...
P1175
2025年1月31日 09:08
回复 0
|
赞 4
|
浏览 360
矩阵翻转 题解:直接打印
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int a[n][n]; for(int ...
P1134
2025年1月27日 18:03
回复 0
|
赞 8
|
浏览 885
斐波那契数列 题解:dp
#include <bits/stdc++.h> using namespace std; int main(){ int n; long long a[80]; a[0]=a[1]=1; a[2]=2; for(int...
P1111
2025年1月27日 17:58
回复 0
|
赞 7
|
浏览 454
十进制和二进制 题解:手工求模,求乘算模拟
#include <bits/stdc++.h> using namespace std; string decimalToBinary(string decimal) { string binary = ""; while (decim...
P1176
2025年1月27日 17:36
回复 0
|
赞 25
|
浏览 588
1
...
5
6
7
8
9
本科学校:中国药科大学
目标学校:河南大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!