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.3
Codeforces Round #661 (Div. 3) D. Binary String To Subsequences
CodeforcesRound#661(
Div.3
)D.BinaryStringToSubsequences题目链接Youaregivenabinarystringsconsistingofnzerosandones.Yourtaskistodividethegivenstringintotheminimumnumberofsubsequencesinsuchawaythateachcharact
旺 崽
·
2020-09-14 20:21
vector
思维
Codeforces
codeforces Round #479(
Div.3
) A-wrong subtraction B two-gram C- less or equal D E F
A.WrongSubtractiontimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputLittlegirlTanyaislearninghowtodecreaseanumberbyone,butshedoesitwrongwithanumberconsistingof
轨轨123
·
2020-09-14 19:34
Codeforces
[codeforces 1353D] Constructing the Array 分治算法
CodeforcesRound#642(
Div.3
)参与排名人数11823[codeforces1353D]ConstructingtheArray分治算法总目录详见https://blog.csdn.net
mrcrack
·
2020-09-14 19:43
codeforces
Codeforces Round #634 (
Div.3
)
CodeforcesRound#634Div.3ABCDEFA题意:给两姐妹分糖,需要Alice的糖比Betty的糖多,问有多少种分法(所有糖必须分完)。题记:两种情况,糖的数量少于3时没有一种分法符合条件,糖大于三的情况直接输出(n-1)/2即可。#includeusingnamespacestd;intmain(){intt;cin>>t;while(t--){intx;cin>>x;if(x
moyangxian
·
2020-09-14 17:56
codeforces
Codeforces Round #634 (Div. 3) E2.Three Blocks Palindrome (hard version)
CodeforcesRound#634(
Div.3
)E2.ThreeBlocksPalindrome(hardversion)Theonlydifferencebetweeneasyandhardversionsisconstraints.Youaregivenasequenceaconsistingofnpositiveintegers.Let
旺 崽
·
2020-09-14 17:08
思维
二分
Codeforces
Codeforces Round #644 (Div. 3) F.Spy-string
CodeforcesRound#644(
Div.3
)F.Spy-string题目链接Youaregivennstringsa1,a2,…,an:allofthemhavethesamelengthm.ThestringsconsistoflowercaseEnglishletters.Findanystringsoflengthmsuchthateachofthegivennstringsdiff
旺 崽
·
2020-09-13 19:12
字符串
思维
Codeforces
Codeforces刷题
Codeforces100套刷题CodeforcesRound#506(
Div.3
)EducationalCodeforcesRound49(RatedforDiv.2)AIMTechRound5(rated
dawu1461
·
2020-09-13 18:06
CF补题
ABCDEFGHEducationalCodeforcesRound64(RatedforDiv.2)1/7ACWA**CodeforcesRound#556(Div.2)3/5ACACAC******CodeforcesRound#550(
Div
weixin_30262255
·
2020-09-12 07:21
Codeforces Round #644 (Div. 3)
CodeforcesRound#644(
Div.3
)比赛链接:CodeforcesRound#644(
Div.3
)A.MinimalSquare题意:找出a*b正方形最小的面积题解:比较边的(a2,b)
R_emembers
·
2020-08-26 15:42
Codefoces
题解
【暴力枚举】CF #661
Div.3
1399C Boats Competition
观察数据范围,可以用枚举的方法首先记录重量为k的人的数量,num[k]枚举体重和i,判断哪个体重和对应的组合最多;范围是2~2*n(1usingnamespacestd;intmain(){intT;scanf("%d",&T);while(T--){intn,k,num[101],ans=-1;scanf("%d",&n);memset(num,0,sizeof(num));for(inti=0
mianing
·
2020-08-25 04:35
2020暑假补题记录
Codeforces Round #661 (Div. 3)——A.B.C.D.
CodeforcesRound#661(
Div.3
)A.RemoveSmallest题意:您可以选择两个索引i和j(i≠j),以使ai和aj之间的绝对差不超过一个(|ai-aj|≤1),并删除这两个元素中的最小值
Celavia_yu
·
2020-08-25 02:17
codeforces
Codeforces Round #624 (
Div.3
)A. Add Odd or Subtract Even
A.AddOddorSubtractEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregiventwopositiveintegersaandb.Inonemove,youcanchangeainthefollowingway:Chooseany
菜狗一枚
·
2020-08-25 02:13
暴力
cf
[codeforces 1311A] Add Odd or Subtract Even 奇+奇=偶,奇+偶=奇,偶+偶=偶
CodeforcesRound#624(
Div.3
)比赛人数6075[codeforces1311A]AddOddorSubtractEven奇+奇=偶,奇+偶=奇,偶+偶=偶总目录详见https://
mrcrack
·
2020-08-25 01:44
codeforces
Codeforces Round #535 (Div. 3) Nice Garland
CodeforcesRound#535(
Div.3
)NiceGarland这题之前死活读不懂,看别人代码后,自己写的代码又有错,对照别人代码,半天改不出来!!!真的急,测试数据太坑了,最后还是改好了。
没事码代码的渣渣
·
2020-08-24 11:56
贼坑的题目
暴力枚举
【Codeforces Round #496 (Div. 3)】D. Polycarp and Div 3
【CodeforcesRound#496(
Div.3
)】D.PolycarpandDiv3题意:给出一个大数,数位在2e5内,然后要求我们割分这串大数,使尽可能多的数可以被3整除。
Eve_Miracle*
·
2020-08-24 11:44
CodeForces
Codeforces Round #498 (
Div.3
)
目录A-AdjacentReplacementsB-Polycarp'sPracticeC-ThreePartsoftheArrayD-TwoStringsSwapsE-MilitaryProblemF-Xor-PathsA-AdjacentReplacements题意:有一个含有n个元素的数列,1#include#includeusingnamespacestd;constintmaxn=1e3
vloai
·
2020-08-24 10:52
深度优先遍历
Codeforces
Codeforces Round #605 (Div. 3) D. Remove One Element
CodeforcesRound#605(
Div.3
)D.RemoveOneElementYouaregivenanarrayaconsistingofnintegers.Youcanremoveatmostoneelementfromthisarray.Thus
旺 崽
·
2020-08-24 09:26
Codeforces
暴力
动态规划
【CF】Codeforces Round #531 (Div. 3) 题解
比赛经历第一次
Div.3
,难度不大,B题真的神,看了30分钟题懵一脸,1个小时两道题很绝望。结果后面加起来30分钟左右做完了,呵呵(B题还是FST,敢情我半个比赛都在研究英语阅读题还错了)。
C20193620
·
2020-08-24 09:05
综合
[codeforces 1385E] Directing Edges 变形的拓扑排序
CodeforcesRound#656(
Div.3
)参与排名人数11542早睡早起身体好[codeforces1385E]DirectingEdges变形的拓扑排序总目录详见https://blog.csdn.net
mrcrack
·
2020-08-24 09:25
codeforces
Codeforces Round #535 (Div. 3) 题解
CodeforcesRound#535(
Div.3
)题目总链接:https://codeforces.com/contest/1108太懒了啊~好久之前的我现在才更新,赶紧补上吧,不能漏掉了。
dft539533
·
2020-08-24 08:49
Codeforces Round #496 (Div. 3)(暂时只有前五道)
CodeforcesRound#496(
Div.3
)A.TanyaandStairwaystimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputLittlegirlTanyaclimbsthestairsinsideamulti-storeybuilding.Everyt
onlysky_yy
·
2020-08-24 07:22
codeforce
做题笔记
codeforce
Directing Edges (拓扑排序 / 构造有向图) (Round #656
Div.3
)
传送门题意:给出一个图的m条边,属性为1表示有向边,属性为0表示无向边。试问是否可确定所以无向边的方向,使图变成一个没有环的有向图?若无可行方案输出"NO",反正输出"YES"并输出原无向边确定的方向。思路:若原图就已经成环,那么必然输出NO,否则就一定可以构造出可行解。考虑原图的拓扑排序,根据两点的进队时间,对于某一无向边,只要使边上两点进队时间也满足拓扑序,就可以使得图依旧无环。具体看代码,详
S atur
·
2020-08-24 06:43
比赛&训练
图论
Codeforces Round #531 (Div. 3) ABCDEF题解
CodeforcesRound#531(
Div.3
)题目总链接:https://codeforces.com/contest/1102A.IntegerSequenceDividing题意:给一个数n,
dft539533
·
2020-08-24 06:14
CF #506(
Div.3
) B:子序列问题
题目描述有n道不同难度的题,你要从中选出合适的题目组成一套竞赛试题。试题各题之间难度逐级递增,且除最后一题以外每道题的难度不低于后一道题的一半。求试题最多可以包含的题数。输入输入第一行含有一个整数n(1≤n≤2*10^5),表示题目的个数。输入第二行含有n个整数a[1],a[2],...,a[n](a[i]≤10^9),表示各个题目的难度。输入保证不重复且从小到大排列。输出输出一个表示最大题数的整
RecCall
·
2020-08-23 08:23
2020寒假训练汇总
场次:8701.21EducationalCodeforcesRound41(RatedforDiv.2)solved:5/7rank:94补题:7/701.22CodeforcesRound#615(
Div
syh0313
·
2020-08-18 16:15
2020赛季CF训练记录
cfid:ILLLZKQF05.09CodeforcesRound#640(Div.4)solved:7/7补题:7/705.14CodeforcesRound#642(
Div.3
)solved:6/6
syh0313
·
2020-08-18 16:15
训练记录
Codeforces Round #627(
Div.3
)题解
A题YetAnotherTetrisProblem题意:俄罗斯方块,从1到n每个位置的初始高度是ai,每行填满可以消掉,问能不能通过放2*1的方块(高2宽1,可以无限放)使全部的方块消去。题解:每次放2*1的方块每个ai的奇偶性不会改变,所以只要有偶数或者只有奇数才能全部消去,循环判断一下就可以了AC代码#includeusingnamespacestd;#definefifirst#define
zzugzx
·
2020-08-18 02:35
9.21 Codeforces Round #587 (Div. 3)
CodeforcesRound#587(
Div.3
):点击进入新世界文章目录A.Prefixes(模拟)B.Shooting(贪心)C.WhiteSheet(思维)D.Swords(GCD)A.Prefixes
我不会DP
·
2020-08-17 05:10
Codeforces Round #661 (Div. 3)
CodeforcesRound#661(
Div.3
)传送门A-RemoveSmallestDescriptionYouaregiventhearrayaconsistingofnpositive(greaterthanzero
CoderSilence
·
2020-08-17 05:08
Codeforces
Round
贪心算法
Codeforces Round #661 (Div. 3) 题解
CodeforcesRound#661(
Div.3
)A.RemoveSmallest#includeusingnamespacestd;#pragmaGCCoptimize(2)typedeflonglongll
DrumWashingMachine
·
2020-08-17 04:05
codeforces
Codeforces Round #605 (
Div.3
)
CodeforcesRound#605Div.3ABCDEFA题意:给出三个人的位置,每个人可以走一步,使每两个人之间的距离相加最小。题记:找出三个人的坐标的最大值和最小值,让最大值减去最小值减2再乘2即是答案,如果答案小于0则输出0。#includeusingnamespacestd;intmain(){intt;cin>>t;while(t--){inta[3];cin>>a[0]>>a[1]
moyangxian
·
2020-08-17 04:30
codeforces
2019/12/12 CF-1272-B Snow Walking Robot
CodeforcesRound#605(
Div.3
)题目链接:http://codeforces.com/contest/1272/problem/B题意大意:尽可能少的删除无效或多余指令,并重新排列指令使机器人从原点出发
勿忘∮心安
·
2020-08-17 02:08
题集
Codeforces round #481(
Div.3
) 题解
声明:本人水平有限,欢迎各位大佬来打脸( ̄ε(# ̄)A.RemoveDuplicates【题意】n个数,在相同的数中只保留出现最晚的那个,并将剩下的数按原顺序的先后输出。【思路】ai≤1000ai≤1000,所以可以开一1000的数组,记录每个数值的最后一次出现的位置,然后按位置排序输出对应的数值。【代码】#include#includeusingstd::sort;#defineN_max100
Int32ToByte
·
2020-08-15 14:33
acm
codeforces
贪心
二分查找
[CF]Codeforces Round #531 (Div. 3)
CodeforcesRound#531(
Div.3
)B.ArrayK-ColoringDescriptionYouaregivenanarrayaaconsistingofnnintegernumbers.Youhavetocolorthisarrayinkkcolorsinsuchawaythat
weixin_30394333
·
2020-08-15 11:55
Codeforces Round #661(Div. 3)解题报告
CodeforcesRound#661(
Div.3
)A.RemoveSmallest题目大意若∣ai−aj∣≤1|a_{i}-a_{j}|\leq1∣ai−aj∣≤1则可以删去min(ai,aj)min
CUG_YZL
·
2020-08-13 22:01
codeforces
Codeforces Round #644 (Div. 3) H.Binary Median
CodeforcesRound#644(
Div.3
)H.BinaryMedian题目链接Considerallbinarystringsoflengthm(1≤m≤60).Abinarystringisastringthatconsistsofthecharacters0and1only.Forexample
旺 崽
·
2020-08-13 18:53
进制转换
Codeforces
bitset
Boats Competition (枚举 / 思维) (Round #661
Div.3
)
传送门题意:现有很多能力值的成员,要求你选择一个团队能力值w,使得两两匹配得到的团队能力值刚好为w的队伍最多,输出最多队伍数。思路:因为数据范围比较小,可以之间枚举w。再用桶mh[]统计每个能力值成员的数量,挨个组队判断改w下的成队数量。代码实现:#include#defineendl'\n'#definenullNULL#definelllonglong#defineintlonglong#de
S atur
·
2020-08-13 10:59
比赛&训练
水题合集
Codeforces Round #656 (Div. 3) D. a-Good String
CodeforcesRound#656(
Div.3
)D.a-GoodString题目链接Youaregivenastrings[1…n]consistingoflowercaseLatinletters.Itisguaranteedthatn
旺 崽
·
2020-08-11 18:32
DFS
字符串
Codeforces
[codeforces 1385D] a-Good String 每次都面临两种选择(练习递归的好题)
CodeforcesRound#656(
Div.3
)参与排名人数11542早睡早起身体好[codeforces1385D]a-GoodString每次都面临两种选择(练习递归的好题)总目录详见https
mrcrack
·
2020-08-11 17:38
codeforces
[codeforces 1367E] Necklace Assembly 根据周期进行分块,每块相应位置的字母都需雷同
CodeforcesRound#650(
Div.3
)参与排名人数11978[codeforces1367E]NecklaceAssembly根据周期进行分块,每块相应位置的字母都需雷同总目录详见https
mrcrack
·
2020-08-11 17:38
codeforces
Codeforces D. a-Good String ( dfs / 暴力) (Round #656
Div.3
)
传送门题意:字符串如果长度=1并且为’a’;当长度>1时,需要满足一半全是a,另一半必须为b-good字符串,依次类推下去,这就是a-good字符串。你可以选择某个字符并将它改变,题目需找到最小的选择数使得初始字符串变成一个a-good。思路:比赛的时候想成二分+递归判断被卡了一个小时,呜呜呜太菜了。看了别人的题解才知道原来直接dfs所有的情况,计算出不同的字符数再求个min就好。详情看代码,不过
S atur
·
2020-08-11 16:29
比赛&训练
图论
Codeforces Round #575(
Div.3
) Problem-A & B & C
A.ThreePilesofCandies签到题#includeusingnamespacestd;typedeflonglongLL;LLa[3];intmain(){intq;scanf("%d",&q);while(q--){scanf("%lld%lld%lld",&a[0],&a[1],&a[2]);sort(a,a+3);LLalice,bob;alice=a[0],bob=a[1];
成龙大侠
·
2020-08-11 12:39
codeforces
【CF】Codeforces Round #540 (Div. 3)(C-F)部分题解
CodeforcesRound#540(
Div.3
)【小结】:比赛时只完成了3个题,但是杨哥哥已经完成了7个题,而且有些题补题补得我脑阔疼,终于发现差距在哪里了,差距就是你在刷题的时候别人也在刷题,你在玩的时候别人也在刷题
Z_sea
·
2020-08-11 11:47
CF
二分
dfs/bfs
搜索
CF题解
CodeforcesRound#579(
Div.3
)2019年8月17日23:44:37A.CircleofStudents题意:给你一个数组问你里面的值,如果是顺时针或逆时针连续,就输出YES,不连续输出
Cheng Yu
·
2020-08-11 10:02
CF
CF #661
Div.3
1399D Binary String To Subsequences
分类:队列、模拟题意:给出一串01序列,分割这一序列,使分割成的序列没有连续的0或1,最少能分割成几个序列,并依次输出每个字符所在的序列编号思路:使用两个队列q0,q1分别存储0和1的下标,使用数组pos存储第i个字符所在的子序列编号,使用num记录当前子序列数量遍历字符串,若字符为0,则判断队列q1是否为空,-若q1不为空,说明当前存在子序列以1结尾,不用另外开辟一个子序列,直接接上去就行了。(
mianing
·
2020-08-11 04:31
2020暑假补题记录
Codeforces Round #661 (Div. 3) D. Binary String To Subsequences
CodeforcesRound#661(
Div.3
)BinaryStringToSubsequences题目链接题意01的无序串中,找到010101……或10101……的有序子串,并进行序号标记。
双木林233
·
2020-08-11 03:42
代码
算法题
Codeforces Round #661 (Div. 3) E1. Weights Division (easy version)
CodeforcesRound#661(
Div.3
)E1.WeightsDivision(easyversion)题目链接Youaregivenaweightedrootedtree,vertex1istherootofthistree.Atreeisaconnectedgraphwithoutcycles.Arootedtreehasaspecialvertexcalledtheroot.Apa
旺 崽
·
2020-08-10 20:32
优先队列
DFS
Codeforces
Codeforces Round #661 (Div. 3)A-E2题解
CodeforcesRound#661(
Div.3
)A-E2题解//写于大号rating值2184/2184,小号rating值1662/1662//打星场,打了21分钟后读错了E1的题意以为是要每条叶子到根的路径权值均不大于
StandNotAlone
·
2020-08-10 14:36
codeforces
算法
Codeforces Round #605 (Div. 3) 题解
CodeforcesRound#605(
Div.3
)【A.ThreeFriends】【题目大意】有三个人在一维坐标轴x上,坐标依次为a,b,c,每个人可以移动一次或者不移动,问abs(a-b)+abs(
CUG_YZL
·
2020-08-10 04:25
codeforces
[codeforces 1399D] Binary String To Subsequences 交错的两个栈(0栈,1栈)
CodeforcesRound#661(
Div.3
)参与排名人数12987[codeforces1399D]BinaryStringToSubsequences交错的两个栈(0栈,1栈)总目录详见https
mrcrack
·
2020-08-09 22:49
codeforces
上一页
1
2
3
4
5
下一页
按字母分类:
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
其他