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
ABC 398
假设当前在时刻i,对于第j(j#defineintlonglongusingname
spaces
td;constintN=2e5+5,INF=1e18;intT,n,r,c,cnt,ans,dx[N],
空雲.
·
2025-04-05 03:06
算法
【C++练习系列】选择排序的递归算法(c++)(有例题和详尽解析)
解决问题的代码:#includeusingname
spaces
td;voidsort(intx[],intn,intindex){if(index>=n-1)return;else{intmin=x[inde
在下_诸葛
·
2025-04-05 01:51
关于c++题目的代码与心得
c++
C++——排序算法代码实现
1.头文件&&结构体定义#include#includeusingname
spaces
td;#defineMaxLength500//定义最大长度typedefintElemType;typedefstructSqList
山有木兮°
·
2025-04-05 01:21
数据结构
排序算法
指针
蓝桥杯——统计子矩阵
解法:二维前缀和+双指针代码:#includeusingname
spaces
td;typedeflonglongll;llprefix[505][505],a[250010];intmain(){lln
六七_Shmily
·
2025-04-04 21:56
#C++
精选一百道题备赛蓝桥杯
蓝桥杯
矩阵
职场和发展
轴角与旋转矩阵、欧拉角与旋转矩阵、四元数与旋转矩阵的转换
一、轴角转换成旋转矩阵C++实现#include#include#define_USE_MATH_DEFINES#includeusingname
spaces
td;intmain(){doubletheta
jjm2002
·
2025-04-04 11:19
点云配准C++
矩阵
线性代数
点云配准
c++
Educational Codeforces Round 175 (Rated for Div.2)
#includeusingname
spaces
td;voidsolve(){intn;cin>>n;
nuo534202
·
2025-04-04 11:18
Codeforces
Contest
算法
图论
c++
数据结构
动态规划
c语言
Atcoder Beginner Contest 395
按照题意模拟#includeusingname
spaces
td;intmain(){ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr
nuo534202
·
2025-04-04 11:17
Atcoder
Contest
c语言
c++
算法
数据结构
3001:【例2.1】Hello World
#includeusingname
spaces
td;intmain(){cout<<"helloworld";return0;}
pkhyyds
·
2025-04-03 23:28
算法
C++进阶:动态库与静态库——类篇
.动态加载库静态库和动态库的创建和使用和上一篇文章(函数篇)相似,详细内容可以在那里看0.先创建几个文件simple.h文件内容:#include#include"simple.h"usingname
spaces
td
Warrior-K
·
2025-04-03 22:20
C++
c++
C++多继承
公有成员说明;protected:…;//保护的成员说明;};classD:publicA,protectedB,privateC{…//派生类中新增加成员};示例:#includeusingname
spaces
td
baobao1767640830
·
2025-04-03 14:34
C++学习总结
c++
如何通过数组创建二叉树ACM模式
我们其实可以想象一下二叉树这种数据结构,然后通过数组下标关系进行访问,可以有两种实现方式递归和非递归方式首先我们来一下递归方式创建普通二叉树#includeusingname
spaces
td;#includestructNode
www码农
·
2025-04-03 13:57
数据结构
c++
散列表
二叉树
C++练习题(二)
#includeusingname
spaces
td;intmain(){enumcolor{red,yellow,blue};inttemp,i,j;for(i=red;iusingname
虾米不打烊
·
2025-04-03 13:56
编程
c++
算法
c++练习题:排序后的位置
【问题描述】输入一行整数,输出每个整数排序后的位置【输入格式】第一行,整数n(0usingname
spaces
td;structnade{intdets;//数值intrank;//排名intindex
一偷老母猪
·
2025-04-03 12:22
c++
算法
数据结构
c++练习
File练习题,内部的FILE*描述符,改成int描述符#include#include#include#include#include#include#include#includeusingname
spaces
td
mNinGInG
·
2025-04-03 12:20
c++
算法
开发语言
根据方程组解,生成n个n元一次方程组
为了生成一个方程组,今天搓了一个利用增广矩阵进行操作#include#include#include#include#includeusingname
spaces
td;#defineMAX_SIZE200intvar_num
烨鹰
·
2025-04-03 08:50
c++
算法
开发语言
用两种遍历方法判断图中两点是否有路径
可以去自行了解和学习(下面是代码实践)可直接在自己主机测试#include#include#include#include#definenullNULL#definemax_n101usingname
spaces
td
SweetCode
·
2025-04-03 06:38
算法学习与进阶
指针
题目练习与进阶
图论
算法
c语言
c++
C++练习
Fifo类对象,实现2个终端之间互相聊天file.cpp#include#include#include#include#include#include#include#includeusingname
spaces
td
v维焓
·
2025-04-03 03:20
c++
算法
开发语言
[NOIP 1999 提高组] 导弹拦截
题目链接:线性DP代码(O(n^2)时间复杂度):#include#defineintlonglongusingname
spaces
td;constintN=1e5+10;intn=0;intarr[N
好好学习^按时吃饭
·
2025-04-02 21:12
动态规划
方格取数!!!
#includeusingname
spaces
td;intn,i,j,tmp,a,b;intpuz[20][20],dp[20][20][20][20];intmain(){scanf("%d",&n)
盈皓天
·
2025-04-02 20:35
算法
数据结构
动态规划
C++第12届蓝桥杯b组习题笔记
#include#includeusingname
spaces
td;intmain(){//请在此输入您的代码cout#includeusingname
spaces
td;intk;intn
悄悄敲敲敲
·
2025-04-02 18:17
算法
c++
蓝桥杯
牛客2025年愚人节比赛-A
A.Ausingname
spaces
td;intmain(){intn;cin>>n;if(n==1){cout=1;--i){cout<<i<<"";}return0
今天_也很困
·
2025-04-02 17:14
算法
c++
容器与虚拟机:云时代的底层架构博弈
一、架构与底层原理1.容器(以Docker/K8s为例)共享内核的进程级隔离:容器通过Linux命名空间(Name
spaces
)隔离进程、网
TechStack 创行者
·
2025-04-02 17:43
#
服务器容器
Linux
服务器
docker
KVM
ESXi
剑指Offer(数据结构与算法面试题精讲)C++版——day1
Offer(数据结构与算法面试题精讲)C++版题目一:整数除法题目二:二进制加法题目三:前n个数字二进制形式中1的个数题目一:整数除法 解法1:暴力法,直接连减:#includeusingname
spaces
td
Jerry说前后端
·
2025-04-02 15:01
每天三道算法题
c++
开发语言
day19-day21代码片段
1.1-n中某数字出现的次数#includeusingname
spaces
td;intgetNum(intn,intk){intx;intcount=0;if(n==0&&k==0)return1;for
月已满西楼
·
2025-04-02 15:28
c/c++
codeforces 617C
个花朵要使得所有花朵被覆盖,并使得R1*R1+R2*R2枚举每一个点到p1的距离,对于不在R1之内的点,计算其到R2的距离,并记录最大值,特殊考虑p1||p2覆盖所有点的情况#includeusingname
spaces
td
MQLYES
·
2025-04-02 09:19
Codeforces
一行输入多个数字且回车结束(c++)
#includeusingname
spaces
td;#includevoidtest01(){vectorarr;intn=0;while(cin>>n){arr.push_back(n);
NWJ_MP
·
2025-04-02 02:58
leetcode 2109. 向字符串添加空格 中等
给你一个下标从0开始的字符串s,以及一个下标从0开始的整数数组
spaces
。数组
spaces
描述原字符串中需要添加空格的下标。每个空格都应该插入到给定索引处的字符值之前。
圣保罗的大教堂
·
2025-04-02 01:49
leetcode
leetcode
不同路径 不同路径|| 整数拆分
#includeusingname
spaces
td;intfind(intm,intn){vector>dp(m,vector(n,0));for(inti=0;iusingname
spaces
td;intfind
默默修炼的小趴菜
·
2025-04-01 23:04
算法
c++
图论
蓝桥杯备考---》贪心算法之矩阵消除游戏
每次都更新行和列比如如图这种情况,这种情况就不如直接删除两行的多,所以本贪心策略有误so我们可以枚举选的行的情况,然后再贪心的选择列和最大的列来做#include#include#includeusingname
spaces
td
无敌大饺子 dot
·
2025-04-01 21:17
贪心算法
游戏
算法
C/C++蓝桥杯算法真题打卡(Day5)
一、P8772[蓝桥杯2022省A]求和-洛谷算法代码:#include//包含标准库中的所有头文件,方便编程usingname
spaces
td;//使用标准命名空间,避免每次调用标准库函数时都要加std
Exhausted、
·
2025-04-01 19:00
蓝桥杯
c语言
c++
蓝桥杯
洛谷P8716 [蓝桥杯 2020 省 AB2] 回文日期
题目链接:P8716[蓝桥杯2020省AB2]回文日期-洛谷通俗易懂,暴力即可#includeusingname
spaces
td;intn;boolflag=0;intda[13]={0,31,28,31,30,31,30,31,31,30,31,30,31
ovo
·
2025-04-01 19:30
蓝桥杯
c++
算法
数据结构
每日一题洛谷P8716 [蓝桥杯 2020 省 AB2] 回文日期c++
#includeusingname
spaces
td;boolDAY(intn){intyear=n/10000;intmonth=(n%10000)/1
wen__xvn
·
2025-04-01 19:29
蓝桥杯
洛谷
蓝桥杯
c++
算法
AtCoder 第399场初级竞赛 A~E题解
【难度】GESP二级【代码参考】#includeusingname
spaces
td;intmain(){strings1,s2;intn,ans=0;cin>>n>>s1>>s2;f
是帅帅的少年
·
2025-04-01 16:14
青少年编程比赛题解
算法
c++
AtCoder
c++中的sort函数的头文件及详细用法
函数有三个参数:第一个:排序数组的起始地址第二个:结束的地址第三个:排序方法(可不写,默认时是升序例一:sort函数没有第三个参数,默认实现为从小到大排序#include#includeusingname
spaces
td
枫子有风
·
2025-04-01 14:02
c++
开发语言
GESP202406 一级 立方数
核心部分:for(inti=1;i#defineintlonglongusingname
spaces
td;signedmain(){intn;cin>>n;for(inti=1;i<=
wanghonghui123
·
2025-04-01 13:52
c++
PTA团体程序设计天梯赛——L1-030 一帮一
c++代码实现:#include#includeusingname
spaces
td;structPeople{intgender;stringname;};intmain(){vectorstudents
commonbelive
·
2025-04-01 08:16
PTA
c++
C++匿名对象、编译器对拷贝构造和构造的优化等的介绍
匿名对象调用成员函数3.匿名对象具有常性二、编译器对拷贝构造和构造的优化总结前言C++匿名对象、编译器对拷贝构造和构造的优化等的介绍一、C++匿名对象1.匿名对象的生命周期#includeusingname
spaces
td
Farewell_me
·
2025-04-01 08:44
C++
c++
开发语言
匿名对象
编译器优化
蓝桥杯质数拆分
动态转移方程:dp[i][j]=dp[i-1][j]+dp[i-1][j-prime[i]]当jusingname
spaces
td;longlo
Mondayismyday
·
2025-04-01 06:26
c++
动态规划
动态规划
蓝桥杯--LCA1
,然后遍历跳过的点,假如a1,a2,a3,跳过2,那么答案就是sum-cost(a1,a2)-cost(a2,a3)+cost(a1,a3).DFS暴力,下面是代码:#includeusingname
spaces
td
CoCoa-Ck
·
2025-04-01 01:26
蓝桥杯
数据结构
算法
c++
图论
深度优先
猛攻大模拟day2!
但acwing上有更简洁得做法,决定学习一下find函数(服了何必写这个kmp呢)大小写转换还是一个个换吧没必要用高级函数(其实就是懒得背了)#includeusingname
spaces
td;constintN
想跑步的小弱鸡
·
2025-03-31 19:45
c++
猛攻大模拟day3!!
但是很多小细节,还是debug了很久,而且中间还卡在一个地方,因为写出了cout#include#include#includeusingname
spaces
td;mapper;map>role;map
想跑步的小弱鸡
·
2025-03-31 19:45
c++
算法
图论
蓝桥杯备考:贪心算法之最大字段和
先说,贪心策略,贪心策略就是我们从头开始选数,如果是正的说明对后面有贡献就继续往后加,如果是负的就舍弃这一段,从下一个开始往后加,#includeusingname
spaces
td;intsum;constintN
无敌大饺子 dot
·
2025-03-31 15:14
贪心算法
算法
2n皇后问题(蓝桥杯基础练习C/C++)
目录1问题描述2思路及代码:dfs嵌套,黑白皇后先后放3代码难点解释1问题描述2思路及代码:dfs嵌套,黑白皇后先后放#includeusingname
spaces
td;intmp[9][9];//初始化地图
菜只因C
·
2025-03-31 15:09
蓝桥杯软件类C/C++
蓝桥杯
算法
深度优先
c++
皇后
高精度除法(算法题)
具体代码如下(有详细注释和例子):#includeusingname
spaces
td;/*处理第1位4:t=0*10+4=4res添加4/3=1→[1]t更新为4%3=1处理第2位5:t=1*10+5=
祝我好运zwhyyyy
·
2025-03-31 14:06
算法
蓝桥杯—日期遍历
=0||n%400==0;代码实现//日期计算#includeusingname
spaces
td;intmonth[15]={0,31,28,31,30,31,30,31,31,30,31,30,31}
侯鑫爽
·
2025-03-31 11:45
蓝桥杯
算法
职场和发展
算法练习5
先写一个日期的类,然后根据每月的天数,将给出的n天进行减法,每减一次month++,当month==13时,month=1,year++,当n-当月的天数usingname
spaces
td;classdate
无敌的牛
·
2025-03-31 08:25
算法
算法
c++第一课(基础c)
2.char(字符)众所不周知,int是装不下字符(指字母、特定符号)类型的,这时候,需要char类型了举个栗子#includeusingname
spaces
td;intmain(){inta;return0
今晚打老虎
·
2025-03-31 05:05
c++
c语言
开发语言
c++(斗罗大陆2)
我把魂力等级更新到了31级#include#include#include#include#include#include#includeusingname
spaces
td;intqs=10;intxthl
今晚打老虎
·
2025-03-31 05:35
c++
开发语言
String类的模拟实现
1:需要模拟实现的string类函数#pragmaonce#include#include#includeusingname
spaces
td;namespacebit{classstring{friendostream
思麟呀
·
2025-03-31 03:17
c++
算法
开发语言
数组推导 ccf-csp 2021-9-1
代码#includeusingname
spaces
td;intmain(){intn;cin>>n;intb[101]={0};intsum=0;//最大值intdum=0;//最小值for
ahahahahaha2333
·
2025-03-30 22:48
ccf-csp(算法)
算法
c++
数据结构
上一页
12
13
14
15
16
17
18
19
下一页
按字母分类:
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
其他