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
NameSpaces
C++STL之map的使用详解
简介:map底层实现为红黑树,增删查的时间复杂度:O(logn),key是有序的,默认升序一、初始化#include#include#includeusing
namespaces
td;intmain()
小菜鸡的蜕变之路
·
2024-08-27 04:24
STL读书笔记
c++
stl
算法
C++设计模式4:发布-订阅模式
#include#includeusing
namespaces
td;classObserver{publ
咩咩大主教
·
2024-08-27 04:49
设计模式
c++
设计模式
开发语言
c语言
发布订阅模式
观察者模式
监管者模式
C++设计模式5:装饰器模式
#includeusing
namespaces
td;classCar{public:Car(){}~Car(){}virtualvoidshow()=0;};classAudi:publicCar
咩咩大主教
·
2024-08-27 04:49
设计模式
c++
设计模式
装饰器模式
c语言
开发语言
结构型模式
C++创建不定长数组并求连续子数组最大和/排序
在C++中使用Vector类模板生成不定长数组是非常方便的,配合push_back使用#include#include#include"algorithm"using
namespaces
td;intMaxSubSum
FantasyJXF
·
2024-08-27 01:05
C++
C++
笔试
算法
排序
最大子段和
代码随想录第21天:669. 修剪二叉搜索树、108.将有序数组转换为二叉搜索树、538.把二叉搜索树转换为累加树
669.修剪二叉搜索树//669.修剪二叉搜索树#include#includeusing
namespaces
td;structTreeNode{intval;TreeNode*left;TreeNode
淦,又报错了
·
2024-08-26 18:07
算法
数据结构
D. Water Tree
模板题#include#includeusing
namespaces
td;constintN=5e5+9;intn;//树剖//1.转成线性部分vectore[N];voidadd(intu,intv)
Lanthanmum
·
2024-08-26 14:41
算法
数据结构
const & constexpr
const主要在于:只读constexpr顾名思义常量表达式:常量1)只读|常量#include#includeusing
namespaces
td;voiddis_1(constintx){arraymyarr
DongDongBaJiaYou
·
2024-08-26 13:40
C++
c++
P10984 残缺的数字 题解
【代码】#includeusing
namespaces
td;strings[20]={{"1111110"},{"0110000"},{"1101101"},{"1111001"},{"0110011"
隐曜日星
·
2024-08-26 10:44
题解
算法
C++编程-高精度算法2(上期标准程序)
标准程序第一题#include#includeusing
namespaces
td;inta[100000],n,i,y,xy[100000];intmain(){cin>>n;a[0]=1;a[1]=1
C-DHEnry
·
2024-08-26 10:13
信息学奥赛一本通
算法
编程题目/题解/算法
c++
算法
开发语言
全排列-递归
代码#include#includeusing
namespaces
td;voidswap(char*p,char*q){chartemp=*p;*p=*q;*q=temp;}v
qq_187352634
·
2024-08-26 05:19
C++
算法
c++
全排列-递归
[Algorithm][综合训练][比那名居的桃子][chika和蜜柑][礼物的最大价值]详细讲解
礼物的最大价值1.题目链接2.算法原理详解&&代码实现1.比那名居的桃子1.题目链接比那名居的桃子2.算法原理详解&&代码实现自己的版本:暴力解法-->超时37.5%#include#includeusing
namespaces
td
DieSnowK
·
2024-08-26 05:48
[OJ]
#
[综合训练]
算法
Algorithm
综合训练
比那名居的桃子
chika和蜜柑
礼物的最大价值
详细讲解
c++中的iomanip
c++中的iomanip进制控制输出格式控制进制控制头文件includehexdecoctinta=10,b=20,c=0xfff;cout#includeusing
namespaces
td;intmain
qq_187352634
·
2024-08-26 05:45
C++
c++
c++中的iomanip
栈操作c++
输入格式第一行,一个整数(using
namespaces
td;stacks;intmain(){intn;intx,op;
2013Li Ziqi
·
2024-08-25 22:34
算法
数据结构
Codeforces Round 938 (Div. 3)A-C,E-H
题目链接A.YogurtSale贪心的选两个物品价格少的,若总个数为奇数再加是单个价格代码:#include#definelllonglongusing
namespaces
td;voidsolve(){
青衫酒145
·
2024-08-25 21:25
c语言
算法
c++
1028 List Sorting (25 分)
代码#includeusing
namespaces
td;intn,c;structNODE{intno;stringname;intscore;};intcmp1(NODEa,NODEb){if(c==
小鱼朵~
·
2024-08-25 14:16
#
排序相关
排序
c++ dfs部落卫队题解
3代码:#include#include#includeusing
namespaces
td;intn,m;intcd[105][105]={0},rs2[105]={0},rs3[105]={0},max1
清鲨
·
2024-08-25 12:06
c++2道经典DFS题目题解
输入一行两个自然数n、r(1using
namespaces
td;inta[25];intn,r;voiddfs(intk){if(k>r){for(inti=1;i>n>>r;dfs(1);return
清梦123456
·
2024-08-25 12:34
算法
深度优先
c++
算法
dfs
用OPENCV C++ 代码实现 检测图片是否有马赛克
下面是使用OpenCV对图像进行均值滤波的示例代码:#include#includeusingnamespacecv;using
namespaces
td;intmain(intar
南风寺山
·
2024-08-25 04:10
opencv
c++
计算机视觉
人工智能
图像处理
KTCP 通信
本库旨在简化c++服务端与客户端之间的tcp通信流程,简化了代码并实现了跨平台使用,即实现了不同平台一套代码服务端代码示例:#include"TCP.h"#includeusing
namespaces
td
ktboEmax
·
2024-08-25 03:38
KTCP
c++
tcp/ip
服务器
信息与通信
opencv实现图像腐蚀(C++)
#include#include#includeusingnamespacecv;using
namespaces
td;intmain(){MatsrcImage=imread("C:\\Users\\Desktop
jiakii2106
·
2024-08-25 03:07
opencv学习代码
CCF-CSP 202303-1 田地丈量 100分
原题链接:CCF-CSP202303-1田地丈量#includeusing
namespaces
td;intmain(){intn,a,b;cin>>n>>a>>b;longlongsum=0;while
自信的小螺丝钉
·
2024-08-25 03:03
CCF-CSP
C++
csp
新初二暑假集训练习—二分算法(8.22)7. 伐木工小明
题目描述有N棵树,第i棵树的高度为h[i]米(1using
namespaces
td;intmain(){intN,M;cin>>N>>M;inth[N];for(inti=0;i>h[i];}intleft
是真心kyoto
·
2024-08-25 02:30
算法
数据结构
牛客小白月赛99
intx;vectordp(n);dp[0]=0;dp[1]=1;mapm;for(inti=2;i#defineendl'\n'#definepiipair#defineintlonglongusing
namespaces
td
segment_tree1
·
2024-08-25 01:56
算法
算法
040:统计数字字符个数
样例输入PekingUniversityissetupat1898.样例输出4代码#include#includeusing
namespaces
td;intmain(){charline[256];in
Lyn谷神不死
·
2024-08-24 23:02
C++primer plus 第四章编程练习
善用Ctrl+shift+C和Ctrl+shift+X快捷键如有任何错误或疑问,欢迎留言//4.1//#include//#include//#include//intmain()//{//using
namespaces
td
树不懒
·
2024-08-24 23:44
学习历程
C++primer
plus
C++ Primer Plus 第六版 第四章练习答案
#include#includeusing
namespaces
td;//practice4.1voidp4_1(void){stringfirst;char*last=newchar;intage;chargrade
Raywit
·
2024-08-24 23:12
#
C++_Prime_Plus
【C++】匿名对象知识点
#define_CRT_SECURE_NO_WARNINGS1#includeusing
namespaces
td;classSolution{public:intSum_Solution(intn){/
小wanga
·
2024-08-24 23:41
C++
c++
【数据结构】BF和KMP算法
BF算法#includeusing
namespaces
td;//#include//字符串处理#defineMAXSIZE255//串的定长顺序存储结构typedefstruct{charch[MAXSIZE
小南知更鸟
·
2024-08-24 19:49
数据结构
算法
数据结构
c++
C#基础:父类 = new 子类() 的效果和作用
代码如下:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;
namespaceS
tudentClassExample{publicclassSon
我是苏苏
·
2024-08-24 19:48
C#基础
servlet
没用的C++程序
include#include#include#include#include#defineS(i)Sleep(i)#defineclssystem("cls");#defineeielseifusing
namespaces
td
WHSTU666
·
2024-08-24 17:39
c++
无限挖掘
1:0)using
namespaces
td;intm[10001][21];structnode{intxx,yy,Zhong,rr,mr;}B[100001];intK,X,Y,tX,tY,tY2,tT
张洋(我还是个小学生)
·
2024-08-24 15:27
c++小游戏
c++
1090:含k个3的数
1090:含k个3的数时间限制:1000ms内存限制:65536KB提交数:113534通过数:58421【题目描述】输入两个正整数m和k,其中1using
namespaces
td;intmain(){
yuhaoteng666
·
2024-08-24 14:51
一本通答案
c++
STL案例-评委打分
#includeusing
namespaces
td;#include#include#includeclassPerson{public:Person(stringname,intscore){this
程序猿练习生
·
2024-08-24 11:05
c++
c++
算法
开发语言
走迷宫c++代码初二练习
题目描述给定一个N*M方格的迷宫(1using
namespaces
td;typedeflonglongll;boolvis[6][6],s[6][6];intn,m,sx,sy,fx,fy,t;intnum
是真心kyoto
·
2024-08-24 08:41
c++
c++
算法
开发语言
P3369 【模板】普通平衡树
[题目通道](【模板】普通平衡树-洛谷)#includeusing
namespaces
td;constintmaxn=1e7;#defineintlonglongstructnode{intl;intr
浚浚的二师兄
·
2024-08-24 06:56
算法
c++
数据结构
Kubernetes 清理资源常用的 Kubernetes 清理命
清理特定状态的Pod:清理Evicted状态的Pod:kubectlgetpods--all-
namespaces
-owide|grepEvicted|awk'{print$1,$2}'|xargs-L1kubectldeletepod-n
学海无涯码代码
·
2024-08-24 03:09
kubernetes
容器
云原生
最长回文子序列
提示:区间dp#include#includeusing
namespaces
td;intf[2005][2005];chars[2005];intmain(){memset(f,0x3f,sizeoff
玄湖白虎
·
2024-08-24 03:08
算法
YACS
打印网格(while and for)(if……)
#includeusing
namespaces
td;intmap_n,map_m;signedmain(){cin>>map_n>>map_m;intp=map_n;while(
玄湖白虎
·
2024-08-24 03:36
算法
c++
YACS
cf967
A#includeusing
namespaces
td;voidsol(){intn;cin>>n;inta[n+10];for(inti=1;i>a[i];intma=0;mapmp;for(inti=
c沫栀
·
2024-08-24 03:34
算法
c++
数据结构
【编程基础】亲密数对
输入只有一行,为一个整数N(2#includeusing
namespaces
td;inthe(intn){inti,s=0;for(i=2;i>n;for(i=1
wr168.c++
·
2024-08-24 02:28
算法
开发语言
深度学习 string 类之模拟实现一个 string 类(C++)
string类的理解关于string类的详细讲解参考博文:面向对象程序设计(C++)之String类1.构造与析构函数string类中的构造函数通常有无参与带参构造,这里我们都进行实现并且整合优化using
namespaces
td
ZZZ_O^O
·
2024-08-23 21:00
面向对象程序设计(C++)
c++
开发语言
深度学习
string类
C++初学(12补充)
12、类型组合#includestructantarctica_years_end{intyear;};intmain(){using
namespaces
td;antarctica_years_ends01
Mueisya
·
2024-08-23 21:00
c++
c++
java
开发语言
第十七章 17.3.2节练习
解答:#include#include#includeusing
namespaces
td;intmain(){stringpattern("c[ei]");pattern="[[:alpha:]]*"+
听枫烨阁
·
2024-08-23 18:13
C++
primer
5ed
c++
习题
(C++)类内运算符重载时:此运算符函数的参数太多/少
如果参数过多:方法一:利用全局函数类外实现;方法二:利用友元类内实现#includeusing
namespaces
td;#includeclassperson{public:person(inta,intb
小鹿( ﹡ˆoˆ﹡ )
·
2024-08-23 04:16
c++
开发语言
后端
通过dijkstra算法解决城堡问题
如果所有的通道都被修建.设D[i]为第i号房间与第1号房间的最短路径长度;而S[i]为实际修建的树形城保中第i号房间与第1号房间的路径长度;要求对于所有整数i(1#include#includeusing
namespaces
td
likepandas
·
2024-08-23 03:39
算法
贪心算法
分别用c/c++ python java输出九九乘法表
c/c++#includeusing
namespaces
td;#definelllonglong#defineendl'\n'intmain(){for(inti=1;i<=9;i++){for(intj
X_StarX
·
2024-08-22 20:29
c语言
c++
python
java
开发语言
C++设计模式——原型(Prototype)模式
#includeusing
namespaces
td;namespace_SlayTheSpire{classMonster{public:Monster(intm_hp,
HUGOPIGS
·
2024-08-22 19:20
设计模式
设计模式
c++基础——打印九九乘法表
直接coutusing
namespaces
td;/**使用双重for循环输出九九乘法表*外层循环控制行数*内层循环控制每一行的列数*九九乘法表每一行的列数与行数相同*/intmain(){introw;
洛尘渊.
·
2024-08-22 19:50
c++
visual
studio
code
派对dfs
Matrix67举办的派对共有N(1using
namespaces
td;intn,k,h[15],ans,a[15];boolb[15];voiddfs(intd){//printf("%d\n",d)
no_play_no_games
·
2024-08-22 13:45
dfs深搜
深度优先
算法
图论
c++
P2016 战略游戏
[题目通道](战略游戏-洛谷)#includeusing
namespaces
td;intn,f[5000][5000],father[5000];vectors[5000];inlinevoiddfs(
浚浚的二师兄
·
2024-08-22 12:09
游戏
上一页
28
29
30
31
32
33
34
35
下一页
按字母分类:
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
其他