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
六度空间(C++)
目录题目:输入、输出格式:代码:运行结果:题目:输入、输出格式:代码:#include#includeusingname
spaces
td;intg[10005][10005];floatn,k;typedefstructnode
取名真难.
·
2023-11-11 19:54
算法
c++
图论
数据结构
畅通工程之局部最小花费问题 (C++)
代码:#include//无向图邻接矩阵#include#include#definemvnum1005usingname
spaces
td;typedefintVertextype;//顶点数据类型mapmp
取名真难.
·
2023-11-11 19:21
c++
图论
算法
c++std::declval函数模板详解
#include#includeusingname
spaces
td;templat
酸菜。
·
2023-11-11 18:04
C/C++
c++
开发语言
后端
k8s删除terminating 状态 namespace
1curl-k-H"Content-Type:application/json"
[email protected]
://127.0.0.1:8001/api/v1/name
spaces
templarzq
·
2023-11-11 18:24
kubernetes
容器
云原生
【补题笔记】AtCoder Beginner Contest 256 A~Ex
#includeusingname
spaces
td;typedeflonglongLL;intn;voidmain2(){cin>>n;cout>_;_=1;while(_--)main2();return0
xhyu61
·
2023-11-11 17:13
算法学习
做题笔记
算法
数据结构
acm竞赛
c++
C++学习记录——일 C++入门(1)
二、C++第一个程序#includeusingname
spaces
td;intmain(){coutusingstd::cout;usingstd::
咬光空气
·
2023-11-11 17:23
C++学习
c++
学习
开发语言
2021-08-27王道 数据结构 第5章 树与二叉树 p142 第20题
第5章树与二叉树5.3二叉树的遍历和线索二叉树综合应用题第20题#include#include//malloc所在头文件#include#defineMaxSize100usingname
spaces
td
one day_190304
·
2023-11-11 16:50
考研
数据结构
王道
数据结构
c语言
算法
c++vector查找元素所在的索引下标
find函数#includeusingname
spaces
td;输出:1表示3所在下标为1
暮色_年华
·
2023-11-11 16:29
c++
c++
【图论实战】 Boost学习 03:dijkstra_shortest_paths
C->D->F->E->G长度16代码#include#include#include#include#include#include#include#include#includeusingname
spaces
td
坚果仙人
·
2023-11-11 14:41
图论
学习
Boost
【图论实战】Boost学习 01:基本操作
文章目录头文件图的构建图的可视化基本操作头文件#include#include#include#include#include//#include#include#includeusingnamespaceboost;usingname
spaces
td
坚果仙人
·
2023-11-11 14:08
图论
学习
数据库
Boost
【算法设计】回溯法算法设计——骑士游历问题(C++实现)
创作不易,本篇文章如果帮助到了你,还请点赞关注支持一下♡>#includeusingname
spaces
td;constintN=8;inttravel[8][8]={0};intrecord=0;boolisVisited
天喜Studio
·
2023-11-11 13:54
算法分析
算法
c++
开发语言
学习
笔记
试题 历届试题 子串分值和【第十一届】【省赛】【B组】
用arr数组存储每个字符出现的位置(初始化为-1)a-102b-113c-14每个字符出现的次数=(字符串的长度-该字符的当前位置)*(当前位置-该字符的上一个位置)#includeusingname
spaces
td
Java橙旭源
·
2023-11-11 13:27
蓝桥杯
c++
PTA团体程序设计天梯赛-练习集 L2 网红点打卡攻略(模拟)
思路模拟,不知道为什么结构体过不了代码#includeusingname
spaces
td;constintmaxn=1e5+10;intn,m,g[210][210];structnode{intval
Cutele_
·
2023-11-11 12:14
#
理论-数值计算方法
PTA 哈密尔回路(建图搜索)
输入格式:首先第一行给出两个正整数:无向图中顶点数N(2#include#includeusingname
spaces
td;constintN=210;intn,m,idx=0;inth[N];inte
iAkuya
·
2023-11-11 12:43
java算法实录
图搜索算法
图论
算法
L2-036 网红点打卡攻略 (25 分)
题目链接#includeusingname
spaces
td;inte[210][210];intmain(){intn,m,a[210],book[210];cin>>n>>m;while(m--){intx
_Dawn__
·
2023-11-11 12:42
题解
pta
PTA L2-036 网红点打卡攻略 (25 分)
#includeusingname
spaces
td;constintN=210;intg[N][N];boolst[N];intmain(){intn,m;cin>>n>>m;memset(g,0x3f
WA_自动机
·
2023-11-11 12:12
#
STL容器
算法
c++
图论
PTA习题:习题2.8 输出全排列 (20分)——递归
习题2.8输出全排列(20分)请编写程序输出前n个正整数的全排列(nusingname
spaces
td;voidpermutation(int*L,intleft,intright);intmain()
5?li
·
2023-11-11 12:10
数据结构
递归
c++
717. 简单斐波那契
代码#includeusingname
spaces
td;constintN=1e5+3;inta[N];intmain(){intn;cin>>n;a[0]=0;a[1]=1;for(inti=2;i<
x-d-xxh
·
2023-11-11 12:04
acwing蓝桥杯课
算法
数据结构
95. 费解的开关
下面都可以确定当前灯不亮就操作它下面的格子即可点亮它我觉得这种方法是唯一不会互相干扰的方法还是不太理解…代码#include#include#include#include#includeusingname
spaces
td
x-d-xxh
·
2023-11-11 12:04
acwing蓝桥杯课
算法
图论
CF1551B2 Wonderful Coloring - 2(贪心,思维)
代码#includeusingname
spaces
td;constintN=2
x-d-xxh
·
2023-11-11 12:33
CF
思维题
贪心
贪心算法
算法
c++
92. 递归实现指数型枚举
题目思路因为有n个数,每个数选或不选都是一种方案,而且要递增输出,那么就标记每个数是否备选,然后判断完n个数以后,就可以输出了代码#includeusingname
spaces
td;intn;boolf
x-d-xxh
·
2023-11-11 12:33
acwing蓝桥杯课
算法
深度优先
图论
木棍游戏(牛客月赛)dfs
代码#includeusingname
spaces
td;constintN=100;doublea[N];doubleans=-1;doublehelen(doublea,doubleb,doublec
x-d-xxh
·
2023-11-11 12:33
搜索与图论
牛客
简单题
游戏
深度优先
算法
93. 递归实现组合型枚举
题目思路一个m个坑位,填n个数,就依次往里放就好了同时判断一下升序,当前这个数比前一个数大就可以了代码#includeusingname
spaces
td;intn,m;intans[30];intf[30
x-d-xxh
·
2023-11-11 12:55
acwing蓝桥杯课
深度优先
算法
图论
c++中输入任意多个整数
#include"pch.h"#include#includeusingname
spaces
td;intmain(){coutsequence;inttemp;do{cin>>temp;sequence.push_back
西门吹北风
·
2023-11-11 12:55
算法
c++
Tomcat报错严重: Unable to process Jar entry [module-info.class] from Jar
Jar条目[module-info.class]报错内容严重:UnabletoprocessJarentry[module-info.class]fromJar[jar:file:/D:/STS/Work
spaces
lelege01
·
2023-11-11 11:51
Tomcat
手写实现单向链表 [ C++ ]
#includeusingname
spaces
td;templateclassNode{public:Typedate_;Node*next_;Node(constType&date):date_(date
鸿通楼祭司
·
2023-11-11 09:33
C++学习
c++
stl
c++手写链表
破损的键盘代码:#include#include#include#includeusingname
spaces
td;chars[100000+5];intnext[100000+5];intnow=last
愚末语
·
2023-11-11 09:02
洛谷
c++
C++手写链表(头插法和尾插法)
#includeusingname
spaces
td;typedefstructlistnode{intdata;listnode*next;}lnode,*linklist;//如果说没有加typedef
skywalker1313
·
2023-11-11 09:24
链表
c++
数据结构
算法
c语言
C++ ——自己手写的一个简单的单向链表
#includeusingname
spaces
td;templateclassList;//提前声明配合友元类templateclassNode{friendclassList;//友元类,方便表头操作节点私有成员
SoonIter
·
2023-11-11 08:51
C++
c++
链表
算法
数据结构
C++手写list
#includeusingname
spaces
td;templateclassllist{public:typedefT_type;private:structnode{//内嵌结构体,存每个节点的当前值和前后指针
丶沙鸥
·
2023-11-11 08:46
模拟
c++
list
链表
C++对C的扩展
C++对C的扩展一:、冒号作用域::运算符是一个作用域,如果::前面什么都没有加代表是全局作用域#includeusingname
spaces
td;inta=100;voidtest01(){inta=
霜晨月c
·
2023-11-11 06:38
C++
C
c++
c语言
Codeforces Round 907 (Div. 2)
CodeforcesRound907(Div.2)A判断i不为2的幂时有无出现递减#includeusingname
spaces
td;constintN=2000;inta[N];voidsolve()
十字星的约定_
·
2023-11-11 05:54
算法
算法
c++
数据结构
C++分治算法学习笔记之归并排序,快速排序
#includeusingname
spaces
td;voidMerge(inta[],ints,intm,inte,inttmp[]){//将数组a的局部a[s,m]和a[m+1,e
化身强盗_Bandit
·
2023-11-11 02:54
笔记
c++
算法
排序算法
数据结构
POJ 3662 二分+Dijkstra
//BySiriusRen#include#include#include#includeusingname
spaces
td;#defineN22222intn,p,k,ans=-1,w[N],first
Sirius_Ren
·
2023-11-11 02:14
二分
最短路
dijkstra
poj
namespace
1087 All Roads Lead to Romne (30 分)字符串转化+dijkstra+dfs
当标尺比较多的时候,可以用dijkstra+dfs,这样dijkstra只需要找出最短路径下所有的pre即可,然后在dfs中便利这些路径,在单独由第二标尺第三标尺找出最佳路径#includeusingname
spaces
td
温暖名字
·
2023-11-11 02:14
pat
dfs
dijkstra
UVA 10816 - Travel in Desert(二分+dijkstra)
每个道路有一个温度和距离,要求s,t两点间的一条路径,满足温度最大值最小,并且长度最短思路:二分温度,然后dijstra求长度即可代码:#include#include#include#includeusingname
spaces
td
lab104_yifan
·
2023-11-11 02:14
图论-最短路
新年好 dfs+dijkstra
#includeusingname
spaces
td;typedefpairPII;constintN=2e5+10;inte[N],ne[N],h[N],w[N],idx;intn,m;intst[N]
灬德布罗意的猫灬
·
2023-11-11 02:43
图论
思维
模拟
深度优先
算法
单源最短路的简单应用
的贪心保证了每次选定的点在之后都不会被其他点所更新了同理维护最长路的时候我们发现,如果权值是0-1的话,选定的最大值在之后不会变的更大所以可以用dijkstra来维护最长路#includeusingname
spaces
td
灬德布罗意的猫灬
·
2023-11-11 02:13
图论
算法
SCU 4527(dijkstra + 二分)
AC代码:#include#include#includeusingname
spaces
td;constintmaxn=1e4+10;constintinf=0x3f3f3f3f;inthead[maxn
Error Man
·
2023-11-11 02:13
#
贪心
思维
bao力
模拟
二分大法
洛谷P4185 离线+并查集
好题,发现没有强制在线,可以离线操作排序之后带集合点数的并查集就好了#includeusingname
spaces
td;constintN=1e5+10;intn,m;intp[N],sz[N];intfind
灬德布罗意的猫灬
·
2023-11-11 02:42
思维
数据结构
算法
数据结构
【二分答案+dijkstra】P1948 [USACO08JAN]Telephone Lines S
TelephoneLinesS#include#include#include#include#include#include#include#include#defineLLlonglongusingname
spaces
td
Kokli
·
2023-11-11 02:11
算法学习
拓扑学
蓝桥杯
算法
二分+dijkstra
#includeusingname
spaces
td;constintN=2e5+10;intg[1010][1010];intn,m,k;boolst[N];intdist[N];structEdge{
灬德布罗意的猫灬
·
2023-11-11 02:38
图论
思维
模拟
算法
题解 P1908 【逆序对】
还不如动态开点代码解释在注释里QAQ//思路:运用权值动态开点线段树从后往前扫每次加上比自己小的且编号靠后的点的个数的贡献(由于从后往前扫可以无视编号)空间&时间:nlogn#includeusingname
spaces
td
weixin_30763397
·
2023-11-11 01:33
数据结构与算法
P1908 逆序对
的东西,这东西是这样定义的:对于给定的一段正整数序列,逆序对就是序列中ai>aj且i#include#include#include#include#definedate100005usingname
spaces
td
weixin_30602505
·
2023-11-11 01:33
P1908 逆序对 题解
最近,TOM老猫查阅到一个人类称之为“逆序对”的东西,这东西是这样定义的:对于给定的一段正整数序列,逆序对就是序列中ai>aja_i>a_jai>aj且iusingname
spaces
td;intn;inta
您的无羡已上叽
·
2023-11-11 01:32
C++
#洛谷
算法
分治算法
排序算法
c++
[题解]洛谷P1908 逆序对
原题传送门思路可以用归并排序求逆序对个数代码#includeusingname
spaces
td;longlongn,ans=0;voidsort(longlongA[],longlongL,longlongR
weixin_30471561
·
2023-11-11 01:32
数据结构与算法
【洛谷】P1908 逆序对(递归,归并排序)
题意是比较找出aia_iai>aja_jaj且iusingname
spaces
td;intn,a[500005],tmp[500005];//a是原序对,tmp是临时存储序对longlongans=0;
Samven_7
·
2023-11-11 01:02
#
洛谷
递归
归并排序
洛谷 P1908 逆序对
TLE代码(0分)#includeusingname
spaces
td;constintMAXN=5e5+1;intn,a[MAXN];set>s;intmain(){scanf("%d",&n);for
zzc大魔王
·
2023-11-11 01:01
洛谷
c++
数据结构
算法
归并排序
排序算法
今天发一个洛谷P1908逆序对的题解(归并排序)
#includeusingname
spaces
td;inta[500005];intr[500005];longlongcnt;//cnt=0;voidsort(ints,intt){if(s==t)return
Xixiangrui
·
2023-11-11 01:30
算法
数据结构
c++
P1908 逆序对 题解
最近,TOM老猫查阅到一个人类称之为“逆序对”的东西,这东西是这样定义的:对于给定的一段正整数序列,逆序对就是序列中ai>aja_i>a_jai>aj且iusingname
spaces
td;inl
charlotte_TYQ
·
2023-11-11 01:58
C++题解
青少年编程
c++
算法
数据结构
排序算法
上一页
139
140
141
142
143
144
145
146
下一页
按字母分类:
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
其他