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
算法设计与分析复习--求解最大子段和问题(分支法、动态规划)
左边和右边的最大子段和通过调用函数,而中间的要算左边最大,右边最大加起来才是中间的最大子段和最后返回左,右,中的最大值#include#include#include#defineintlonglongusingname
spaces
td
ˇasushiro
·
2023-11-19 14:15
算法
动态规划
数据结构实验期末复习-矿大
输入:545532431123输出:32514#includeusingname
spaces
td;structstudent//哈希表记录自身利用左右指针找下一个节点{in
ˇasushiro
·
2023-11-19 14:45
数据结构
c++
算法
C++代码字符舞-极乐净土
代码如下:#include#include#include#includeusingname
spaces
td;#defineMAX_ROW100#defineMAX_COL100#defineMAX_FRAME1348
gdizcm
·
2023-11-19 14:13
C++
Windows
代码舞
字符舞
C++字符舞
极乐净土
如何用小堆打印数组的升序?
堆的实现:#includeusingname
spaces
td;#includetypedefstructHeap{int*array;intsize;intcapacity;}HP;voidHeapInit
一念男
·
2023-11-19 13:36
数据结构
数据结构
力扣刷题本地化-输入输出方法大全
输入输出方法大全力扣代码在本地编译运行-数组转化成容器打印参考代码随想录拿我们刚讲过的这道题动态规划:使用最小花费爬楼梯(opensnewwindow)来做示范#include#includeusingname
spaces
td
upCoder1024
·
2023-11-19 13:52
c++
数据结构
算法
C++过河卒问题
#include#includeusingname
spaces
td;intboard[20][20];//棋盘intdp[20][20][20][20];//动态规划数组intmain(){intx0,
Galaxy银河
·
2023-11-19 13:17
C++更多语法
c++入门必备
c++
C++汉诺塔代码(递归)
这几天的涨粉又开始加速了,希望能多保持一会:)好的,废话不多说,直接开始今天的文章:#includeusingname
spaces
td;voidhanoi(intn,charfrom,charto,charauxiliary
Galaxy银河
·
2023-11-19 11:43
C++更多语法
计算机
/
人工智能
c++
算法
开发语言
C++八皇后问题代码
#include#includeusingname
spaces
td;//判断能否放置皇后boolcanPlace(intq[],intn,inti){for(intj=0;j
Galaxy银河
·
2023-11-19 11:36
c++入门必备
C++更多语法
c++
算法
开发语言
C++中字符串相加
将字符串s1="武当派"与字符串s2="张三丰"相加:demo:#include#include#includeusingname
spaces
td;intmain(void){strings1="武当派
weixin_46060711
·
2023-11-19 11:02
c++
c语言
c++
(C++)string类及其函数
在使用string类时,需要使用usingname
spaces
td,或者部分展开。而且我们最好包含的头文件,不是每个编译器都在里包含了的声明
CV工程师-
·
2023-11-19 10:49
C++
c++
C++构造函数 —— 学生信息类
#include#includeusingname
spaces
td;classStudent{private:intSID;stringName;public:Student(
Levitate-C
·
2023-11-19 07:26
c++
【蓝桥杯】砍树(树上差分)
ai,bi(1usingname
spaces
td;constintN=101000,M=2*N;intn,m;inth[N],e[M],ne[M],idx;intdepth[N],fa[N][25];intd
一只大黄猫
·
2023-11-19 07:30
蓝桥杯
蓝桥杯
算法
职场和发展
栈类模板(练手)
栈类模板,指针实现#includeusingname
spaces
td;templateclassStack{public:Tdata;Stack*next;Stack(){next=NULL;}voidpush
NoahBBQ
·
2023-11-19 06:28
个人感悟
软件质量保护与测试(第2版)学习总结第十一章 白盒测试
--BorisBeizer白盒测试是看源代码的,静态分析和动态分析11.2控制流测试程序结构主要有3种顺序结构、分支结构、循环结构#include"stdafx.h"#includeusingname
spaces
td
村口曹大爷
·
2023-11-19 06:38
学习
猜数字优化版(带进度条)
其实就是加了个动态进度条显示加载游戏的流程,这样看上去是不是更有big了hhhh#include#include#includeusingname
spaces
td;voidmenu(){printf("
晴友读钟
·
2023-11-19 06:07
一些项目
c++
电子学会C/C++编程等级考试2021年09月(一级)真题解析
yes,否则输出no输入一个字符输出如何输入的字符是数字,输出yes,否则输出no样例1输入样例1输入5样例1输出yes样例2输入A样例2输出no答案://参考答案#include usingname
spaces
td
码农StayUp
·
2023-11-19 05:51
c++
青少年编程
等级考试
电子学会
计算矩阵边缘元素之和
Input第一行分别为矩阵的行数m和列数n(m//#includeusingname
spaces
td;intmain(){intn,m,sum=0;cin>>n>>m;inta[n][m];for(inti
菜喵一只
·
2023-11-19 05:48
数组
算法
数据结构
电子学会C/C++编程等级考试2021年12月(一级)真题解析
时间限制:1000内存限制:65536输入一个双精度浮点数f(0#includeusingname
spaces
td;intmain(){ doublea; cin>>a; intb; b=a; cout
码农StayUp
·
2023-11-19 05:41
c++
青少年编程
等级考试
电子学会
2019大疆笔试的一道编程题
*/#include#include#includeusingname
spaces
td;structDiffers{intdiffer;intindex;Differs(intd,inti):differ
XDgbh
·
2023-11-19 05:04
计算机算法设计与分析(第二章上机实践题)
两个有序序列的中位数7-2)找第k小的数7-3)求逆序对数目7-4)maximumnumberinaunimodalarray7-5)二分法求函数的零点7-6)(选做题)派7-1)二分查找输入n值(1usingname
spaces
td
小番茄夫斯基
·
2023-11-19 04:22
c++
二分法
c++
算法导论
算法
数据结构
算法设计与分析第一章 课后习题答案(c++)
代码运行环境是:DEVc++问题一:#include#include#include#includeusingname
spaces
td;boolcom(string&a,string&b){returna.length
平常心-辉
·
2023-11-19 04:49
算法设计与分析
算法
c++
开发语言
容器适配器:栈的实现【摸鱼划水篇】
都是用了模板的功能能实现list栈和vector栈的任意切换这里就直接上代码了#include#include#includename
spaces
tack{//两个声明类型,第一个是容器类型template
想学c啊啊
·
2023-11-19 03:14
c++
C++之list
C++之listlist的构造#include#includeusingname
spaces
td;//打印函数voidprintfList(constlist&L){for(list::const_iteratorit
傻童:CPU
·
2023-11-19 03:03
C++
c++
list
开发语言
C++之map容器
C++之map容器map构造和赋值#include#includeusingname
spaces
td;#includevoidprintMap(map&m){for(map::iteratorit=m.begin
傻童:CPU
·
2023-11-19 03:03
C++
c++
开发语言
C++之set/multise容器
C++之set/multise容器set基本概念set构造和赋值#include#includeusingname
spaces
td;voidPrintfSet(set&s){for(set::iteratorit
傻童:CPU
·
2023-11-19 03:54
C++
c++
java
开发语言
1061 Dating (20)(20 分)
#include#include#includeusingname
spaces
td;stringweek[8]={"MON","TUE","WED","THU","FRI","SAT","SUN"};strings1
DaiMorph
·
2023-11-19 02:45
(快速幂+模板) acwing 875. 快速幂
875.快速幂题目链接https://www.acwing.com/problem/content/877/题目:#include#includeusingname
spaces
td;typedeflonglongLL
岁忧
·
2023-11-19 02:57
AcWing
快速幂
算法
c++
P3879 [TJOI2010]阅读理解
下面是AC代码~#include#includeusingname
spaces
td;#defineMax10000unordered_mapt[Max];intmain(){intN,x,M;strin
van之风
·
2023-11-19 02:27
集合
洛谷:P3879 [TJOI2010]阅读理解(字典树)
结果内存不够,代码:#includeusingname
spaces
td;mapA[1005];intmain(){intm,n;cin>>m;for(inti=0;i>c;for(intj=0;j>s;
cc 提升ing 变优秀ing
·
2023-11-19 02:57
字符串
【基础算法】快速幂(Acwing875题)
数据范围1≤n≤100000,1≤ai,bi,pi≤2∗输入样例2325439输出样例41代码#includeusingname
spaces
td;typedeflon
摸鱼好手狸狸子
·
2023-11-19 02:55
acwing基础算法
算法
蓝桥杯
数论
Trie——字典树
洛谷P8306字典树板子题#includeusingname
spaces
td;intn,q;constintN=3e6+10;structTrie{intvim[N][150],idx;//邻接表,idx
蒻蒻
·
2023-11-19 02:54
Trie树
算法
【洛谷刷题笔记】P3879 [TJOI2010] 阅读理解
代码演示#include#includeusingname
spaces
td;intn,m;inttrie[500010][26];//字典树inttot=0;//最大节点编号boolexist[500010
Nonexistentbody
·
2023-11-19 02:21
洛谷刷题笔记
c++
蓝桥杯
算法
AcWing 875. 快速幂(快速幂)
#includeusingname
spaces
td;typedeflonglongll;intquckymi(lla,llb,llp){llres=1;while(b){if(b&1){res=res*
秘制函数
·
2023-11-19 02:50
数学知识
蓝桥杯
c++
算法
P3879 [TJOI2010] 阅读理解- 字典树
代码#include#defineintlonglongusingname
spaces
td;constintN=5e5+10;intson[N][30];bitsetvis[N];intidx;intn
Wy. Lsy
·
2023-11-19 02:15
算法
c++
字典树
HDU 4738 Caocao's Bridges (割边)
#include#include#include#includeusingname
spaces
td;constintmaxn=1100;structedge{intto,v,next;}ed[maxn*
wing_wing_wing
·
2023-11-19 02:14
====
图论
=====
强连通/割边/割点
hdu 4738 Caocao's Bridges(割边)
题目链接用tarjan求桥上的最小权值#include#definelllonglongintusingname
spaces
td;inlinellgcd(lla,llb){returnb?
weixin_30677073
·
2023-11-19 02:42
Caocao's Bridges HDU - 4738(Tarjan求割边模板题)
题目链接题目意思:求割边#include#include#includeusingname
spaces
td;constintmaxn=1010;intn,m,tot,num;inthead[maxn],
god_alonely
·
2023-11-19 01:03
图论
割边
桥
hdu4738 Caocao's Bridges(Tarjan/双连通分量+桥+特判)
题目给一张n(n#include#includeusingname
spaces
td;constintINF=0x3f3f3f3f;constintmaxn=1e3+10;constintmaxm=maxn
Code92007
·
2023-11-19 01:02
#
Tarjan/2-sat
桥
tarjan
特判
WPF应用最小化至系统托盘运行
usingSystem.Windows.Forms;name
spaceS
erverApp{//////MainWindow.xaml的交互逻辑///publicpartialclassMainWindow
weixin_30752699
·
2023-11-19 01:24
leetcode-89. 格雷编码
leetcode-89.格雷编码题目:代码:#include#include#includeusingname
spaces
td;/**设n阶格雷码集合为G(n),则G(n+1)阶格雷码为:给G(n)阶格雷码每个元素二进制形式前面添加
zmm_mohua
·
2023-11-19 01:34
刷题
leetcode
c++
链表小试牛刀
示例:输入:1->2->4,1->3->4输出:1->1->2->3->4->4求解:#includeusingname
spaces
td;structListNode{intval;ListNode*next
yuabcxiao
·
2023-11-18 23:02
力扣
C++编程良好习惯
1不要使用usingname
spaces
td简化对函数的调用不好的习惯#include...usingname
spaces
td;//把命名空间直接放在全局作用域voidFuc(){stringstr;}
jUicE_g2R
·
2023-11-18 23:56
c++
模板的局限性
#includeusingname
spaces
td;//既然有函数模板,就不要有普通函数,否则容易出现二义性//实际开发中模板、普通函数二选一//模板并不是万能的,有些特定数据类型,需要用具体化方式做特殊实现
MDtime
·
2023-11-18 22:30
c++
类模板语法
#include#includeusingname
spaces
td;//类模板templateclassPerson{public:Person(nameTypename,ageTypeage){this
MDtime
·
2023-11-18 22:30
c++
类模板与函数模板的区别
#include#includeusingname
spaces
td;//类模板与函数模板的区别//1.类模板没有自动类型推导的使用方式//2.类模板在模板参数列表中可以有默认参数,classPerson
MDtime
·
2023-11-18 22:30
c++
C++知识点总结(6):高精度乘法真题代码
一、高精度数×低精度数#include#includeusingname
spaces
td;intmain(){//存储并输入两个数字chara_str[1005]={};longlongb;cin>>a_str
AICodeThunder
·
2023-11-18 22:57
c++
算法
普通函数与模板函数调用规则
#includeusingname
spaces
td;//普通函数和函数模板的区别://1.普通函数调用时可以发生自动类型转换(隐式类型转换)//2.函数模板调用时,如果利用自动类型推导,不会发生隐式类型转换
MDtime
·
2023-11-18 22:27
c++
c++判断某一天是这一年的第几天
效果图如下代码如下#includeusingname
spaces
td;intmain(){intyear,month,day,i;cout>year>>month>>day;intm[12]={31,28,31,30,31,30,31,31,30,31,30,31
l小小怪l
·
2023-11-18 21:38
笔记
c++
CF1899B 250 Thousand Tons of TNT
思路这题直接是暴力枚举,细节见代码代码#include#defineintlonglongusingname
spaces
td;constintN=1e6+10;inta[N],su
x-d-xxh
·
2023-11-18 21:12
CF
模拟
c++
算法
开发语言
789. 数的范围
利用二分此题考察二分写法具体详见代码注释我觉得二分的整体思路是很好理解的,难的地方就在于写法上的细节,比如要不要+1,要不要等于总结小规律:找哪边,哪边就+1,另一边就=代码#includeusingname
spaces
td
x-d-xxh
·
2023-11-18 21:11
acwing蓝桥杯课
二分
算法
上一页
132
133
134
135
136
137
138
139
下一页
按字母分类:
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
其他