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
Garland
C-Garland参考:CodeforcesRound#612(
Div.2
)A~E2题解试了试暴力的方法,感觉不大行,所以转战dp总共有四个状态\(dp[x][i][j][bj]\),表示还有i个奇数,
CADCADCAD
·
2020-01-08 21:00
Codeforces Round #612 (Div. 2) 前四题题解
CodeforcesRound#612(
Div.2
)前四题题解这场比赛的出题人挺有意思,全部magic成了青色。还有题目中的图片特别有趣。
Angel_Kanade
·
2020-01-06 19:00
#601 (Div. 2)
CodeforcesRound#601(
Div.2
)C-LeagueofLeesins题意:有一个由数字1~n构成的序列,现在给你这个序列所有相邻3个数的值,他们不一定按顺序。
A_sc
·
2020-01-01 09:00
codeforces D. Domino for Young(二分匹配-黑白染色)详解
CodeforcesRound#609(
Div.2
)D.DominoforYoungtimelimitpertest3secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenaYoungdiagram.Givendiagramisahistogramwithnncolumnsofle
嫑
·
2019-12-28 15:00
codeforces-C. Long Beautiful Integer(字符串处理)
CodeforcesRound#609(
Div.2
)-C.LongBeautifulIntegertimelimitpertest3secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenanintegerxxofnndigitsa1
嫑
·
2019-12-27 00:00
【日记】12.24/【题解】CF #610 (
Div.2
)
12.24DP1.洛谷P1880:环形石子合并思路:对于直线形,就是枚举所有区间,dp[i][j]表示i-j石子合并后的最小或最大代价,之后枚举分点来转移,因此时间复杂度\(O(n^3)\)。遍历时按照长度来从小到大求解。环形的话,延长两倍,但枚举len时上限仍然为n-1。最后遍历所有长度为n-1的区间,取最大或最小即可。题解:#includeusingnamespacestd;constintM
diorvh
·
2019-12-25 11:00
CUC-SUMMER-9-B
B-HongcowBuildsANationCodeforcesRound#385(
Div.2
)Hongcowisruleroftheworld.Asruleroftheworld,hewantstomakeiteasierforpeopletotravelbyroadwithintheirowncountries.Theworldcanbemodeledasanundirectedgraphwi
Nioge
·
2019-12-22 10:02
CUC-SUMMER-8-E
E-BakeryCodeforcesRound#368(
Div.2
)Mashawantstoopenherownbakeryandbakemuffinsinoneofthencitiesnumberedfrom1ton.Therearembidirectionalroads
Nioge
·
2019-12-20 05:54
【日记】12.15/【题解】CodeForces #607(
Div.2
)
12.15今日比赛,回来随手VP了一下CF#607(Div2)CF#607A:根据后缀判断三种语言。直接大暴力就行了,没什么可说的。#includeusingnamespacestd;intmain(){intT;scanf("%d",&T);for(intz=1;z>s;inted=s.size()-1;if(s[ed-1]=='p'&&s[ed]=='o')printf("FILIPINO\n
diorvh
·
2019-12-16 00:00
Codeforces Round #608 (Div. 2) 题解
目录CodeforcesRound#608(
Div.2
)题解前言A.Suits题意做法程序B.Blocks题意做法程序C.ShawarmaTent题意做法程序D.Portals题意做法程序E.CommonNumber
BlahDuckling747的博客
·
2019-12-15 22:00
A - Happy Birthday, Polycarp!
CodeforcesRound#606(
Div.2
,basedonTechnocup2020EliminationRound4)A.HappyBirthday,Polycarp!
嫑
·
2019-12-15 14:00
Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3)
CodeforcesRound#602(
Div.2
,basedonTechnocup2020EliminationRound3)A.MathProblem题意:有t组数据,每组数据给出n个范围[Li,Ri
blacktion
·
2019-11-26 06:00
Codeforces Round #601 (Div. 2)
CodeforcesRound#601(
Div.2
)A.ChangingVolume题意:有T组数据,每组数据给两个数a和b,每次可以对a进行(-5,-2,-1,+1,+2,+5)操作中的一种,问从a转换为
blacktion
·
2019-11-21 13:00
【LGR-065】洛谷11月月赛 III
Div.2
临近$CSP$......下午打了一发月赛,感觉很爽。非常菜的我只做了前两题......然而听说前两题人均过......写法不优秀被卡到$#1067$......T1:基础字符串练习题:前缀和水题,只需要维护前缀最小值即可很菜的我选择了用堆维护,凭空多了个$log$。于是就慢成**了。注意特判$0$、$1$的情况。参考代码:1#include2#include3#include4#defineN1
szmssf
·
2019-11-14 07:00
洛谷11月月赛 I & MtOI2019 Ex
Div.2
C
题意已知构成凸多边形的条件为,任意n−1n-1n−1条边之和大于最后一条边。我们用最小的加起来比较能不能超过最大的,来判断是否可以构成凸多边形。一个合法方案的价值为选的边数,求总期望。一共有nnn条边,第iii条边权值为iii题解首先是肯定可以dpdpdp的,但是dpdpdp是三维的,计算出前iii位能组成的和。如何优化呢?首先,正难则反,我们可以计算出所有方案都合法,则期望为∑i=1nC(n,i
mxYlulu
·
2019-11-11 11:16
洛谷
codeforce Round #599(
Div.2
)
题目传送门A.MaximumSquare题目意思是给你n个长条,每个长条的高度是num[i](02#include3#include4#include56usingnamespacestd;7constintma=2e5+10;8intnum[1005];9intn;1011intmain()12{13intk;14scanf("%d",&k);15while(k--)16{17scanf("%d
好学生就是我
·
2019-11-10 21:00
CUC-SUMMER-10-B
B-Beru-taxiCodeforcesRound#367(
Div.2
)Vasiliylivesatpoint(a, b)ofthecoordinateplane.Heishurryinguptoworksohewantstogetoutofhishouseassoonaspossible.NewappsuggestednavailableBeru-taxinearby.Thei-thtaxii
Nioge
·
2019-11-08 17:14
【LGR-063】洛谷11月月赛 I & MtOI2019 Ex
Div.2
[MtOI2019]黑蚊子多:送分向水题,直接模拟即可。1#include2#include3#defineN15054usingnamespacestd;5intn,m,k,a[N],now,ans,hve[N];6intmain()7{8cin>>n>>m>>k;9for(inti=1;i>a[i],hve[a[i]]=1;10while(now2#include3#include4#incl
szmssf
·
2019-11-04 10:00
Codeforces Round #594 (Div. 2)
CodeforcesRound#594(
Div.2
)A.IntegerPoints题意:给出若干个\(y=x+p\)和\(y=-x+q\)求它们交点坐标为整数的个数思路:\(y=x+p\)与\(y=-x
Misuchii
·
2019-10-21 22:00
洛谷【LGR-061】洛谷10月月赛 II & X Round 4
Div.2
【XR-4】歌唱比赛
题目链接:https://www.luogu.org/problem/P5595?contestId=21737开始是先抢了分,然后将所有部分补齐。题目描述:小X参加了一场歌唱比赛。经过一路鏖战,小X终于挺进了决赛,他的对手是小Y。这场歌唱比赛的冠军是由点赞数决定的,谁的点赞数高,谁就能夺冠。小X和小Y依次演唱完自己的最后一首歌曲后,他们最终的点赞数确定了下来。揭晓冠军的时刻终于到来了,主持人为了
就是小马啊
·
2019-10-21 10:00
D. Happy Tree Party CodeForces 593D【树链剖分,树边权转点权】
CodeforcesRound#329(
Div.2
)D.HappyTreePartytimelimitpertest3secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputBogdanhasabirthdaytodayandmomgavehimatreeconsistingofnvertecies.Fo
茄子Min
·
2019-10-20 00:00
Codeforces Round #589 (Div. 2)-E. Another Filling the Grid-容斥定理
CodeforcesRound#589(
Div.2
)-E.AnotherFillingtheGrid-容斥定理【ProblemDescription】在\(n\timesn\)的格子中填入\([1,k]
__Simon
·
2019-10-01 13:00
Codeforces Round #589 (Div. 2)-E. Another Filling the Grid-容斥定理
CodeforcesRound#589(
Div.2
)-E.AnotherFillingtheGrid-容斥定理【ProblemDescription】在\(n\timesn\)的格子中填入\([1,k]
Simon
·
2019-10-01 13:00
Codeforces Round #588 (Div. 2)-E. Kamil and Making a Stream-求树上同一直径上两两节点之间gcd的和
CodeforcesRound#588(
Div.2
)-E.KamilandMakingaStream-求树上同一直径上两两节点之间gcd的和【ProblemDescription】给你一棵树,树上每个节点都有一个权值
__Simon
·
2019-09-27 16:00
Codeforces Round #585 (Div. 2)
CodeforcesRound#585(
Div.2
)这场比赛和机房大佬一起打的,打的我心态爆炸。
准点的星辰
·
2019-09-17 21:00
Codeforces Round #581 (Div. 2)-E. Natasha, Sasha and the Prefix Sums-动态规划+组合数学
CodeforcesRound#581(
Div.2
)-E.Natasha,SashaandthePrefixSums-动态规划+组合数学【ProblemDescription】给你\(n\)个\(1\)
__Simon
·
2019-08-29 13:00
CF1206(
Div.2
)D Shortest Cycle
题目传送门当时打cf的时候前面3题都做得飞快(虽然T3的结论没有严谨证明,但是前面3题都直接过PP,最后AC的结果到D题就干不动了如果只是个裸的最短环的话,还比较好办,但是这题数据范围太大,挨个枚举点相与来判断两点之间有没有边的话,建图都会超时。下不了手[无奈.jpg]最后还是大佬一语点醒了梦中人,好吧,这道题需要一个结论(怎么又是结论,我最不擅长结论了嘤嘤嘤):如果,某一位上为1的数不小于3个,
杏花疏影里_吹笛到天明
·
2019-08-20 17:59
思维
Codeforces Round #578 (Div. 2)-D. White Lines-差分前缀和
CodeforcesRound#578(
Div.2
)-D.WhiteLines-差分前缀和【ProblemDescription】给你一个字符矩阵,其中B表示黑色,W表示白色。
__Simon_
·
2019-08-15 19:02
Codeforce
Codeforces Round #578 (Div. 2)
CodeforcesRound#578(
Div.2
)传送门A.Hotelier暴力即可。
heyuhhh
·
2019-08-13 20:00
Codeforces Round #551 (
Div.2
) 题解 (翻车记)
原文链接:http://www.cnblogs.com/Apocrypha/p/10707367.htmlCodeforcesRound#551(
Div.2
)题解\(Out\\of\\Competition
dieyi9889
·
2019-04-14 21:00
Codeforces Round #545 (Div. 2) F. Cooperative Game
CodeforcesRound#545(
Div.2
)F.CooperativeGame题目链接:https://codeforces.com/contest/1138/problem/F不知道该说神仙题还是傻屌题
Albert_6565
·
2019-03-21 20:00
Codeforces Round 542 (Div. 2)
layout:posttitle:CodeforcesRound542(
Div.2
)author:"luowentaoaa"catalog:truetags:mathjax:true-codeforces
luowentao
·
2019-02-25 23:00
Codeforces Round #532 (Div. 2)
Contests链接:CodeforcesRound#532(
Div.2
)A.RomanandBrowser题意RomanRomanRoman最开始打开了nnn个网页,所有网页要么是个测试网页,要么是一个社交网页
Dmaxiya
·
2019-01-16 20:55
Codeforces
Codeforces Round #532 (Div. 2)
Contests链接:CodeforcesRound#532(
Div.2
)A.RomanandBrowser题意RomanRomanRoman最开始打开了nnn个网页,所有网页要么是个测试网页,要么是一个社交网页
Dmaxiya
·
2019-01-16 20:55
Codeforces
2018年11月22日训练总结
晚上cf的
div.2
由于赶论文作业就没打。。。发现cfdiv.2的最后三道题真的需要练会。不然水平没法提高。。。(最后一道可以暂时不练,因为那种程度的难题需要我消耗大量的时间,还不一定能看懂
LSD20164388
·
2018-11-23 11:20
训练日记
终于在博客写完第一篇题解啦
用了三天……主要还是因为太懒,以后codeforces(
div.2
)或(div.1+div2)只要参加了就写个题解。
nblyz2003
·
2018-10-31 15:00
2018.9.30 ~ 2018.11.1 做题记录
USACO08NOV]奶牛混合起来MixedUpCows状压动归注意空间ACB.PlanningTheExpedition:水到不行的二分,练英语2018.10.2上午:ACCodeforcesRound#499(
Div
EM-LGH
·
2018-09-30 22:00
Codeforces Round #507 (Div. 2, based on Olympiad of Metropolises) A, B, D, E
CodeforcesRound#507(
Div.2
,basedonOlympiadofMetropolises)A,B,D,E1040A.PalindromeDance题目链接题意:给一个串,由0,1,2
LFhase
·
2018-09-06 10:34
ACM
Codeforces
CodeForces的正确打开方式
昨晚心血来潮想打一局cf然而种种原因我一道题也没交比赛开始之后我才发现我没注册比赛根本交不了题目...而且codeforces的服务器瘫痪了只能看到pdf版的题目也因为服务器瘫痪所以这次的Div.1和
Div
OneLine_
·
2018-08-09 10:33
Topcoder SRM 674
Div.2
题解
T1解题思路这题应该不是很难,主要是题意理解问题。注意给出的两个数组里映射关系已经对应好了,只要判断是否为双射即可参考程序#includeusingnamespacestd;classRelationClassifier{public:stringisBijection(vectordomain,vectorrange);};intreflect[110],used[110];stringRela
chy528574785
·
2018-07-27 13:39
TC题解
树形DP
TopCoder SRM 667
Div.2
题解
概览:T1枚举T2状压DPT3DPTopCoderSRM667Div.2T1原题ProblemStatementYouaregiventwodistinctpointsAandBinthetwo-dimensionalplane.YourtaskistofindanypointCwiththefollowingproperties:CisdifferentfromAandB.Eachcoordin
chy528574785
·
2018-07-19 19:11
TopCoder
枚举
状压DP
DP
TC题解
枚举
状压DP
DP
vector的倒转效果
CodeforcesRound#258(
Div.2
),problem:(B)SorttheArray//http://codeforces.com/contest/451/problem/B题意:给一个数组
_TianZhirui
·
2018-04-06 10:23
【codeforces】Codeforces Round #441(
div.2
)
最近打了几场CF英语阅读能力大赛,表示爬了一百来分,然后R440一夜回到解放前。被英文枪毙的中国选手好吧,那进入今天的正题,纯属是为了要养成写博客的好习惯来码的。A.TripForMeal【timelimit】pertest1second【memorylimit】pertest512megabytesWinnie-the-Poohlikeshoneyverymuch!Thatiswhyhedeci
Dream_Lolita
·
2017-10-17 20:33
codeforces
codeforces
CUC-SUMMER-9-A
A-HolidaysCodeforcesRound#350(
Div.2
)OntheplanetMarsayearlastsexactlyndays(therearenoleapyearsonMars).
Nioge
·
2017-08-16 23:05
UESTC 2017 Summer Training #1
Div.2
正式参加的第一场div2大乱斗,也少有的再次感受到自己那种主场作战的自信。实力还不够强,也希望这不是自己最高的rank。A-GiantSnailMaze题目链接:https://vjudge.net/contest/169377#problem/ADescriptionItistheyearof2016andMarsisstillnotcolonized.Adaringgroupofimmorta
LZY_Starry
·
2017-07-09 11:11
2017暑假集训
CF#403(
Div.2
) 解题报告
A题意简述有2n双袜子,编号为1..n。按顺序从包中拿出,如果这只袜子的另一只还没有拿出,就放在桌子上,否则将桌子上的另一只拿走。求桌子上最多有多少只袜子。数据范围1≤n≤105题解模拟。。代码#include#include#include#include#include#include#include#include#includeusingnamespacestd;intn,x,now,an
Clove_unique
·
2017-03-06 11:08
题解
搜索
dp
贪心
模拟
二分
构造
stl
2-SAT
Codeforces Round #384(
Div.2
)(A~D)
A.Vladikandflightstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVladikisacompetitiveprogrammer.ThisyearheisgoingtowintheInternationalOlympiadinInformatics
科学旅行者
·
2017-02-19 11:07
Codeforces Round #384(
Div.2
)(A~D)
A.Vladikandflightstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVladikisacompetitiveprogrammer.ThisyearheisgoingtowintheInternationalOlympiadinInformatics
科学旅行者
·
2017-02-19 11:07
CF#398(
Div.2
) 解题报告
A题意简述有n个大小为1..n的物品,每一天会得到一个,物品必须由下而上按照从大到小的顺序摆放每一天会将已有的物品尽量摆放,问这n天的摆放方案数据范围1≤n≤100000题解只有一个物品只有当比它大的所有物品都得到时才能摆放模拟即可代码#include#include#include#include#include#include#include#include#includeusingnames
Clove_unique
·
2017-02-18 23:41
题解
搜索
贪心
模拟
CF#384 (
Div.2
) 解题报告
A题意有2家公司,相同公司互相传送花费为0,不同公司花费为坐标之差的绝对值。给出公司分布,问从a到b的花费最少是多少。题解如果ab公司相同,那么费用为0否则的话费用为1正确性显然B题意起始数字为1,然后经过如下变换:11211213121121312141213121…问第n-1次变换后第k个位置的数是多少题解可以发现这个数列满足二分的性质,那么从直接从n开始二分并且每一次都-1就可以了。这道题的
Clove_unique
·
2016-12-15 17:53
题解
dp
数学相关
模拟
二分
上一页
10
11
12
13
14
15
16
17
下一页
按字母分类:
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
其他