摘要: 1.Tomcat eclipse调试,有时候需要先运行再加断点再前台访问 阅读全文
posted @ 2024-11-14 09:36 lijunjie03 阅读(14) 评论(0) 推荐(0)
摘要: 如下图所示的一棵二叉树的深度、宽度及结点间距离分别为: 深度:4 宽度:4(同一层最多结点个数) 结点间距离: ⑧→⑥为8 (3×2+2=8) ⑥→⑦为3 (1×2+1=3) 注:结点间距离的定义:由结点向根方向(上行方向)时的边数×2, 与由根向叶结点方向(下行方向)时的边数之和。 输入格式 输入 阅读全文
posted @ 2023-05-13 11:57 lijunjie03 阅读(46) 评论(0) 推荐(0)
摘要: 题目描述 农夫约翰非常认真地对待他的奶牛们的血统。然而他不是一个真正优秀的记帐员。他把他的奶牛 们的家谱作成二叉树,并且把二叉树以更线性的“树的中序遍历”和“树的前序遍历”的符号加以记录而 不是用图形的方法。 你的任务是在被给予奶牛家谱的“树中序遍历”和“树前序遍历”的符号后,创建奶牛家谱的“树的 阅读全文
posted @ 2023-05-13 11:56 lijunjie03 阅读(35) 评论(0) 推荐(0)
摘要: 方法一: #include <iostream> #include <queue> using namespace std; //排序模拟,tle做法 int now1[100000],now2[100000]; int main() { int n; priority_queue<int,vect 阅读全文
posted @ 2023-04-19 22:44 lijunjie03 阅读(55) 评论(0) 推荐(0)
摘要: 方法一: #include <iostream> #include <queue> #include <vector> using namespace std; //究极愚蠢queue+vector模拟 tle int main() { queue<int>a; int N,M,judge,k,x; 阅读全文
posted @ 2023-04-19 22:39 lijunjie03 阅读(28) 评论(0) 推荐(0)
摘要: 第一种方法:数组10^5*10^5 超范围 第二种方法:vector(mle) //较麻烦,并且通过不了hack,需要手动搜索查询 #include <iostream> #include <vector> using namespace std; int n,p,judge,num1,num2,k 阅读全文
posted @ 2023-04-19 22:27 lijunjie03 阅读(32) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int N,m,A[5000005]; //用scanf,printf卡常 template <class T> void sift(T a[],int k,int m){//换位,假设左右结点已排好序 int i=k 阅读全文
posted @ 2023-04-19 22:05 lijunjie03 阅读(35) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int N,m,A[5000005]; //用scanf,printf卡常 template<class T> void QuickSort(T a[],int first,int end){ int i=first, 阅读全文
posted @ 2023-04-19 21:49 lijunjie03 阅读(37) 评论(0) 推荐(0)
摘要: #include <iostream> #include <stack> using namespace std; int q,n,a[100000],b[100000],num; int main() { cin>>q; stack<int>s; for(int j=0;j<q;++j){ cin 阅读全文
posted @ 2023-04-19 21:39 lijunjie03 阅读(54) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> #include <queue> using namespace std; int k,d,m,f,q,a,b,c,tmp; double ans; int main() { cin>>k>>d>>m>>f; prio 阅读全文
posted @ 2023-04-19 21:32 lijunjie03 阅读(23) 评论(0) 推荐(0)