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
Div.2
Ozon Tech Challenge 2020 (Div.1 +
Div.2
, Rated) C. Kuroni and Impossible Calculation(鸽巢原理+数学)
题目链接思路:首先我们都明白一个式子就是如果(a-b)%m0,那么我们是不是都知道a%mb%m,又因为如果n>m的话%m的取值就在【0,999】内,也就是肯定会存在两个数是重合的(这就是鸽巢原理),那么n大于m的时候%m不就是0了,剩下的暴力就行了。#includeusingnamespacestd;typedeflonglongll;constintmaxn=2e5+1;constllinf=1
为什么他们cf写的这么快
·
2025-02-27 14:30
数学
Codeforces Round 1004(
Div.2
) B. Two Large Bags 补题 + 题解 python
B.TwoLargeBagshttps://codeforces.com/contest/2067/problem/B题目描述timelimitpertest:1secondmemorylimitpertest:256megabytesYouhavetwolargebagsofnumbers.Initially,thefirstbagcontainsnnnnumbers:a1,a2,…,ana_1
查理零世
·
2025-02-17 23:54
python
算法
Remove Exactly Two ( [Codeforces Round 1000 (Div. 2)](httpsmirror.codeforces.comcontest2063) )
RemoveExactlyTwo(CodeforcesRound1000(
Div.2
))Recently,LittleJohngotatreefromhisaunttodecoratehishouse.Butasitseems
BoBoo文睡不醒
·
2025-02-17 19:15
acm训练集合
搜索
dfs
数据结构
Codeforces Round 977 (Div. 2)E1 Digital Village (Easy Version)(Floyd,贪心)
题目链接CodeforcesRound977(
Div.2
)E1DigitalVillage(EasyVersion)思路首先,我们注意到nnn的最大值只有400400400。
Auto114514
·
2025-02-15 20:07
Codeforces
算法
c++
数据结构
图论
CF Round 1004 记录 & 题解(div.1 A - D1 &
div.2
D - F)
今天上午VPCodeforcesRound1004(
Div.2
),下午改CodeforcesRound1004(Div.1)。上午C题因为少判了一个条件,罚时吃饱了。
JeremyHe1209
·
2025-02-13 22:57
算法
An impassioned circulation of affection ( Codeforces Round 418 (Div. 2) )
Animpassionedcirculationofaffection(CodeforcesRound418(
Div.2
))Nadeko’sbirthdayisapproaching!
BoBoo文睡不醒
·
2025-02-03 22:04
acm训练集合
暴力枚举
dp
双指针
Nastya Is Transposing Matrices ( Codeforces Round 546 (Div. 2) )
NastyaIsTransposingMatrices(CodeforcesRound546(
Div.2
))Nastyacametoherinformaticslesson,andherteacherwhois
BoBoo文睡不醒
·
2025-02-03 22:04
acm训练集合
构造
Not Escaping ( Codeforces Round 766 (Div. 2) )
NotEscaping(CodeforcesRound766(
Div.2
))MajorRamisbeingchasedbyhisarchenemyRaghav.Rammustreachthetopofthebuildingtoescapeviahelicopter.Thebuilding
BoBoo文睡不醒
·
2025-02-03 01:38
acm训练集合
dp
数据结构
模拟
最短路
Epidemic in Monstropolis( Codeforces Round 378 (Div. 2) )
EpidemicinMonstropolis(CodeforcesRound378(
Div.2
))TherewasanepidemicinMonstropolisandallmonstersbecamesick.Torecover
BoBoo文睡不醒
·
2025-02-01 15:31
acm训练集合
模拟
双指针
贪心
Codeforces Round #956 (Div. 2) C. Have Your Cake and Eat It Too
CodeforcesRound#956(
Div.2
)C.HaveYourCakeandEatItToo题目大意:有长度为nnn的数组a,b,ca,b,ca,b,c,三个数组的和相同,把nnn分为三段非空连续段
abTao_lx
·
2024-09-10 10:25
c语言
算法
开发语言
Codeforces Round 963 (Div. 2)
CodeforcesRound963(
Div.2
)A.QuestionMarks题意有一场考试一共4∗n4*n4∗n道题目,其中答案为A,B,C,D的题目各nnn道,现在你有一份考试的结果,由字母A,B
lskkkkkkkkkkkk
·
2024-08-28 17:15
题解
dp
动态规划
思维
模拟
数论
Codeforces Round 936 (Div. 2)
CodeforcesRound936(
Div.2
)题目链接A.MedianofanArray题意给出一个数组aaa,每次操作可以让其中一个数增加一。问最少需要几次操作能改变中位数的值。
lskkkkkkkkkkkk
·
2024-08-28 17:14
c++
算法
数据结构
Codeforces Round 915 (Div. 2)
A.max(n,m)//Problem:A.ConstructiveProblems//Contest:Codeforces-CodeforcesRound915(
Div.2
)//URL:https:/
Lanthanmum
·
2024-02-09 19:38
算法
Codeforces Round 922 (Div. 2)(ABC)
CodeforcesRound922(
Div.2
)\Huge{CodeforcesRound922(
Div.2
)}CodeforcesRound922(
Div.2
)文章目录ProblemsA.BrickWall
鱼香rose__
·
2024-02-08 23:01
codeforces
c++
算法
Codeforces Educational Round #154 (
Div.2
) 题解
CFEdu#154题解上蓝场,当然要纪念一下。AOverview做的太慢了。111分钟的题搞了333分钟。Description给一个数字串,求这个数字串中任意一个是质数的子序列。Idea131313是质数,313131也是质数。所以答案肯定可以是131313或313131。直接看一下顺序就可以了。Codeintbucket[11];repn(i,0,s.length(),1){bucket[s[
Cui2010___
·
2024-02-05 19:43
综合题题解
c++
codeforces 1300
CodeforcesRound#618(
Div.2
)A做的还是不快卡了一下B果断开了C然后回头发现B怎么过的人这么多就想到了最后抄板子过了D一度以为能直接到蓝熬了两个小时想看颜色变化顶不死睡了起床发现只涨了
twyc
·
2024-02-05 00:40
cf
C. XOR-distance (位运算 异或+二进制减法)
CodeforcesRound922(
Div.2
)题目:https://codeforces.com/contest/1918/problem/C思想:首先使a>b,从左往右找到第二个a和b不同的位置,
萌新好菜
·
2024-01-31 20:30
算法
Codeforces Round 921 (Div. 2) C. Did We Get Everything Covered? (思维题)
题目链接思路:
div.2
的A题是本题的铺垫,A题的意思是将前k个字母循环出现m次即可,则将前k个字母看成一个循环节。
GHOSTANDBREAD
·
2024-01-29 11:04
算法笔记
c++
算法
【寒假复健Day3】Educational Codeforces Round 161(div. 2)
EducationalCodeforcesRound161(
div.2
)-题解EducationalCodeforcesRound161(
div.2
)文章目录EducationalCodeforcesRound161
MultipleIssue
·
2024-01-23 09:50
Codeforces
算法
数据结构
Codeforces の 动态规划
CodeforcesRound785(
Div.2
)-C.PalindromeBasisdp(9/100)题目链接思路:整数划分基础上加一个判断回文的条件整数划分思路:背包容量为n,物品有体积为1~nn种
菜·肉多多·狗
·
2024-01-22 23:36
动态规划
算法
Codeforces Round #654 (Div. 2) E F
CodeforcesRound#654(
Div.2
)EFE1Asterism(EasyVersion)题意: 有n个敌人,编号从1到n,每个人手中有ai个糖果。
_AlieZ_
·
2024-01-22 17:21
codeforces
线段树
逻辑
思维
数据结构
Educational Codeforces Round 161 (Rated for Div. 2) B 2的零次方竟然是1,多此一举的防溢出
目录心情:55.999999999999993:似乎被hack掉了,以上心得看看就好了:题意:思路:核心代码:心情:
Div.2
,我竟然在50分钟内C题做掉了,想着B题做了基本上不会掉分了这把,B题要考什么我也清楚
DBWG
·
2024-01-21 15:55
CF
算法
Codeforces Round #807 (Div. 2)
CodeforcesRound#807(
Div.2
)A.MarkthePhotographer2*n个人,问能否排成两行,使得两行对应位置的后面的人比前面的人高排序后,前n个人作第一排,后n个人作第二排
andyc_03
·
2024-01-14 21:42
算法
codeforces
Codeforces Round 907 (Div. 2)
//Problem:A.SortingwithTwos//Contest:Codeforces-CodeforcesRound907(
Div.2
)//URL:https://codeforces.com
Lanthamum
·
2024-01-09 05:20
算法
Codeforces Round 911 (Div. 2)
就ans++;//Problem:A.CoverinWater//Contest:Codeforces-CodeforcesRound911(
Div.2
)//URL:https://codeforces
Lanthamum
·
2024-01-09 05:50
算法
sublime text 3 快捷键 - 快速创建多个标签
需要安装好emmet包1,div*5按tab.创建多个空的
div.2
,div#id$*5按tab,创建多个带id的div.3,div.item*5按tab,创建多个带class的div,class的名称是
深圳老张
·
2024-01-07 08:58
Html&CSS
B. StORage room (位运算结论可记住:一个数组,a[i] | a[j]得到一个n*n的矩阵,求这个数组,用pow(2,30)-1 & 矩阵的第i行得到一个数即为这个数组的第i个)
problem/B思想:其中2^30-1的二进制为1111111......代码://Problem:B.StORageroom//Contest:Codeforces-CodeforcesRound912(
Div
萌新好菜
·
2023-12-31 14:59
cf题解
矩阵
算法
数据结构
Codeforces Round 917 (Div. 2)
CodeforcesRound917(
Div.2
)CodeforcesRound917(
Div.2
)A.LeastProduct题意:给出整数数组a,现在可以执行任意次数以下操作:任意选择数组a的一个元素
maisui12138
·
2023-12-26 15:49
算法
数据结构
Codeforces Round 915(
Div.2
) A~C(D,E更新中...)
A.ConstructiveProblems(思维)题意:给出一个n×mn\timesmn×m的网格,你需要将网格上所有点均填满水,当一个格子同时满足以下两个条件时,格子中也会被填满水:该格子的左边或右边已经被填满水了该格子的上面或下面已经被填满水了一次操作可以给一个格子填满水,问至少几次操作才能将所有网格填满。分析:分析样例后可以发现,对于一个n×mn\timesmn×m的网格,每行/列均只需要
AC-Panda
·
2023-12-20 15:06
codeforces题解
c语言
算法
数据结构
OI
codeforces
ICPC
信息学奥赛
Codeforces Round 912 (Div. 2)
CodeforcesRound912(
Div.2
)A大等于2依据冒泡排序即可排序,因此判断下1即可#includeusingnamespacestd;constintN=1e5+10;inta[N];voidsolve
十字星的约定_
·
2023-12-17 23:52
算法
算法
c++
数据结构
动态规划
Codeforces Round 914 (Div. 2)(A~E)
//Contest:Codeforces-CodeforcesRound914(
Div.2
)//URL:https://codeforces.com/contest/1904/problem/A//MemoryLim
你怎么知道我有一块铜牌
·
2023-12-17 20:39
Codeforces
c++
算法
c语言
Codeforces Round 915 (Div. 2)(A~C)
//Problem:A.ConstructiveProblems//Contest:Codeforces-CodeforcesRound915(
Div.2
)//URL:https://codeforces.com
你怎么知道我有一块铜牌
·
2023-12-17 20:08
c语言
开发语言
codeforces Round 910 (
Div.2
) A - D
文章目录A.MilicaandStringB.MilenaandAdmirerA.MilicaandString思路:记录每一个A、BA、BA、B的位置,BBB的数量大于kkk则将多于的BBB的数量变为AAA,反之同理。他是复制不是翻转,因此可以直接记录位置复制#include#include#include#include#include#include#include#include#defi
予你成风
·
2023-12-16 05:01
比赛
算法
c++
数据结构
Codeforces Round 910(
Div.2
)(A-D)
k,如果要-B就修改B,遍历到B就cnt--,同理到cnt==k;//Problem:A.MilicaandString//Contest:Codeforces-CodeforcesRound910(
Div
Lanthamum
·
2023-12-16 05:29
算法
Codeforces Round 910 (Div. 2)
CodeforcesRound910(
Div.2
)文章目录CodeforcesRound910(
Div.2
)ABCDA模拟#includeusingnamespacestd;constintN=1e5+
十字星的约定_
·
2023-12-05 09:25
算法
c++
算法
数据结构
开发语言
_Small_GCD题解(codeforces 911
div.2
)
题干:Letaaa,bbb,andcccbeintegers.Wedefinefunctionf(a,b,c)f(a,b,c)f(a,b,c)asfollows:Orderthenumbersaaa,bbb,cccinsuchawaythata≤b≤ca\leb\leca≤b≤c.Thenreturngcd(a,b)\gcd(a,b)gcd(a,b),wheregcd(a,b)\gcd(a,b
华年似锦
·
2023-12-01 21:18
c++
算法
DP problems
DPproblems(3)CodeforcesRound893(
Div.2
)D题意 有一个长度为nnn的010101串,反转其中一个元素(000变为111,或者111变为000)称为一次操作,我们可以对它进行不超过
Qpy_
·
2023-11-29 16:02
算法
用DP记录贡献的问题
很多时候记录贡献比动态维护能够得到更优的复杂度CodeforcesRound809(
Div.2
)D2错解:很容易观察到每个位置有O(n)O(\sqrtn)O(n)种取值,我们找出这些值,从大到小枚举最小值的同时维护最小的最大值即可
Qpy_
·
2023-11-29 16:00
算法
数据结构
Codeforces Round 908 (Div. 2)
CodeforcesRound908(
Div.2
)文章目录CodeforcesRound908(
Div.2
)ABCDA获取对战的最后一个即为胜者#includeusingnamespacestd;voidsolve
十字星的约定_
·
2023-11-28 22:36
算法
算法
数据结构
c++
Codeforces Round 902 (Div. 2)
Dashboard-CodeforcesRound902(
Div.2
,basedonCOMPFEST15-FinalRound)-CodeforcesA.GoalsofVictory思路:求和,取负ACcode
maisui12138
·
2023-11-24 21:53
算法
c++
Codeforces Round #696 (Div. 2) D. Cleaning(思维+前缀+枚举)
CodeforcesRound#696(
Div.2
)D.Cleaning(思维+前缀+枚举)链接:原题链接题意:给出一段序列ai,每次可以选择相邻的两个都不为0的ai与ai+1令其都−1,(这个操作可使用无限次
ah是你啊
·
2023-11-24 01:00
思维
算法
Codeforces Round 745 (Div. 2)(C:前缀和+滑动窗口,E:位运算加分块)
Dashboard-CodeforcesRound745(
Div.2
)-CodeforcesA:答案就是2n!
南岸以南南岸哀
·
2023-11-24 01:20
算法
codeforce
Codeforces Round #149 (Div. 2) E. XOR on Segment --二进制按位建树
CodeforcesRound#149(
Div.2
)E.XORonSegment#include#includeusingnamespacestd;templatevoiddebug(Args...args
Weach
·
2023-11-14 07:46
数据结构
线段树
数据结构
算法
日常记录
组常用等值式模式仍不太熟悉)预习析取范式和合取范式数据结构抽象数据类型的表示和实现(仍不熟悉)线性表的顺序表示和实现书上的代码描述使用ACM第一场bestcoderBestCoderRound#56(
div
Mad先生
·
2023-11-14 05:20
个人总结
Codeforces Round #747 (Div. 2);AtCoder Beginner Contest 222;Educational Codeforces Round 115 (
Div.2
)
前天晚上有场cf:CodeforcesRound#747(
Div.2
)A.ConsecutiveSumRiddle(思维)题意:给出数n,求两个数x和y,使得x+x+1+x+2+…+y-1+y=n。
小酒窝.
·
2023-11-12 05:54
每日刷题
算法
Codeforces Round 907 (Div. 2)
CodeforcesRound907(
Div.2
)A判断i不为2的幂时有无出现递减#includeusingnamespacestd;constintN=2000;inta[N];voidsolve()
十字星的约定_
·
2023-11-11 05:54
算法
算法
c++
数据结构
Codeforces Round 906 (Div. 2)
CodeforcesRound906(
Div.2
)A分类讨论,如果数的总数大于2直接returnfalse,否者看个数差#includeconstintN=105;inta[N];voidsolve()
十字星的约定_
·
2023-11-11 05:23
算法
算法
c++
Codeforces Round 908
Problem-A-Codeforces//Problem:A.SecretSport//Contest:Codeforces-CodeforcesRound908(
Div.2
)//URL:https:
书鸢1236
·
2023-11-09 14:43
cf
算法
Codeforces Round 908 (Div. 2)视频详解
EducationalCodeforcesRound157(A--D)视频详解视频链接A题代码B题代码C题代码D题代码视频链接CodeforcesRound908(
Div.2
)视频详解A题代码#include
Turing_Sheep
·
2023-11-09 08:18
codeforces
比赛记录
音视频
算法
数据结构
Codeforces 中文题解(持续更新)
CodeforcesRound#770(
Div.2
)A.ReverseandConcatenateB.FortuneTellingC.OKEAD.FindingZeroEducationalCodeforcesRound122A.Div
ThXe
·
2023-11-07 23:02
Codeforces
ACM
Codeforces
蓝桥杯
上一页
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
其他