E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
spaces
搜索与图论复习1
1深度优先遍历DFS2宽度优先遍历BFS3树与图的存储4树与图的深度优先遍历5树与图的宽度优先遍历6拓扑排序1DFS:#includeusingname
spaces
td;constintN=10;intn
KuaCpp
·
2025-02-03 01:09
图论
深度优先
算法
c++ list
end);//区间构造//list(n,elem);//元素构造//list(constlist&lst);//拷贝构造#include#include#include#includeusingname
spaces
td
飞yu流星
·
2025-02-03 01:38
c++学习笔记
c++
list
开发语言
C++ 交换变量的四种方法
请听题:#includeusingname
spaces
td;voidswap_variables(int&n,int&m);intmain(){intn,m;cin>>n>>m;
HASHMOTO
·
2025-02-03 01:06
编程
c++
算法
PAT 甲级 1093
发一下只是因为很喜欢《APT》#includeusingname
spaces
td;longlongintMOD=1000000007;intmain(){longlongintts=0,las=0,ans
金秋飞雪
·
2025-02-02 20:37
算法
c++
数据结构
pat考试
CSES-1640 Sum of Two Values
代码#includeusingname
spaces
td;intn,a[200001],m;mapflag;intmain(){ios::sync_with_stdio(0
edward1346
·
2025-02-02 18:46
算法
c++
洛谷 P8706 [蓝桥杯 2020 省 AB1] 解码
H3el5o2HHHellllloo#includeusingname
spaces
td;intmain(){stringn;cin>>n;getchar();for(inti=0;i='1'&&n[i]
Sonaldo7
·
2025-02-02 16:34
C++
学习
蓝桥杯
c++
c++揭秘2024春晚刘谦老师的魔术,快来看看吧
封面:源码:#include#include#includeusingname
spaces
td;structCard{intvalue;//用数字代表扑克牌,简化处理};//打印牌堆voidprintDeck
天若有情673
·
2025-02-02 12:09
c++
c++
开发语言
1057 数零壹
代码#include#include#includeusingname
spaces
td;intmain(){stringa;getline(cin,a);intlen=a.length();intt[26
Liu_Meihao
·
2025-02-02 10:55
算法
priority_queue的创建_结构体类型(重载小于运算符)c++
一个是用内置类型的方式,在priority_queue,less,把int改成结构体的名字就可以了,但此时就不能用less了,因为less默认是对内置类型使用的,如果less#includeusingname
spaces
td
h^hh
·
2025-02-02 07:26
算法
开发语言
c++
数据结构
【最大异或结点——Trie,创意】
题目代码#includeusingname
spaces
td;constintN=1e5+10,M=31e5+10;inttr[M][2],idx,e[M];//[maxn*maxb][changes]inta
Kent_J_Truman
·
2025-02-02 04:36
蓝桥杯
算法
【2024蓝桥杯/C++/B组/小球反弹】
目标2:求出Sx,Sy,再根据勾股定理求S代码#include//引入所有的标准库头文件usingname
spaces
td;//使用
Kent_J_Truman
·
2025-02-02 04:35
蓝桥杯
蓝桥杯
c++
C++练习(六)多态性与虚函数
#includeusingname
spaces
td;classBase{protec
子非愚
·
2025-02-01 23:37
C++练习
C++:爬楼梯问题,设有阶台阶需要攀登,每次只能上1阶或2阶,问共有多少种上台阶方案。程序输入为台阶数,输出为上台阶方案总数。
代码如下:#includeusingname
spaces
td;intlou(intx){if(x==1||x==2)returnx;elsereturnlou(x-1)+lou(x-2);}intmain
程序员东min
·
2025-02-01 22:33
c++
java
算法
C++学习——引用变量中易出现的错误
在C++学习中容易出现变量引用不恰当导致编译错误,先来看一段代码:#includeusingname
spaces
td;voidprintMessage(string&message){cout<
Ricky_One
·
2025-02-01 21:57
学习
c++
笔记
C++:多继承习题5
输出样例如下:代码如下:#includeusingname
spaces
td;classPoint{protec
程序员东min
·
2025-02-01 21:27
c++
开发语言
8647 实现图的存储结构
数据结构OJ第六章文章目录8647实现图的存储结构8647实现图的存储结构输入样例4412133441输出样例0110000000011000代码如下:#include#includeusingname
spaces
td
软工在逃男大学生
·
2025-02-01 20:49
SCAU_OJ_DS
算法
c++
c语言
数据结构
Codeforces Round 276 (Div. 1) B. Maximum Value(数学+二分)【2100】
我们发现k×busingname
spaces
td;#defineintlonglong#define
Auto114514
·
2025-02-01 20:13
ACM—数学
算法
牛客周赛 Round 65(A—G)
代码#includeusingname
spaces
td;#defineintlonglongtypedefpairpii;constintN=2e5+5,M=1e6+5;constintmod=1e9+
Auto114514
·
2025-02-01 20:13
牛客竞赛
算法
【暑期每日一题】洛谷 P5732 【深基5.习7】杨辉三角
题目链接:P5732【深基5.习7】杨辉三角-洛谷|计算机科学教育新生态(luogu.com.cn)题目描述给出n(nusingname
spaces
td;/*11112113311464115101051
AC_Dragon
·
2025-02-01 17:48
C++
模拟
递推公式
F. Greetings
题目链接:Problem-F-Codeforces题目大意:给你n个线段,求有多少对(两个)线段满足完全覆盖,例如:设一个线段有a,b两点,满足aiusingname
spaces
td;usingi64=
L_M_TY
·
2025-02-01 17:47
算法
归并排序
求逆序对
【深基5.习7】杨辉三角 洛谷
输入格式##输出格式##样例#1###样例输入#1```6```###样例输出#1```11112113311464115101051```提示二维数组+循环代表题目#includeusingname
spaces
td
暗影碎夜
·
2025-02-01 17:17
洛谷题解
算法
c++
开发语言
每日一题洛谷P5727 【深基5.例3】冰雹猜想c++
#includeusingname
spaces
td;intmain(){intn,m;ints[10000]={0};cin>>m;n=m;intcount=1;while(n!
wen__xvn
·
2025-02-01 17:15
洛谷
c++
算法
java
洛谷P5732 【深基5.习7】杨辉三角
输入格式无输出格式无输入输出样例输入:6输出:11112113311464115101051原代码:#includeusingname
spaces
td;inta[22][22]={};intmain()
"逸"狗当先的小逸
·
2025-02-01 16:13
算法
c++
C++实现二叉树
代码由三部分组成,1、声明二叉树结构体2、二叉树中插入数据3、中序遍历二叉树数据#includeusingname
spaces
td;//定义树结构体structTreeNode{intval;TreeNode
你又食言了哦
·
2025-02-01 15:27
c++
算法
开发语言
(动态规划基础 打家劫舍)leetcode 198
,回溯是给答案这里图片给出dfs暴力,再进行记录答案完成记忆化搜索,再转为dp数组#include#include#include//nums:2,1,1,2//dp:2,2,3,4usingname
spaces
td
维齐洛波奇特利(male)
·
2025-02-01 06:53
leetcode
算法
深度优先
(leetcode 213 打家劫舍ii)
(去掉头,去掉尾)分别求两个线性数组的最大值最后求这两个数组的最大值代码随想录视频#include#include#include//nums:2,1,1,2//dp:2,2,3,4usingname
spaces
td
维齐洛波奇特利(male)
·
2025-02-01 06:53
leetcode
算法
数据结构
(动态规划路径基础 最小路径和)leetcode 64
视频教程1.初始化dp数组,初始化边界2、从[1行到n-1行][1列到m-1列]依次赋值#include#include#includeusingname
spaces
td;intmain(){vector
维齐洛波奇特利(male)
·
2025-02-01 06:52
动态规划
leetcode
算法
C++:vector容器遍历方式
#include#include#include#includeusingname
spaces
td;//迭代器三种遍历方式voidMyprint(inte)//回调函数{coutv={1,2,3,4,5
在C++的海洋里挣扎
·
2025-02-01 06:51
c++学习笔记
【题单】3.二分法
二分法二分法算法讲解usingname
spaces
td;intn,m;intnums[1000005],num[100005];intmain(){cin>>n>>m;for(inti=0;i>nums
零零时
·
2025-02-01 02:16
算法
数据结构
c++
经验分享
笔记
学习
开发语言
C++顺序栈的出栈入栈
#includeusingname
spaces
td;typedefstructNode{intdata;//数据域structNode*pNext;//指针域}NODE,*PNODE;typedefstructStack
晚墨ning
·
2025-01-31 20:33
数据结构
c++
数据结构
栈
利用去雾算法实现低光增强
utm_id=0#include#include#include#include#include#includeusingnamespacecv;usingname
spaces
td;namespace{
mytzs123
·
2025-01-31 14:32
图像增强
算法
opencv
人工智能
再写01背包
#includeusingname
spaces
td;constintN=1e3+10;intf[N][N];inta[N],w[N];intmain(){intn,v;cin>>n>>v;for(inti
计信金边罗
·
2025-01-31 07:02
算法
c++
数据结构
约瑟夫问题(信息学奥赛一本通-2037)
【题解代码】#includeusingname
spaces
td;constintN=5e3+10;intnums[
Doopny@
·
2025-01-31 04:11
信息学奥赛一本通
算法
选择排序和冒泡排序
1.冒泡排序:#include#includeusingname
spaces
td;voidBubbleSort(vector&v){intn=v.size();for(inti=1;iv[j+1]){flag
午言若
·
2025-01-30 21:15
c++
c语言网 1127 尼科彻斯定理
输入格式任一正整数输出格式该数的立方分解为一串连续奇数的和样例输入13样例输出13*13*13=2197=157+159+161+163+165+167+169+171+173+175+177+179+181#includeusingname
spaces
td
Xzh0423
·
2025-01-30 20:40
算法
c++
数据结构
408数据结构_单链表的存储(带头结点)
准备工作#includeusingname
spaces
td;typedefintElemType;typedefstructLNode{ElemTypedata;structLNode*next;}LNode
释放:
·
2025-01-30 17:31
数据结构
算法
C++ — for循环
CCC++—forforfor循环代码譬如让程序输出0–31:累死#includeusingname
spaces
td;intmain(){cout<<0<<endl;cout<
niu1024
·
2025-01-30 11:48
C++
c++
每日一题洛谷P1720 月落乌啼算钱(斐波那契数列)c++
#include#include#includeusingname
spaces
td;intmain(){intn;scanf("%d",&n);doubleq=sqrt(5.0);doubleFn=(pow
wen__xvn
·
2025-01-30 03:47
洛谷
c++
算法
开发语言
信息学奥赛一本通:1062:最高的分数
【输入】输入两行,第一行为整数n(1#include#includeusingname
spaces
td;intmain(){i
阿耨多羅
·
2025-01-30 00:25
算法
c++
信息学奥赛一本通-1178-成绩排序 解答
【输入】第一行为n(0usingname
spaces
td;structnode{charname[30];inta;}c[30],b;intmain(){intn;inti,j;cin>>n
爆炒玛奇玛
·
2025-01-30 00:25
信息学奥赛一本通
c++
牛客周赛 Round 77 题解
文章目录A-时间表B-数独数组D-隐匿社交网络E-1or0A-时间表签到题#includeusingname
spaces
td;intmain(){inta[6]={20250121,20250123,20250126,20250206,20250208,20250211
free-9d
·
2025-01-30 00:53
数据结构
算法
贪心算法
启发式算法
人口增长(信息学奥赛一本通-1070)
1usingname
spaces
td;intmain(){doublex;intn;cin>>x>>n;for(inti=1;i<=n;i++){x*=1.001;}print
Doopny@
·
2025-01-30 00:23
信息学奥赛一本通
算法
洛谷P3383 【模板】线性筛素数
用到了线性筛法,其中原理是保证范围内的每个合数都被删掉(在bool数组里面标记为非素数),而且任一合数只被:“最小质因数×最大因数(非自己)=这个合数”下面奉上代码部分:#includeusingname
spaces
td
怀念无所不能的你
·
2025-01-29 19:15
洛谷数学1基础数学问题
算法
数论
C++11 for区间遍历:vector几种遍历方式
example:#include#include#includeusingname
spaces
td;intmain(){vectornum{3,7,1,7,9};//修改你正在迭代的容器的值,或者你想避免拷贝大的对象
小桥流水人家_
·
2025-01-29 18:08
C++
c++实现快速排序
#include#includeusingname
spaces
td;voidquickSort(vector&nums,intleft,intright){if(left>=right)return;intpivot_num
吴天德少侠
·
2025-01-29 14:03
c++
算法
数据结构
c++中的链表list
代码#include#includeusingname
spaces
td;intmain(){listlst{1,3,4,2};autoit=lst.begin();it++;//插入元素lst.insert
吴天德少侠
·
2025-01-29 13:58
c++
链表
list
1685: 【递归】n个数的全排列
输入格式第1行输入一个整数n(1usingname
spaces
td;intn,a[100001],b[10001],c[10001];voidfind(intk){if(k==n+1){for(intl
赵小小明
·
2025-01-29 06:08
算法
2178: 【递归】n个数的全排列
输入第1行输入一个整数n(1#include#includeusingname
spaces
td;intarr[12]={0};signedmain(){intn;cin>>n;for(inti=0;i>
(❁´◡`❁)Jimmy(❁´◡`❁)
·
2025-01-29 05:00
#
oj题解
算法
数据结构
C++:定义一个结构体变量(包括年、月、日),编写程序,要求输入年月日,程序能计算出该日在本年中第几天。注意闰年的问题。
输出样例如图所示:代码如下:#includeusingname
spaces
td;structdate{intyear,month,day;};intmain(){intyear,month,day;intsum
程序员东min
·
2025-01-29 00:45
c++
算法
开发语言
【C++】函数重载
1、参数类型不同#includeusingname
spaces
td;intAdd(intleft,intright){cout<<"intAdd(intleft,intright)"<
现在开始少说多做
·
2025-01-28 16:11
C/C++
c++
开发语言
c语言
运维
服务器
上一页
23
24
25
26
27
28
29
30
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他