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
2023 Hunan Provincal Multi-University Training (Xiangtan University) B. 阶梯计数(第二类斯特林数)
题目题目链接:Problem-B-CodeforcesImakf送给了Clamee一个n行n列(nusingname
spaces
td;#definerep(i,a,b)for(inti=(a);i=(b
Code92007
·
2023-11-06 06:25
#
组合数学(容斥原理)
第二类斯特林数
递推式
dp
Educational Codeforces Round 157 (Rated for Div. 2) F. Fancy Arrays(容斥+组合数学)
题目称一个长为n的数列a是fancy的,当且仅当:1.数组内至少有一个元素在[x,x+k-1]之间2.相邻项的差的绝对值不超过k,即t(tusingname
spaces
td;#definerep(i,a
Code92007
·
2023-11-06 06:23
组合数学(容斥原理)
#
容斥
组合计数
矩阵快速幂
冒泡排序法和二分查找法(C/C++)
#includeusingname
spaces
td;inta[99999];intn;intmain(){ios::sync_with_stdio(false);cin.ti
菜只因C
·
2023-11-06 05:36
算法
蓝桥杯
二分查找法
冒泡排序法
c
idea文件比对
项目内的文件比对在项目中选择好需要比对的文件(类),然后选择CompareFilesMac下的快捷键是Command+d,这样的比对像是git冲突解决一样这里会有差异的过滤条件,分别是:Trimwhites
spaces
boy快快长大
·
2023-11-06 05:02
IntelliJ
IDEA
intellij-idea
认老乡 2016年360笔试题目 并查集
输入:第一行包含两个整数N(1usingname
spaces
td;intfindSet[1001];//并查集intfind(in
Victorydong
·
2023-11-06 04:20
C++
C++
并查集
360笔试
找老乡
排序——选择排序
算法代码#includeusingname
spaces
td;//选择排序voidSelectSort(intnums[],intn){inti,j,min;for(i=0;inums[j]){min=j
I'm Jie
·
2023-11-06 03:32
数据结构
#
排序算法
算法
排序算法
数据结构
树上贪心+生成树贪心:1104T3
根据nnn奇偶性可以推断答案合法解只需要在任何一棵生成树上构造即可贪心肯定要在最大生成树上然后从前往后看一条未选的边能不能选即可#includeusingname
spaces
td;#ifdefLOCAL
Qres821
·
2023-11-06 02:23
贪心
生成树
排序——冒泡排序
冒泡排序的基本思想从前往后(或从后往前)两两比较相邻元素的值,若为逆序(即A[i−1]usingname
spaces
td;//冒泡排序算法voidBubbleSort(intnums[],intn){inti
I'm Jie
·
2023-11-06 02:52
#
排序算法
数据结构
算法
数据结构
2020-04-12
getchar()附:cin.ignore();cin.get()//跳过一个字符,例如不想要的回车,空格等字符1、cin>>用法1:最基本,也是最常用的用法,输入一个数字:#includeusingname
spaces
td
奋斗中的小强
·
2023-11-06 02:58
洛谷 P1049 装箱问题 题解
代码#include#include#include#includeusingname
spaces
td;constintN=35;intv;//箱子的容量intn;//物品的个数intw[N];//物品各自的体积
帅气的小屁孩_8d50
·
2023-11-06 02:57
POJ-3630电话表(考察字典树)
电话表题目原地址输入样例:2391197625999911254265113123401234401234598346输出结果:NOYES实现代码#include#include#includeusingname
spaces
td
源代码•宸
·
2023-11-06 02:20
每日刷题————其他算法竞赛题
算法
c语言
c++
经验分享
字典树
c语言实现播放国际歌
//luogu:993779bilibili:FurippuWRY#include#includeusingname
spaces
td;#definedo1261.626#definere1293.665
CHANG_THE_WORLD
·
2023-11-06 01:57
c语言
开发语言
Xcode10编译报错问题
报错信息:工程编译第一个错误因为旧版本没有遇到这样的问题,尝试切换到旧版本的编译环境,选择File—LegacyBuildSystem—Work
spaceS
ettings后项目编译通过,可以正常运行。
旅行_中
·
2023-11-06 01:28
P2047 [NOI2007] 社交网络
#includeusingname
spaces
td;#defineintlonglongintf[105][105],C[105][105];doubleI[105
拧错位置的螺丝钉
·
2023-11-06 00:11
题解
图论
P1037 [NOIP2002 普及组] 产生数
由于数据范围nusingname
spaces
td;voidwrite(__int128x){if(x9)write(x/10);putchar(x%10+'0');}__
拧错位置的螺丝钉
·
2023-11-06 00:11
题解
图论
OpenCV3【神经网络】ANN_MLP
//基于OpenCV提供的样例neural_network.cpp,加入了网络保存和读取#includeusingname
spaces
td;usingnamespacecv;usingnamespacecv
scu30
·
2023-11-06 00:00
opencv
ANN_MLP
opencv
洛谷 P1359 租用游艇(Floyd, Dijkstra,SPFA)
https://www.luogu.com.cn/problem/P1359代码Floyd#includeusingname
spaces
td;constintN=202;intn;intdis[N][N
黎苏
·
2023-11-05 23:52
随笔
code
图论
洛谷P1359 租用游艇
游艇出租站i到游艇出租站j之间的租金为r(i,j)(1≤i#includeusingname
spaces
td;inta[205][205],n,f[205];intmain(){inti,j;cin>>
zjsru_Beginner
·
2023-11-05 23:52
算法
洛谷 P1359 租用游艇 题解
题目传送门这道题还是上模板啦~~SPFA大法好(本人还是懒得打邻接表)一道橙题:上代码:#includeusingname
spaces
td;intn,a[2510][2510],m,fr,to;voidadd
weixin_30252709
·
2023-11-05 23:49
数据结构与算法
洛谷 P1359 租用游艇【dp】(经典)
游艇出租站i到游艇出租站j之间的租金为r(i,j),1usingname
spaces
td;intm[201][201],p[201],n;//p[i]表示到i站时的最少
weixin_30751947
·
2023-11-05 23:19
洛谷P1359租用游艇
建议跟着我的代码自己打个表就懂了#includeusingname
spaces
td;intn;intt[205][205];//时间intdp[205];//dp数组intw[205][205];从i到
Fovait
·
2023-11-05 23:18
洛谷
洛谷 P1359 租用游艇
游艇出租站i到游艇出租站j之间的租金为r(i,j),12#include3#include4#defineINF0x7fffffff5#defineMX500106usingname
spaces
td;78structnode
七情六欲·
·
2023-11-05 23:16
【洛谷1359】租用游艇
1#include2#include3#include4usingname
spaces
td;5intn,f[250],r[250][250];6intmain(){7scanf("%d",&n);8for
diefou0453
·
2023-11-05 23:13
【luogu P1144 最短路计数】 题解
题目链接:https://www.luogu.org/problemnew/show/P11441#include2#include3#include4#include5#include6usingname
spaces
td
disnmlf23266651
·
2023-11-05 23:13
P1144 最短路计数
代码如下:#includeusingname
spaces
td;#defineinf0x3f3f3f3f#defineMaxn1000005#defineMaxm2000005intn,m,cnt,head
b_b_lai_lai
·
2023-11-05 23:43
c++
【洛谷P1359租用游艇】
一旦前面某个点确定了最小值,那么后面对其无影响思路:根据题意,只有小的点能转移到大的点,所以转移方程就是对于每一个点,把小于它的点都遍历一遍,然后取min#include#include#includeusingname
spaces
td
Mustan_
·
2023-11-05 23:41
动态规划刷题记录
算法
动态规划
c++
洛谷 P1359 租用游艇(简单dp/Dijkstra)
给出一张有向图和从第i条边到n的条边的所有花费,求最少的租金思路:dp想不明白,虽然我是在训练dp…图论的话,单源最短路可以用迪杰斯特拉叭也不需要堆优化,朴素的迪杰斯特拉也能过#includeusingname
spaces
td
黑谷小健
·
2023-11-05 23:41
#
DP
图论
动态规划
算法
链表相关代码
ifndefNodeList_hpp#defineNodeList_hpp#defineMaxSize10//定义静态链表最大长度#include#include#include#includeusingname
spaces
td
Nelson_hehe
·
2023-11-05 23:32
数据结构
链表
数据结构
三大排序(冒泡、选择、插入)
#includeusingname
spaces
td;//冒泡排序voidmSort(inta[],intn);//选择排序voidSelectSort(inta[],intn);//插入排序voidInsertSort
与时间共舞
·
2023-11-05 22:06
排序算法相关代码
排序算法代码#ifndefSortFunc_hpp#defineSortFunc_hpp#defineMaxSize100#include#include#include#includeusingname
spaces
td
Nelson_hehe
·
2023-11-05 22:41
数据结构
排序算法
算法
数据结构
查找算法相关代码
//#ifndefSearchFunc_hpp#defineSearchFunc_hpp#include#include#include#includeusingname
spaces
td;#endif/
Nelson_hehe
·
2023-11-05 22:10
数据结构
算法
数据结构
双向链表相关代码
双向链表相关代码:双向链表、循环双向链表#ifndefDLinkList_hpp#defineDLinkList_hpp#include#include#include#includeusingname
spaces
td
Nelson_hehe
·
2023-11-05 22:34
数据结构
链表
数据结构
Acwing算法基础课----0/1背包问题的优化
solution/content/1374/优化思路以及代码参考上面这个链接,下面主要记录自己在写代码时的优化步骤步骤1首先要把用二维数组实现背包问题的代码写出来#include#includeusingname
spaces
td
T And J
·
2023-11-05 22:25
Acwing算法基础
数据结构
算法
vim搜索、替换tab
行首的多个tab换单个::%s/^\t\+/\t/gReferencesReplacetabswith
spaces
invimRegularExpressions
HackerTom
·
2023-11-05 19:25
latex
vim
latex
bibtex
linux下使用vscode对C++项目进行编译
//函数的声明voidswap(inta,intb);swap.cpp导入函数的声明,写函数的定义#include"swap.h"//双引号表示自定义的头文件#includeusingname
spaces
td
computer_vision_chen
·
2023-11-05 19:32
C++笔记
linux
vscode
c++
C++指针笔记
内存的编号是从0开始记录的,一般用十六进制数字表示指针代码#includeusingname
spaces
td;intmain(){//1.定义指针//开辟一个整型(4个字节)的内存单元,里面存放的内容为
computer_vision_chen
·
2023-11-05 19:58
C++笔记
c++
C++模板进阶
的作用非类型模板参数类模板的特化概念函数模板特化类模板特化全特化偏特化模板特化应用示例模板的分离编译什么是分离编译模板的分离编译解决方法总结typename的作用在模板参数的#includeusingname
spaces
td
i=++i;
·
2023-11-05 19:49
C++
c++
开发语言
VAE模型(详细推导+实例代码)
Reference:[苏剑林]https://
spaces
.ac.cn/archives/5253Auto-
zipper112
·
2023-11-05 17:31
算法
pytorch
python
VAE
生成模型
日期类函数实现
Date.h#pragmaonce#include#includeusingname
spaces
td;classDate{public://打印日期voidPrint()const;//获取某年某月的天数
小宁n
·
2023-11-05 17:23
c++
c++
开发语言
树状数组求区间最值不适合别人理解
#includeusingname
spaces
td;constintN=1000005;inttr[N],a[N];intn,m;intlowbit(intx){returnx&-x;}voidadd(
不远凯里
·
2023-11-05 15:50
c++
图论
算法
Prefix Equality(树状数组维护区间最值)
#includeusingname
spaces
td;constintN=2e5+10,INF=0x3f3f3f3f;intn,m;//tr[i]维护a数组前i个数最大值在b数组中出现的最早位置//tr1
根本学不会的Kkkkk
·
2023-11-05 15:13
c++
算法
数据结构
洛谷P1020 导弹拦截 树状数组区间求最值
题目的本质是最值的区间查询举例:序列:38920715530029917015865最值(向上):12323456最值(向下):11122221我们只需要贪心的选取之前的最值即可代码:#includeusingname
spaces
td
myvanilla1
·
2023-11-05 15:10
题解
数据结构
【树状数组维护区间最值】知识点讲解+例题x1
AC代码:#include#includeusingname
spaces
td;constintmaxn=1e6;intc[maxn];inta[maxn];intD;intcnt=0;//记录数列的元素个数
Joseph_L_
·
2023-11-05 15:08
蓝桥杯
C++ 内存模型
#includeusingname
spaces
td;intg_a=10;intg_
一只名叫Me的猫
·
2023-11-05 15:21
C++基础学习
c++
python与C++混合编程实践
#includeusingname
spaces
td;extern"C"{intfunc(inta,intb){coutusingname
spaces
td;extern"C"{intfunc(inta[]
waysolong90
·
2023-11-05 14:53
C++
python
c++
numpy
每日温度笔记
#include#include#includeusingname
spaces
td;//思路分析//分析题目的意思可以知道,题目求解的其实就是依次对于temperatureVec中的每个元素,找到从左往右第一个比大的值
赵燕玲是我对象
·
2023-11-05 14:37
算法练习
蓝桥杯
c++
算法
用斐波那契分解正整数
591700#problem/C观察这个形式,如果交替做,就是个斐波那契数列打表可得,任何正整数都可以大约由log\loglog个斐波那契数加起来然后直接拼斐波那契数即可#includeusingname
spaces
td
Qres821
·
2023-11-05 13:29
数学
斐波那契数列
涉及多种位运算操作混合类题目——通过加转三进制(扩大状态,不变枚举量):CF1033F
但我们可以观察其给的表我们发现如果表示成和的形式是容易进行一一对应的对于询问的时候,我们直接枚举每位有的和是多少,虽然状态是三次的,但是对于每个填法最多对应两个所以我们通过扩大状态,不变枚举量来进行#includeusingname
spaces
td
Qres821
·
2023-11-05 13:29
二进制
根据条件删除二维vector中的某一维数据
#include#include#includeusingname
spaces
td;intmain(){vectora;vectorb;vectorc;a.push_back(1);a.push_back
weixin_43489941
·
2023-11-05 12:24
c++
算法
开发语言
list删除指定元素
#include#include#includeusingname
spaces
td;intmain(){listList;List.push_back(1);List.push_back(1);List.push_back
weixin_43489941
·
2023-11-05 12:24
c++
上一页
145
146
147
148
149
150
151
152
下一页
按字母分类:
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
其他