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
算法基础(三):位运算,离散化,区间合并
算法基础(三):位运算,离散化,区间合并位运算基本思想顾名思义基本运用n的二进制表示中第k位是什么先把第k位移到最后一位,n>>k再看个位是多少n&1#includeusingname
spaces
td;
白切鸡蘸醋
·
2024-01-15 12:35
算法基础
算法
c++
数据结构
基础算法(三):双指针/位运算/离散化/区间合并
位是几lowbit(x)操作:返回x二进制表示中的最后一位13.离散化4.区间合并1.双指针算法引例输入一行字符串,输出字符串中的单词,每个单词单独占一行#include#includeusingname
spaces
td
ScarboroughFair#
·
2024-01-15 12:34
Acwing基础课
算法
蓝桥杯
c++
区间合并(pair,auto的用法)
输入样例:51224567879输出样例:3#includeusingname
spaces
td;typede
认真研究代码的猫猫头
·
2024-01-15 12:32
算法
数据结构
ROS Kinetic使用std::chrono::system_clock报错error: ‘std::chrono’ has not been declared
#include#include#includeusingname
spaces
td;intmain(){//获取当前时间点std::chrono::system_clock::time_pointnow
Julyers
·
2024-01-15 11:45
C++
c++
Day 45 动态规划 7
#include#includeusingname
spaces
td;intmain(){intn,m;while(cin>>n>>m){vectordp(n+1,0);dp[0]=1;for(inti=
韩纪初
·
2024-01-15 10:36
算法
12、27
#includeusingname
spaces
td;intadd(inta=1,intb=1);//有默认参数的情况下,函数声明写默认参数,定义不写intadd(inta,intb){returna+b
油炸鸡米花_
·
2024-01-15 10:38
c++
算法
开发语言
12、28
#includeusingname
spaces
td;classPerson{int*age;string&name;public:Person(intage,stringname):age(newint
油炸鸡米花_
·
2024-01-15 10:38
算法
1.2作业
#includeusingname
spaces
td;intblood=10000;classHero{protected:stringname;inthp;intattck;public:Hero(){
油炸鸡米花_
·
2024-01-15 10:38
算法
上海计算机学会11月月赛 丙组题解
代码:#includeusingname
spaces
td
超哥聊信奥
·
2024-01-15 09:48
上海计算机学会月赛题解
算法
图论
数据结构
AtCoder Beginner Contest 336 A-E 题解
代码:#includeusingname
spaces
td;intmain(){cout>n;for(inti=1;iusingname
spaces
td
超哥聊信奥
·
2024-01-15 09:11
Atcoder
算法
c++
数据结构
Codeforces Round 779 (Div. 2) D2. 388535(思维题 二进制性质/trie树上最大最小异或)
题目t(tusingname
spaces
td;constintN=2e5+5;inta[N],l,r;sets,s2;voidsolve(){intmul=1;s.clear();cin>>l>>r;for
Code92007
·
2024-01-15 06:26
思维题
思维题
二进制
c算法O(n*log n)(二)
归并排序MergeSort自顶向下进行排序//归并排序#include#includeusingname
spaces
td;templatevoid_mergeSort(Tarr[],intl,intmid
程序猿峰岑
·
2024-01-15 03:43
剑指offer 面试题6 从尾到头打印链表
\Utilities\List.h"#includeusingname
spaces
td;structListNode{intm_nValue;Li
Kobe Forever
·
2024-01-15 00:19
剑指offer
剑指offer
链表
逆序
从尾到头打印
F. Greetings - 二分
代码#includeusingname
spaces
td;usingll=longlong;constintN=
.y.a.o.
·
2024-01-14 23:26
算法
c++
思维
二分
Codeforces Round 894 (Div. 3)
AKA.GiftCarpet题意:给出一个由小写字母构成的矩阵,问举证是否满足一下条件:选择四列a,b,c,d(a#include#include#include#include#includeusingname
spaces
t
Muelsyse_
·
2024-01-14 23:24
CF
算法
1077:统计满足条件的4位数 ------ 信息学奥赛高级题库
(nusingname
spaces
td;intmain(){intn,s=0;charm[4];cin>>n;for(inti=0;i>m;intg,q,b,p;g=m[3]-48;
小小鲁创客
·
2024-01-14 23:29
C++信息学奥赛高级题库
算法
c++
python
小小鲁创客
信息学奥赛
1076:正常血压 ------ 信息学奥赛高级题库
【输入】第一行为一个正整数n(nusingname
spaces
td;intmain(){intn,a1,a2,s=0,maxa=1e-12;cin>>n;for(inti=0;i>a1>>a2;if(a1
小小鲁创客
·
2024-01-14 23:58
C++信息学奥赛高级题库
算法
c++
python
小小鲁创客
信息学奥赛
基于顺序存储结构的图书信息表的旧图书的出库
#include#includeusingname
spaces
td;#defineOK1#defineERROR0#defineOVERFLOW-2typedefintStatus;//声明类型int类型为
点一下我的id
·
2024-01-14 23:56
最小生成树 | Prim 算法
程序代码#include#include#includeusingname
spaces
td;constintN=550,INF=0x3f3f3f3f;intn,m;intg[N][N];intdist[
一根老麻花
·
2024-01-14 22:08
手撕算法
算法
Prim
算法
最小生成树
贪心
双指针 小红统计区间 牛客周赛 Round 28
#includeusingname
spaces
td;usingll=longlong;constintN=1e5+10;lla[N];intmain(){ios::sync_with_stdio(0),
柏箱
·
2024-01-14 22:24
c++
算法
2023.12.15
#include#includeusingname
spaces
td;vectorconstructBinarySearchTree(intn,intk){vectorpermutation;if(k>log2
CQU_JIAKE
·
2024-01-14 21:02
c++
算法
开发语言
C++中的23种设计模式精讲
目录1单例模式2工厂方法模式3抽象工厂模式4参考1单例模式题目链接为:小明的购物车C++代码如下,#include#include#includeusingname
spaces
td;classShoppingCart
YMWM_
·
2024-01-14 21:23
C++学习
c++
设计模式
开发语言
C++中类重载输出符
C++中类重载输出符,请看示例代码,#includeusingname
spaces
td;classStudent{public:Student(stringname,intgrade,intcclass
YMWM_
·
2024-01-14 21:50
C++学习
c++
开发语言
Codeforces Round 913 (Div. 3) A~F
A.Rook模拟#includeusingname
spaces
td;intmain(){intt;strings;cin>>t;while(t--){cin>>s;for(inti=0;iusingname
spaces
td
飞羽(*´◐∀◐`*)
·
2024-01-14 21:44
codeforces
算法
数据结构
c++
Codeforces Round 913 (Div. 3)补题
#includeusingname
spaces
td;intmain(){intt;scanf("%d",&t);while(t--){chars[3];scanf("%s",s);for(inti=1;
as_sun
·
2024-01-14 21:43
codeforces补题
算法
前缀和模板题 P8218 【深进1.例1】求区间和
一道前缀和的模板题#includeusingname
spaces
td;usingll=longlong;constintN=1e5+10;lla[N],prefix[N];intmain(){ios::
柏箱
·
2024-01-14 21:40
c++
算法
C++ 面向对象 _ 几个主题关键字的应用
测试说明平台会对你编写的代码进行测试:测试输入:2536预期输出:s1:1.41421s2:5s3:2.5usingname
spaces
td;cla
Ssaty.
·
2024-01-14 21:34
Educoder实训
c++
开发语言
算法
class_2:using namespace std命名空间
1、标准命名空间:usingname
spaces
td;std包含了基本的类、数据对象、函数等,如cin,cout,endl等,如果在代码没有声明usingname
spaces
td;则需要再调用这些接口的时候需要显示的声明
橙子@C
·
2024-01-14 21:21
QT
算法
数据结构
class_3:lambda表达式
1、lambda表达式是c++11引入的一种匿名函数的方式,它允许你在需要函数的地方内联的定义函数,而无需单独命名函数;#includeusingname
spaces
td;boolcompare(inta
橙子@C
·
2024-01-14 20:15
QT
c++
算法
数据结构
vscode配置记录
配置文件:{"workbench.iconTheme":"vscode-icons","git.ignoreMissingGitWarning":true,"[yaml]":{"editor.insert
Spaces
曹营汉将
·
2024-01-14 20:56
std::atomic<>
即对一个线程对该数据的一次操作在汇编上是多个步骤的,所以当多个现场同时进行操作时,这些步骤就可能会穿插在一起,导致数据修改错误:#include#include#include#include#includeusingname
spaces
td
刘欢明
·
2024-01-14 20:39
c++
开发语言
std::shared_ptr
的工作原理
//delete_diff_type.cpp#includeusingname
spaces
td;classFoo{public:Foo(){cout(newFoo());//errorFakeFoo*ffptr
weixin_30633405
·
2024-01-14 20:37
c/c++
std::atomic
m_count 原子操作
#include#include#include#include#include#include#includeusingname
spaces
td;classA{public://类型转换构造函数A()
秦钟
·
2024-01-14 19:34
C++11
c++
牛客练习赛54-A 乘积
Ai,Aj)然后枚举i试着写一下公式很容易找到规律,将上述枚举i得到的结果再连乘得到以下结果,照着敲就好了(快速幂可以去看一下其他的博客,这里就不介绍了)这里贴一下代码#includeusingname
spaces
td
夏虫语火
·
2024-01-14 19:24
牛客题解
模拟题
算法
c++
牛客练习赛101-C 推理小丑---位运算+思维
题目要求最小值,根据贪心思想,二进制表示情况下,高位1越少越好#includeusingname
spaces
td;constintN=100010;inta[N];intres=0;intmain(){
_WAWA鱼_
·
2024-01-14 19:50
比赛补题
c语言
算法
数据结构
牛客练习赛111-B-一次交换
一次交换题目输入输出题目输入输出输入5abcdabacda输出YES输入3abcabc输出NO注意:若字符串相等且有相同字母,也可交换,输出"YES"例如:输入3abaaba输出YES可实现aa交换#includeusingname
spaces
td
Hikariiiiiiiii
·
2024-01-14 19:15
算法
数据结构
c++
牛客练习赛111-A-列竖式
列竖式题目输入输出题目输入输出输入31145141314520100输出680900#includeusingname
spaces
td;intmain(){longlongintt;cin>>t;for
Hikariiiiiiiii
·
2024-01-14 19:14
c++
2018-05-25
今天有不少收获首先是有一篇AAAI2018的文章《GuidingSearchinContinuousState-action
Spaces
byLearninganActionSamplerfromOff-targetSearchExperience
deathneverdie
·
2024-01-14 19:27
[蓝桥杯 2015 省 A] 饮料换购
(0usingname
spaces
td;intn,cnt=0;intmain(){cin>>n;cnt
EternalLBZ
·
2024-01-14 18:22
蓝桥杯
贪心算法-活动安排-最详细注释解析
现在给出n个活动使用礼堂的起始时间begini和结束时间endi(begini#includeusingname
spaces
td;structaction//会议结构体{intbegi
大白话_NOI
·
2024-01-14 18:48
NOI
蓝桥杯C++
C++基础知识
贪心算法
算法
c++
C++头文件<bits/stdc++.h>详解
基本用法#includeusingname
spaces
td;intmain(){//在此处写代码}内容//C++includesusedforprecompiling-*-C++-*-//C
最萌皮卡丘
·
2024-01-14 18:13
c++
开发语言
C语言练习实例17
#includeintmain(){charc;intletters=0,
spaces
=0,digits=0,others=0;printf("请输入一些字母:\n");while((c=getchar
宗^_^宗
·
2024-01-14 17:52
C语言经典100例
c语言
c++
开发语言
C++常用代码
构造#include#includeusingname
spaces
td;classA{private:inta;int*buf;public:A(){//构造a=0;buf=newint[100];couta
SylarChonna
·
2024-01-14 17:06
算法巩固
c++
开发语言
Jerry每次能向前或向后走n*n步(始终不能超过初始位置1e5),q(q <= 1e5)次询问,求向前走d最少要几次
spfa,平方数的dis为1,然后推出其他数的dis#includeusingname
spaces
td;#defineintlonglongconstintmaxn=2e5+5,inf=1e9,N=1e5
__night_
·
2024-01-14 17:09
XCPC补题
算法
给定只包含0、1、?(0或1)的串s1,当i >= 2, s[i][j] = abs(s[i - 1][j] - s[i - 1][j + 1]), 有多少个s1,使得s[n] = “1“
题目#includeusingname
spaces
td;#defineintlonglongconstintmaxn=1e6+5,mod=1e9+7;inta[maxn];strings;intqpow
__night_
·
2024-01-14 17:39
XCPC补题
算法
设F(i, j) 为以(0, 0)为左下角,以(i, j)为右上角的矩形面积,对于1 <= i <= n, 1 <= j <= m, 求F(i, j)的第k大的值
题目#includeusingname
spaces
td;#defineintlonglongconstintmaxn=1e6+5,inf=1e9;inta[maxn];structNode{inta,b
__night_
·
2024-01-14 17:39
XCPC补题
算法
【map坑点】原始数组为空,有两种操作:1、在数组后面添加元素x 2、复制x个原始数组添加在原始数组后面。q次询问,求第k(k <= 1e18)个元素是什么
表示有某次第二种操作使数组长度变为i,mp[i]==j(j>0)表示第i个位置的元素是j注意:if(mp[k]>0)语句,如果mp中没有k的键,就会在mp中加一个[k,0]的键值对代码:#includeusingname
spaces
td
__night_
·
2024-01-14 17:07
codeforces
算法
2022年第十三届蓝桥杯大赛软件类省赛 C/C++ 大学B组
试题A:九进制转十进制#include#include#includeusingname
spaces
td;intmain(){intnum;num=2*9*9*9+0*9*9+2*9+2;printf(
水深00安东尼
·
2024-01-14 15:23
蓝桥杯
我的ACM之路
蓝桥杯
c语言
c++
2022年第十三届蓝桥杯大赛软件类国赛 C/C++ 大学B组
自己写的代码,不能保证全部正确试题A:2022比赛时没想出来怎样写试题B:钟表比赛时没想出来怎样写试题C:卡牌二分法求结果#include#include#includeusingname
spaces
td
水深00安东尼
·
2024-01-14 15:22
我的ACM之路
蓝桥杯
c++
蓝桥杯
C++ 之map
以下是一些关于C++std::map的示例:#include#includeusingname
spaces
td;intmain(){//定义并初始化一个std::mapstd::mapmyMap={{1
奋进的大脑袋
·
2024-01-14 15:52
c++
开发语言
上一页
75
76
77
78
79
80
81
82
下一页
按字母分类:
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
其他