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++:友元
1.友元函数#includeusing
namespaces
td;classAA{private:inta;public:AA(){a=100;}public:voidShow(BB&rb){rb.b;}
学习使我变快乐
·
2025-03-28 10:21
c++
开发语言
青少年编程
最大异或对 The XOR Largest Pair
代码:#includeusing
namespaces
td;constintN=100010;intn;intarr[N];intch[N*31][2],idx;//idx给树上每个节点一个编号voidtr
好好学习^按时吃饭
·
2025-03-28 05:44
算法
弗洛伊德模板
#include#include#includeusing
namespaces
td;typedeflonglongll;constintN=500;//最大节点数constllinf=0x3f3f3f3f3f3f3f3f
qystca
·
2025-03-28 02:54
图论
蓝桥杯备考:八皇后问题
八皇后的意思是,每行只能有一个,每个对角线只能有一个,每一列只能有一个,我们可以dfs遍历每种情况,每行填一个,通过对角线和列的限制来进行剪枝话不多说,我们来实现一下代码#include#includeusing
namespaces
td
无敌大饺子 dot
·
2025-03-28 00:36
蓝桥杯
职场和发展
题目 2693: 蓝桥杯2022年第十三届决赛真题-卡牌 C++
#include#includeusing
namespaces
td;longlongintm,ans=0;//注意m的范围比较大,如果只是定义int的话会导师运行错误inta[210000],b[210000
IC 见路不走
·
2025-03-27 22:26
蓝桥杯
c++
算法
题目 2694: 蓝桥杯2022年第十三届决赛真题-最大数字 C++
#include#include#include#includeusing
namespaces
td;intmain(){intN;intA,B;intnum=1;intt[20];cin>>N>>A>>
IC 见路不走
·
2025-03-27 22:26
算法
c++
数据结构
模拟String基本函数/深浅拷贝/柔性数组
#pragmaonce#define_CRT_SECURE_NO_WARNINGS#include#includeusing
namespaces
td;namespacehush{classstring{
UpUpUp……
·
2025-03-27 21:18
c++
算法
开发语言
C++中的判断与循环
一.if判断语句1.程序中的判断:if(要执行的判断,最后的返回值要是bool型的数据){如果为真,要执行的代码段;}#include"iostream"using
namespaces
td;intmain
NaZiMeKiY
·
2025-03-27 18:55
C/C++
c++
算法
开发语言
C++实训练习册(C++之基础语法进阶练习题)
代码:#includeusing
namespaces
td;size_tSum(size_ta,size
白昼57
·
2025-03-27 14:52
c++
蓝桥杯
开发语言
c++将字符转换为数字
将字符数组中的字符‘1到9转换为整数数字#includeusing
namespaces
td;intchnum(chara[]);intmain(){charar[5]={'3','5','3','7',
笑对明天 守望幸福
·
2025-03-27 14:21
c++
蓝桥杯
开发语言
单点修改,区间求和或区间询问最值(线段树)
n#definelllonglongusing
namespaces
td;constintN=100010;structnode{intl,r,mx;lls;};nodexdt[4*N];intn,m,p
云袅
·
2025-03-27 13:17
算法
每日一题第15届蓝桥杯c/c++本科B组省赛第2题
#include#includeusing
namespaces
td;intgcd(inta,intb){if(a
wen__xvn
·
2025-03-27 12:39
蓝桥杯
蓝桥杯
c++
矩阵对角线求和C++
#includeusing
namespaces
td;intmain(){inta[100][100];intn,i,j,
一半烟火一半诗意.
·
2025-03-27 10:23
c++
矩阵
算法
C++中的动态内存分配
使用案例:#includeusing
namespaces
td;intmain()
花落已飘
·
2025-03-27 07:29
C++零基础教程
c++
开发语言
每日一题-比例简化-暴力
题意:给ABL,要求就算出来个a/b,使得a/b>=A/B且a,busing
namespaces
td;intmain(){intA,B,L;inta,b;cin>>A>>B
李烦烦搞快点
·
2025-03-27 06:57
每日一题 - 240419 - 24 GPLT 模拟赛 - L1-8 小偷踩点
0x00Link24GPLT模拟赛-L1-8小偷踩点404Source-PTATag-芝士水题模拟Time-∗*∗0x01SourceCode//#includeusing
namespaces
td;//
乐意奥AI
·
2025-03-27 06:56
每日一题
算法
#Codeforces Round 1009
#includeusing
namespaces
td;intmain(){ intn; cin>>n; while(n--) { intl,r,d,u; cin>>l>>r>>d>>u
gyc271828
·
2025-03-26 23:06
算法
蓝桥杯备考----->Cow Picnic (BFS)
行是奶牛位置,m行是所有联系我们只要从每个奶牛所在牧场为起点,遍历一下整个图,把遍历的点记录在一个cnt数组里面,只要是遍历过k个的点,就是所有奶牛都能#include#include#includeusing
namespaces
td
无敌大饺子 dot
·
2025-03-26 23:34
蓝桥杯
宽度优先
职场和发展
AtCoder Beginner Contest 374 E题 Sensor Optimization Dilemma 2(二分,贪心)
代码#includeusing
namespaces
t
Auto114514
·
2025-03-26 15:31
Atcoder
算法
c++
每日总结3.25
第九届蓝桥杯大赛软件赛省赛C/C++大学B组1.第几天(√);2.乘积尾零(√);(拆分为2和5,统计个数)#includeusing
namespaces
td;inta[11][11];intmain(
labubu12
·
2025-03-26 10:59
c语言
每日一题洛谷P10899 [蓝桥杯 2024 省 C] 劲舞团c++
https://www.luogu.com.cn/fe/api/problem/downloadAttachment/jhqdki17#include#includeusing
namespaces
td;
wen__xvn
·
2025-03-25 23:32
蓝桥杯
洛谷
c++
开发语言
蓝桥杯
全排列|| 分发饼干 摆动序列
1,1,2],[1,2,1],[2,1,1]]示例2:输入:nums=[1,2,3]输出:[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]提示:1using
namespaces
td
默默修炼的小趴菜
·
2025-03-25 22:53
c++
算法
开发语言
算法训练 | 图论Part1 | 98.所有可达路径
目录98.所有可达路径深度搜索法98.所有可达路径题目链接:98.所有可达路径文章讲解:代码随想录深度搜索法代码一:邻接矩阵写法#include#includeusing
namespaces
td;vector
Orionova
·
2025-03-25 21:48
数据结构算法训练
算法
图论
深度优先
【C++】通讯录管理系统+少量数据结构
#include#includeusing
namespaces
td;#definemax1000structnewp{stringname;intsex;intage;stringnumber;stringadd
XYN5114
·
2025-03-25 19:01
C++
c++
学习方法
数据结构
笔记
开发语言
文件I/O--C++的文件操作
,从文件中读取、写入文件从文件中读取数据:#include//fstreamFilestream:文件流#include//fstream包含了iostream,所以这句可以省略,现在不能了using
namespaces
td
埜玊
·
2025-03-25 12:09
c++
c++
POJ 3190 Stall Reservations(牛棚挤奶问题)详细代码解读
cows向量4.2先排序cows4.3处理第一头牛4.4遍历剩下的牛4.5复用牛棚or创建新牛棚4.6输出结果二.详细代码解读#include#include#include#includeusing
namespaces
td
寒风·长剑
·
2025-03-25 05:45
算法学习
贪心算法
c++
堆
POJ
3190
ABC 369
D.BonusEXPE.SightseeingTourD.BonusEXP常规思路是dp[i]表示到前i个怪的最大收益值,因为要看奇偶性所以再加一维,0表示当前这个怪打或不打共打了偶偶数怪,1表示打#include#defineintlonglongusing
namespaces
td
空雲.
·
2025-03-25 04:38
算法
c++
数据结构
算法复习——排列|组合|指数枚举
#includeusing
namespaces
td;constintN=20;inta[N];boolst[N];intans;intn;voiddfs(intx){if(x>n){for(inti=1
小赖同学吖
·
2025-03-25 04:07
算法
深度优先
逻辑回归
每日总结3.24
第十届蓝桥杯大赛软件赛省赛C/C++大学B组183.完全二叉树的权值(找规律,临界值)#includeusing
namespaces
td;inta[1000005];intmain(){intm;intd
labubu12
·
2025-03-24 23:34
c语言
C++ 图论之求图的连通块数量(邻接矩阵版)
3.代码#includeusing
namespaces
td;longlongn,m,ans;//n点数,m边数,ans连通块数量。boola[105][10
JuRuo_Yuan
·
2025-03-24 22:28
蒟蒻讲图论算法
c++
图论
深度优先
第十一届蓝桥杯大赛软件赛省赛C/C++ 大学 A 组 子串分值
现在给定一个字符串S0⋯n−1S0⋯n−1(长度为nn,1≤n≤1051≤n≤105),请你计算对于所有SS的非空子串Si⋯j(0≤i≤jusing
namespaces
td;intmain(){s
徽京人
·
2025-03-24 20:14
蓝桥解析
算法
数据结构
c语言
c++
蓝桥杯
蓝桥杯 拔河
,需要在这n名同学中挑选出两个队伍:每个队伍内的同学编号连续,分别为:{a_l1,a_l1+1,...,a_r1}{a_l2,a_l2+1,...,a_r2}满足:l1≤r1#includeusing
namespaces
td
wuqingshun314159
·
2025-03-24 20:12
蓝桥杯
十五届蓝桥杯C/C++B组
蓝桥杯
职场和发展
算法
c++
c语言
数据结构
筛选素数的三种方法
这样的做法显然不可取的,如果查看1~n的素数,这样的时间复杂度为O(n^2)1.朴素筛法这个筛法的思想是,每一次把枚举到的数x的倍数筛选掉,这样就可以优化一些时间复杂度为O(N*lnN)具体代码#includeusing
namespaces
td
小赖同学吖
·
2025-03-24 20:38
算法
c++
3.19刷题
P6443[COCI2010/2011#1]TIMSKO-洛谷#includeusing
namespaces
td;intmain(){intn,m,k,maxp=0;cin>>m>>n>>k;for(inti
山遥路源
·
2025-03-24 20:38
算法刷题
c++
3.21刷题
P6723[COCI2015/2016#5]ZAMKA-洛谷#includeusing
namespaces
td;intweisum(intn){intsum=0;while(n){sum+=n%10;n
山遥路源
·
2025-03-24 20:38
算法刷题
c++
3.15刷题
P6337[COCI2007/2008#2]CRNE-洛谷#includeusing
namespaces
td;intmain(){intn;cin>>n;//横加竖最大。
山遥路源
·
2025-03-24 20:08
算法刷题
c++
2.22-2.27刷题记录
2.22P1420最长连号-洛谷#includeusing
namespaces
td;inta[10010];intmain(){intn,ans=0,l=1;cin>>n;for(inti=0;i>a[
山遥路源
·
2025-03-24 20:38
算法刷题
c++
3.22刷题
B3763[语言月赛202305]团体程序设计天梯赛-洛谷#includeusing
namespaces
td;intmain(){intx,jichu=0,jinjie=0,dingbu=0;for(inti
山遥路源
·
2025-03-24 19:34
算法刷题
c++
算法竞赛备赛——【数论】高精度
加法P1601A+BProblem(高精)-洛谷#includeusing
namespaces
td;constintN=10100;inta[N],b[N],c[N];intinit(intx[]){/
Aurora_wmroy
·
2025-03-24 19:27
算法竞赛备赛
算法
c++
数据结构
蓝桥杯
牛客周赛 Round 86 —— 题解
A-小苯跑外卖_牛客周赛Round86签到题:向上取整#includeusing
namespaces
td;intmain(){intx,y;cin>>x>>y;coutusing
namespaces
td
山海风z
·
2025-03-24 11:58
算法小屋
算法
c++
数据结构
c++报错:E0513 不能将 “const char *“ 类型的值分配到 “char *“ 类型的实体
#includeusing
namespaces
td;classStudent{public://成员变量char*name;intage;floatscore;//成员函数voidsay(){cout<
爱听雨声的北方汉
·
2025-03-24 08:32
轻轻松松学C++
c++
开发语言
P3375 【模板】KMP
KMP代码:#includeusing
namespaces
td;constintN=1e6+10;chars1[N],s2[N];//全局变量名字不能定义为next//C++标准库中有一个函数名字是nextintnext1
好好学习^按时吃饭
·
2025-03-24 02:35
算法
1242: 二维数组输出(2)
输入一个整数N(Nusing
namespaces
td;intmain(){intN;cin>>N;//创建一个NxN的二维数组intmatrix[N][N];//按列填充数字for(intcol=0;col
呱呱呱~
·
2025-03-23 17:45
算法
C++ 实例(二)
实例-使用临时变量#includeusing
namespaces
td;intmain(){inta=5,b=10,temp;cout#includeusing
namespaces
td;intmain()
阳光向日葵向阳
·
2025-03-23 10:55
c++
算法
数据结构
P1706 全排列问题 及 P1157 组合的输出
#includeusing
namespaces
td;intn;boolv[100];inta[100];voiddfs(intpos){if(pos==n+1){for(inti=1;i>n;dfs(
wwjjjww
·
2025-03-23 04:26
算法
深度优先
图论
自制C++小游戏走迷宫
直接上代码,有不足请指正,最新编辑于2025.3.22#include#include#include#includeusing
namespaces
td;chara[100][100]={"######
ccw_china
·
2025-03-23 04:52
c++
开发语言
L2-4 吉利矩阵
输入样例:73输出样例:666这道题是暴力纯搜,但是很难想,我这个是看的别人的代码#include"bits/stdc++.h"using
namespaces
td;intx[20][20];intl,n
小竹子14
·
2025-03-23 02:06
矩阵
深度优先
算法
蓝桥大使【算法赛】----贪心算法
#include#includeusing
namespaces
td;longlongans=0;constintN=100005;structnode{//结构体inta;intb;};nodea[N]
wyshh119
·
2025-03-23 01:59
算法
学习
贪心算法
【纯职业小组——思维】
题目思路第十五届蓝桥杯省赛PythonB组H题【纯职业小组】题解(AC)_蓝桥杯纯职业小组-CSDN博客代码#includeusing
namespaces
td;usingll=longlong;intmain
Kent_J_Truman
·
2025-03-22 22:11
蓝桥杯
算法
B2143 进制转换
#includeusing
namespaces
td;chars[16]={'0','1','2','3','4','5','6'
1101.01
·
2025-03-22 21:31
算法
c++
上一页
13
14
15
16
17
18
19
20
下一页
按字母分类:
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
其他