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
tie
【每日一题】ARC098D - Xor Sum 2 | 思维 | 简单
≤n≤2⋅1051\leqn\leq2\cdot10^51≤n≤2⋅1050≤kusingnamespacestd;intmain(){ios::sync_with_stdio(false);cin.
tie
solego
·
2023-10-08 10:35
算法竞赛
算法
思维
双指针
202. 最幸运的数字
202.最幸运的数字-AcWing题库#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-10-07 21:41
数论
c++
算法
数论
Codeforces Round 874 (Div. 3)A-F
判断一下每每两个连接在一起的字符组成的字符串种类数代码#include#include#includeusingnamespacestd;intmain(){ios::sync_with_stdio(0);cin.
tie
北极星璇
·
2023-10-07 11:22
算法
c++
数据结构
用网络重新理解世界
一个是节点,英文叫node;另一个是节点和节点之间的连接,英文叫
tie
。节点,一般指的是行动者,比如个人、群体、组织,也可能是城市或国家。连接,反映的是节点间的某种互动关系。
速写英雄
·
2023-10-06 13:01
O(根号n/ln(根号n))时间复杂度内求n的所有因子
2e9范围内因子最多的数有1600个因子,爆搜的时间复杂度很小#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl
泠楠子
·
2023-10-05 20:45
模板
算法
c++
string 中 s.size()的小问题
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd;typedefpairPII
泠楠子
·
2023-10-04 20:24
一些小bug
bug
图论-图的基本概念及存储方式
简单图判定//简单图判定#includeusingnamespacestd;intn,m;inta[1001][1001];intmain(){ios::sync_with_stdio(false);cin.
tie
暴躁大企鹅
·
2023-10-04 15:46
图论
图论
c++
算法
阶乘分解质因数
中因子p的个数为枚举n范围内的质数即可#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-10-03 03:22
日常水题
c++
算法
W、X、Y
其中一个y(x)有转折点,在对应位置上s(x)也会有转折点所以所有y(x)函数中不重复的转折点的个数就是答案#include#defineIOSios::sync_with_stdio(0);cin.
tie
泠楠子
·
2023-10-02 20:59
日常水题
c++
质数距离 - 如何在较合理的时间复杂度内求2e9范围内的质数
之间的质数,范围在2e9,但l、r的差值不大,在1e6范围内先求出内的质数,然后拿这个指数去筛[l,r]范围内的即可#include#defineIOSios::sync_with_stdio(0);cin.
tie
泠楠子
·
2023-10-02 20:27
日常水题
算法
c++
Nim - sg函数
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd;typedefpairPII
泠楠子
·
2023-10-01 02:32
模板
c++
算法
拆分Nim游戏 - SG定理
SG(a,b)=SG(a)^SG(b);#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-10-01 02:32
模板
算法
c++
Fake Maxpooling 二维滑动窗口
,列数变为(列数-k+1)再对每一列求一遍滑动窗口,行数变为(行数-k+1)剩下的就是每一个窗口里的最大值啦#include#defineIOSios::sync_with_stdio(0);cin.
tie
泠楠子
·
2023-10-01 02:02
模板
牛客
c++
算法
单调队列 - 滑动窗口
154.滑动窗口-AcWing题库O(1)求窗口中的最大值/最小值#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl
泠楠子
·
2023-10-01 02:31
模板
c++
算法
卡特兰数
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingname
泠楠子
·
2023-09-29 16:55
模板
c++
算法
组合数
Nim游戏
题库全部异或起来,如果不为零,则可以一步使其变为0:设异或和为x,x的最高位为第k位,令第k位为1的a[i]变为a[i]^x,a[i]^x#defineIOSios::sync_with_stdio(0);cin.
tie
泠楠子
·
2023-09-29 16:55
模板
c++
算法
容斥原理 能被整除的数
890.能被整除的数-AcWing题库容斥原理,加奇减偶差不多就是另外所以可以枚举每一位选或不选来暴力算#include#defineIOSios::sync_with_stdio(0);cin.
tie
泠楠子
·
2023-09-29 16:22
模板
算法
数据结构
c++
组合数
一些杂题(9.23)
就可以了可行的方案只要有一个在第一个包里,剩下的都在第二个包里就可以了注意:n==1的时候不可行,要特判代码#includeusingnamespacestd;intmain(){ios::sync_with_stdio(0);cin.
tie
想吃好吃的!
·
2023-09-29 12:21
c++
算法
leetcode
STL——pair使用
文章目录pair1.pair的应用2.创建和初始化3,pair对象的操作4,生成新的pair对象5,通过
tie
获取pair元素值pair1.pair的应用pair是将2个数据组合成一组数据,当需要这样的需求时就可以使用
心如镜止于水
·
2023-09-29 08:11
STL
Codeforces Round 895 (Div. 3)题解
a-b)是不是2*c的倍数讨论,2c是因为,a-cb+c总差值为2*c;#includeusingnamespacestd;intmain(){ios::sync_with_stdio(0);cin.
tie
Enjoycola_
·
2023-09-27 22:33
题解
算法
c++
Codeforces
Educational Codeforces Round 155 (Rated for Div. 2)
如果后面存在s>=s[1]且e>=e[1]的,那么不可能是第一个成为冠军,输出-1,否则取w[1]为ans;代码:#include#defineIOSios::sync_with_stdio(0);cin.
tie
ros275229
·
2023-09-27 10:31
算法学习
CF
算法
codeforces
c++
组合数 2.1 2.2
O(nlogn)预处理,O(1)查询#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-09-26 23:23
模板
c++
算法
组合数3 - lucas a、b较大的组合数
复杂度,约等于plogp#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-09-26 23:23
模板
c++
算法
组合数
组合数4 高精度计算组合数
一个阶乘n中因子p的个数:#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-09-26 23:51
模板
c++
算法
组合数
POJ - 1860(spfa判断正环)
代码:#include#include#include#include#definefastioios::sync_with_stdio(false),cin.
tie
(NULL),cout.
tie
(NULL
Belief_7
·
2023-09-26 21:25
刷题记录
算法
c++
L2-038 病毒溯源
代码:#include#definefastioios::sync_with_stdio(false),cin.
tie
(NULL),cout.
tie
(NULL)#defin
Belief_7
·
2023-09-26 21:54
刷题记录
c++
Hello 2023
#includeusingnamespacestd;intmain(){ios::sync_with_stdio(false);cin.
tie
(0),cout.
tie
(0);intT;cin>>T;while
欧阳小百合
·
2023-09-25 21:12
CF加训
算法
c++
开发语言
Hello 2023(A-D)
时要互换才能保证都能被看到AC代码:#includeusingnamespacestd;usingLL=longlong;intmain(){ios::sync_with_stdio(false);cin.
tie
eyuhaobanga
·
2023-09-25 21:40
AK-CF-ABC
c++
算法
数据结构
c++加速方法大全
虽然最后题目还是没过)1、读入、输出加速:ios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);这三行代码可以提升我们cin和cout的读入和输出速度,具体原理我也不太懂
ptyz306
·
2023-09-23 18:46
c++
使用C++的CCF-CSP满分解决方案 202206-3 角色授权
注意事项在写的时候遇到了如下问题:运行时间过长:解决方法是加上一句话就好://提高cin,cout的速度ios::sync_with_stdio(false),cin.
tie
(0),cout.
tie
(0
ShowM3TheCode
·
2023-09-20 21:21
CCF-CSP学习之路
c++
算法
开发语言
【每日一题】补档 ARC092D - Two Sequences | 思维和优化 | 困难
≤2000001\leqn\leq2000001≤n≤2000000≤ai,biusingnamespacestd;intmain(){ios::sync_with_stdio(false);cin.
tie
solego
·
2023-09-18 23:50
算法竞赛
算法
思维
【每日一题】补档 ARC136D - Without Carry | 子集DP | 困难
leq10^62≤n≤1060≤aiusingnamespacestd;constintMAX=1000000;intmain(){ios_base::sync_with_stdio(false);cin.
tie
solego
·
2023-09-18 23:20
算法竞赛
DP
算法
C++知识小结——快读快写
简便方法://快读快写std::ios::sync_with_stdio(false),cin.
tie
(0),cout.
tie
(0);
明里灰
·
2023-09-18 06:28
C++
c++
开发语言
AcWing.第121场周赛
.简单计算题目链接:5149.简单计算-AcWing题库思路:直接模拟,用floor()函数来实现下取整代码#include#defineIOSios::sync_with_stdio(0);cin.
tie
ros275229
·
2023-09-17 20:22
acwing
算法学习
算法
2020南京站ICPC F Firworks - 概率 + 三分
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'
泠楠子
·
2023-09-15 16:23
概率与期望
c++
算法
珂学送分
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);c
泠楠子
·
2023-09-15 16:23
概率与期望
c++
算法
蓝桥杯打卡Day9
#includeintmain(){std::ios::sync_with_stdio(false);std::cin.
tie
(nullptr);std::cout.
tie
(nullptr);intT;
‘(尐儍苽-℡
·
2023-09-15 03:40
蓝桥杯
蓝桥杯
职场和发展
牛客周赛 Round 10
牛客网思路:一个线性dp,dp[i]表示以a[i]结尾的最长稳定子数组的长度;dp方程:if(abs(a[i]-a[i-1])#defineIOSios::sync_with_stdio(0);cin.
tie
ros275229
·
2023-09-12 20:46
NowCoder
算法学习
算法
我的1919,我的NKU——浮生半日梦游散记(上)
countable]......2RELATIONSHIPsomethingthatunitestwoormorepeopleorgroups,suchaslove,orasharedinterestoridea→
tie
R小队全球应援会
·
2023-09-12 01:17
Cement
svisitwasIntendedtocementthealliancebetweenthetwocountries.cement后常接表示“关系”的名词,比如relationship,friendship,
tie
Nana酱_
·
2023-09-11 10:00
运放的输入输出电压Vcm范围
时需要注意其供电电压最高只有7V下面是网友的推荐英文参考网址OpAmpVoltageRanges—inputandoutput,clearingsomeconfusion-TheSignal-Archives-
TIE
2Esupportforu
anlog
·
2023-09-10 07:55
笔记
运放的输入输出电压Vcm范围
运放Vcm
运放输入范围
轨到轨运放
OPA2333输入
蓝桥杯打卡Day5
#includeconstintN=10010;intn;std::stringlogs[N];intmain(){std::ios::sync_with_stdio(false);std::cin.
tie
‘(尐儍苽-℡
·
2023-09-10 00:05
蓝桥杯
蓝桥杯
职场和发展
【每日一题】ABC194E-Mex Min | 思维 | 树状数组二分 | 中等
leqm\leqn\leq1.5\times10^61≤m≤n≤1.5×1060≤aiusingnamespacestd;intmain(){ios::sync_with_stdio(false);cin.
tie
solego
·
2023-09-09 19:25
算法竞赛
算法
思维
树状数组
【每日一题】补档 ABC309F - Box in Box | 三维偏序 | 树状数组 | 中等
hxusingnamespacestd;constintINF=0x3f3f3f3f;structNode{inta[3];};intmain(){ios::sync_with_stdio(false);cin.
tie
solego
·
2023-09-09 19:25
算法竞赛
算法
树状数组
三分 模板
求凹凸函数时用的,找最大/最小值f函数中的内容自定#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl
泠楠子
·
2023-09-09 05:35
模板
算法
c++
三分
牛客周赛 Round 10 A ~ C
比赛链接比赛链接A双指针#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd
泠楠子
·
2023-09-09 05:35
牛客
c++
算法
三分
Codeforces Round 895 (Div. 3) A ~ F
#include#defineIOSios::sync_with_stdio(0);cin.
tie
(0);cout.
tie
(0);#defineendl'\n'usingnamespacestd;typed
泠楠子
·
2023-09-09 05:32
cf
算法
c++
数据结构
C - Orac and LCM
题目大意:给一组数a[n]a[n]a[n],求gcd({lcm(ai,aj)∣iusingnamespacestd;#define_orzios::sync_with_stdio(false),cin.
tie
Bzdhxs_nt
·
2023-09-07 21:19
数论
codeforces
算法
B. Orac and Models(1350B)(dp + 因数分解)
查找一个最长的序列,该序列满足在数组x中的下标i1#defineendl"\n"#definedebug(a)cout=(n);--i)#defineIOSios::sync_with_stdio(0);cin.
tie
..Eliauk..
·
2023-09-07 21:17
CF
蓝桥杯打卡Day3
return1;if(n==2)return2;returnf(n-1)+f(n-2);}signedmain(){std::ios::sync_with_stdio(false);std::cin.
tie
‘(尐儍苽-℡
·
2023-09-07 11:01
蓝桥杯
蓝桥杯
职场和发展
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
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
其他