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
CodeForces Round #532(
div.2
)部分题解
慢慢更。。假期好好刷刷CF,但是本人水平实在有限。见谅。A.RomanandBrowserhttp://codeforces.com/contest/1100/problem/A题意:大概就是给出一组由-1和1组成的数列,求一次线性关系删除指定数后剩下的-1和1的数量差绝对值最大。思路:线性关系,而且是一次方程的话,用两个变量模拟暴力。数据量好像不大。AC代码如下:#include#include
Sensente
·
2020-08-23 23:18
CodeForces
[Codeforces Round #310 (Div. 2)] #ABC题解
题目链接:CodeforcesRound#309(
Div.2
)A.CaseofZerosandOnes[Description]给定一个01串,相邻的0和1可以消掉,问最终这个串最短可以消到多长。
Codeplay0314
·
2020-08-23 07:47
codeforces
【LGR-062】洛谷10月月赛 III
div.2
(赛后题解)
A小D与笔试这种题目,写个Trie随便切。#include#include#defineN110#defineNN11000usingnamespacestd;structnode{inta[30],id;}tr[NN];intlen=1;voidadd(charss[],intid){inted=strlen(ss+1),x=1;for(inti=1;i=1;i--){if(st[x][i]!=
zhangjianjunab
·
2020-08-23 04:04
打比赛
Codeforces #493
div.2
(A, B, C)
A.模拟#include#include#includeusingnamespacestd;intmain(){intn,sum=0;;inta[15],pos[1005];scanf("%d",&n);for(inti=1;i#include#include#includeusingnamespacestd;intn,B;inta[105],b[105];ints[105];intco[105]
elorole
·
2020-08-23 04:03
Codeforces
Codeforces Round #495 (Div. 2)
题目链接:CodeforcesRound#495(
Div.2
)A:最左边和最右边是一定就可以放的,枚举中间的每个间距,特判间距为2*d的情况即可。
青烟绕指柔!
·
2020-08-23 03:03
Codeforces
【LGR-067】洛谷 1 月月赛 II & CSGRound 3
Div.2
1/2//在我目前能力范围内的写完了,拿到了该有的分数。P6013[CSGRound3]压岁钱注意数据范围int会超,改longlong解封的钱在任何一件时间发生前都有可能解封。#include#include#include#include#include#include#include#include#include#include#include#include#include#define
Tsukinousag1
·
2020-08-23 03:34
codeforces #625
div.2
C. Remove Adjacent
C.RemoveAdjacentYouaregivenastringsconsistingoflowercaseLatinletters.Letthelengthofsbe|s|.Youmayperformseveraloperationsonthisstring.Inoneoperation,youcanchoosesomeindexiandremovethei-thcharacterofs(s
buct_lurker
·
2020-08-23 02:01
Irrigation【codeforces1181D】【可持久化线段树维护第K小+二分搜索】
CodeforcesRound#567(
Div.2
).DD.Irrigationtimelimitpertest2.5secondsmemorylimitpertest512megabytesinputstandardinputoutputstandardoutputMishawasinterestedinwaterdeliveryfromchildhood.That'swhyhismothers
Andres_Lionel
·
2020-08-23 02:56
数据结构
线段树
【LGR-062】洛谷10月月赛 III
div.2
C D
小C与桌游题意有向无环图,走到一个能够更新当前走过的点标号最大值的点,就可以加一或者减一。求每次都加能加最多,每次都减能减最少。有趣的题目,满脑子都是哈尔滨重现了!!这种思维题比哈尔滨III简单一点,但是我依然没想出来,虽然已经特别接近了。要求找到一个策略:首先肯定要是拓扑序的走,那么队列有多个点,应该选哪一个呢?当前最大值为MMM,如果比MMM小的点,可以随便放,显然不会影响结果还可以增加选择。
mxYlulu
·
2020-08-23 02:56
洛谷
【LGR-073】洛谷 7 月月赛
Div.2
B 混凝土数学
题目描述:点击这里思路:对于30%pts(n≤200),30\%pts(n≤200),30%pts(n≤200),暴力枚举即可,时间复杂度O(n3)O(n^3)O(n3)。对于另外20%pts(20\%pts(20%pts(木棍长度全部相等),),),考虑用数学思想,即Cn3C^3_{n}Cn3。正解:1.利用桶排序,将每个数出现的次数统计出来。2.进行分段讨论,在它前面的所有数一组,后面的所有数
fy4815
·
2020-08-23 01:31
洛谷
Codeforces Round 508(
DIv.2
) (A, B, C, D)
A模拟题解:用cnt[i][j]表示第字母i(0-25)在字符串(0-j)的出现次数。然后枚举一下cnt[i][n-1]的最小值即可。#include#include#include#includeusingnamespacestd;constintmaxn=100005;intcnt[26][maxn];chars[maxn];intn,k;boolcheck(intx,intlen){for(
elorole
·
2020-08-23 00:59
Codeforces
Codeforces #495
div.2
(A, B, C)
A.模拟#includeusingnamespacestd;intn,d,ans;inta[105];intmain(){cin>>n>>d;for(inti=1;i>a[i];ans+=2;for(inti=2;i2*d)ans+=2;}cout#includeusingnamespacestd;intmain(){intn,m,l,r;scanf("%d%d",&n,&m);for(inti=
elorole
·
2020-08-23 00:28
Codeforces
【LGR-075 洛谷 8 月月赛 II
Div.2
】 T1 造房子【数学】
题目描述pigstd有aa个A材料和bb个B材料,造第ii层楼需要ii个A材料与ii个B材料。但是pigstd觉得房子不够高,于是他拿出了cc块钱,每块钱都可以用来买11个A材料或者11个B材料。现在pigstd想知道,他最多能建多少层楼的房子。输入格式第一行三个整数a,b,ca,b,ca,b,c。输出格式一行一个整数,表示pigstdpigstdpigstd最多能建多少层楼的房子。输入输出样例输
SSL KJ
·
2020-08-23 00:44
数学
洛古
【LGR-075 洛谷 8 月月赛 II
Div.2
】T2 排列 【数学】
题目描述pigstd有一堆数,他想在这么多数中选出若干个数排成一列,记为x1,x2,⋯,xpx_1,x_2,⋯,x_px1,x2,⋯,xp(p为数的个数)。这一列数合法当且仅当满足以下条件:p≥2p≥2p≥2。令yi=xi+1−xiy_i=x_i+1−x_iyi=xi+1−xi(特别的,yp=x1−xpy_p=x_1−x_pyp=x1−xp),如果把y1y_1y1到ypy_pyp按y1,y2,⋯,
SSL KJ
·
2020-08-23 00:44
数学
洛古
CodeForces #647
Div.2
ABC
A题意描述问一个数能否通过有限次左移1,2,3位或者右移1,2,3位变成另一个数。思路只需要知道较小那个数通过左移(扩大为原来的2倍)操作能否变成较大那个数就行了,然后为了使得操作次数最少,所以能移动3次就不移动2次。importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){Scannersc=newSca
源大郎
·
2020-08-21 15:48
算法/数据结构
Codeforces Round #659 (Div. 2)
CodeforcesRound#659(
Div.2
)题号类型难度备注A1384ACommonPrefix字符串构造1B1384BKoaandtheBeach贪心3好题!
是Mally呀!
·
2020-08-21 10:59
ACM解题笔记
Codeforces题解整合【按照场次】
CodeforcesRound#383(
Div.2
)【A.B.C.D.E】:http://blog.csdn.net/mengxiang000000/article/details/53503168http
mengxiang000000
·
2020-08-21 00:16
Codeforces Round #532 (Div. 2)-F. Ivan and Burgers-线性基
CodeforcesRound#532(
Div.2
)-F.IvanandBurgers-线性基【Description】Ivanlovesburgersandspendingmoney.ThereareburgerjointsonthestreetwhereIvanlives.Ivanhasfriends
__Simon_
·
2020-08-20 22:08
数学
CodeForces 1100F Ivan and Burgers
CodeForces题面Timelimit3000msMemorylimit262144kBSourceCodeforcesRound#532(
Div.2
)Tagsdatastructuresdivideandconquergreedymath
weixin_30361641
·
2020-08-20 21:42
[codeforces 1355C] Count Triangles 公式推导+找规律+双指针+排列组合中的乘法原理
CodeforcesRound#643(
Div.2
)参与排名人数11475[codeforces1355C]CountTriangles公式推导+找规律+双指针+排列组合中的乘法原理总目录详见https
mrcrack
·
2020-08-20 03:21
codeforces
Berzerk CodeForces - 787C (BFS)题解
CodeforcesRound#406(
Div.2
)——A-BerzerkA.Berzerktimelimitpertest4secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputRickandMortyareplayingtheirownversionofBerzerk
Sega_hsj
·
2020-08-19 10:34
图论
【补题计划】Codeforces Round #533+#534(
Div.2
)
#533D.KilaniandtheGame模拟一个游戏,每轮每个玩家可以把距离他拥有的领地的ki步内的格子占领,不能跨越别人的领地以及障碍,问最终每个人占领多少个格子。写了好几种写法,然后调完才发现是不对的。最终写了分轮dfs,每个人都有一个bfs队列。对于每一轮知道玩家占领格子的最远距离,当队列头是这些格子时就break出去,下一轮才会考虑从这些格子拓展,就能模拟出这题了。#includeus
Sega_hsj
·
2020-08-19 10:02
codeforces
Codeforces Round #538 (Div. 2) (A-E题解)
CodeforcesRound#538(
Div.2
)题目链接:https://codeforces.com/contest/1114A.GotAnyGrapes?
dft539533
·
2020-08-19 09:50
Subsequence Hate (二进制 / 思维) (Round #646
Div.2
)
传送门题意:求出最小删除字符数,以使二进制串s不含有"101"和"010"这样的子串。思路:可以看出,字符串不能出现’0’,'1’交替出现的情况。即只有"1111……",“0000……”,"1111……0000"和"0000……1111"这四种情况。所以用前缀和记录一下’0’和’1’的个数再计算求个min就行啦代码实现:#include#defineendl'\n'#definenullNULL#
S atur
·
2020-08-19 06:30
二进制
比赛&训练
Codeforces Round #664(
Div.2
) A,B,C,D
ABoboniuLikestoColorBalls分情况讨论一下即可。全为偶数,或者三个为偶数,是肯定可以的。只有两个为偶数是肯定不可以的。有一个为偶数,或者没有一个是偶数的情况,得看是否红,蓝,绿气球都有,如果都有则可以(可以转化成成立的情况),否则不可以。#include#includeusingnamespacestd;intT,r,g,b,w;intmain(){scanf("%d",&T
nefu_cbw
·
2020-08-18 18:55
Codeforces排位日记
算法
2020赛季CF训练记录
ILLLZKQF05.09CodeforcesRound#640(Div.4)solved:7/7补题:7/705.14CodeforcesRound#642(Div.3)solved:6/6补题:6/605.16CodeforcesRound#643(
Div
syh0313
·
2020-08-18 16:15
训练记录
Okabe and Boxes(
Div.2
)
题目链接:http://codeforces.com/contest/821/problem/CC.OkabeandBoxestimelimitpertest3secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputOkabeandSuperHackerDaruarestackingandremoving
qq_34287501
·
2020-08-18 09:10
Codeforces
0-1 MST【补图的联通块个数】【Codeforces 1243 D】
CodeforcesRound#599(
Div.2
)D首先,这道题中,补图是可以通过0权值的边权链接起来的,那么就是最优解,但是这里的N有1e5,所以直接用补图的话会开不下这么大的空间还有不足这样的时间
Andres_Lionel
·
2020-08-18 01:14
Codeforces
图论
[codeforces 1323C] Unusual Competitions 栈呼之欲出
CodeforcesRound#626(
Div.2
,basedonMoscowOpenOlympiadinInformatics)比赛人数5260[codeforces1323C]UnusualCompetitions
mrcrack
·
2020-08-18 00:41
codeforces
[codeforces 1362B] Johnny and His Hobbies 异或+排序
CodeforcesRound#647(
Div.2
)-Thanks,AlgoMuse!
mrcrack
·
2020-08-18 00:41
codeforces
洛谷8月月赛I
Div.2
题解
SolutionA高精度加法板子,注意10k10^k10k不需要使用普通的高精度乘方,可以直接求出。B较容易发现规律:①当a=0,b=0a=0,b=0a=0,b=0时,显然输出000;②当a=0a=0a=0时,我们只需要将aaa乘上一个巨大的值,将bbb除以一个巨大的值即可,代价为qqq;③b=0b=0b=0同理;④当a≠ba≠ba=b且a,b≠0a,b≠0a,b=0时,我们需要这么操作:(1
Cherrt
·
2020-08-17 19:56
比赛题解
数据结构
Codeforces Round #648 (Div. 2)题解(A,B,C,D)
CodeforcesRound#648(
Div.2
)题解(A,B,C,D)A题:题意:给你一个矩阵,两个人轮流进行游戏,每个人的回合都要选择一个位置(i,j),把它置为1,前提是第i行和第j列都没有1.
wut_zz
·
2020-08-17 16:40
acm竞赛
Codeforces Round #228 Fox and Card Game 解题报告
这次没敢用大号打Div.1,就新注册了一个小号又打了盘
Div.2
,幸好第三题在multiset遍历并删除那里卡了半小时,只涨到了1693,差7分就只能又注册个小号了,以现在的局势还能再打一盘
Div.2
。
ArthurYang
·
2020-08-17 14:35
ACM
Educational Codeforces Round 84
EducationalCodeforcesRound84(
Div.2
)(1327)感想完美错过的一场,记错时间了。。。不过感觉题目质量蛮高。
Edward-Tsui
·
2020-08-17 12:04
心得
CF #638(
div.2
)
凤凰专场文章目录A.PhoenixandBalanceB.PhoenixandBeautyC.PhoenixandDistributionD.PhoenixandScienceE.PhoenixandBerriesF.PhoenixandMemoryA.PhoenixandBalance题意:有n个硬币分别重21,22,...,2n(n∈even)2^1,2^2,...,2^n~(n\ineven
半缘、
·
2020-08-17 07:03
整合
Codeforces Round #588 (Div. 2)
CodeforcesRound#588(
Div.2
)AB略C.AnadiandDomino题意:有如图所示的21个多米诺骨牌,给定一个无向图(无自环,无重边),一条边上可以放置一个多米诺骨牌。
mizp
·
2020-08-17 06:44
codeforces
Codeforces Round #646 (Div. 2) E(贪心,bfs)
CodeforcesRound#646(
Div.2
)E题目大意:给一棵树,每个节点有三个权值A,B,C,(B,C为0或1),每次你可以花费A[u]*k的代价让A子树中的任意k个节点交换彼此的B,问让所有节点的
lalalzo
·
2020-08-17 05:06
思维
Codeforces Round #632 (Div. 2)巧用小技巧
CodeforcesRound#632(
Div.2
)点这Eugenelikesworkingwitharrays.Andtodayheneedsyourhelpinsolvingonechallengingtask.Anarraycisasubarrayofanarraybifccanbeobtainedfrombbydeletionofseveral
lalalzo
·
2020-08-17 05:05
思维
Codeforces Round #258 (Div. 2)[ABCD]
CodeforcesRound#258(
Div.2
)[ABCD]ACM题目地址:CodeforcesRound#258(
Div.2
)A-GameWithSticks题意:AkshatandMalvika
hcbbt
·
2020-08-17 05:16
+Codeforces
=====算法相关=====
codeforces 619(
Div.2
)E. Nanosoft
题意:给定一个n∗m,(1usingnamespacestd;typedeflonglongll;constintmaxn=509;//0r1g2y3b;intcol[maxn][maxn][4];//前缀和;chars[maxn][maxn];boolcheck(intr1,intc1,intlen,inti){intr2=r1+len-1,c2=c1+len-1;//cout>1;if(che
cy41
·
2020-08-17 05:35
小技巧
倍增
Codeforces Round #662 (Div. 2) 题解.
CodeforcesRound#662(
Div.2
)题解A.RainbowDash,FluttershyandChessColoring阅读题,题意比较难理解,但是读懂题多画几个例子之后就能发现答案其实就是
DrumWashingMachine
·
2020-08-17 04:05
codeforces
CF VP记录
10CodeforcesRound#549(Div.1)1/52020/2/11EducationalCodeforcesRound56(RatedforDiv.2)4/72020/2/12CodeforcesRound#526(
Div
willingox555
·
2020-08-17 04:28
codeforces
cf情况汇总
CodeforcesRound#619(
Div.2
)4/6rank62+106博客EducationalCodeforcesRound82(RatedforDiv.2)4/6rank1106-45博客Codeforces
willingox555
·
2020-08-17 04:28
codeforces
[Codeforces Round #530 (Div. 2)] A,B,C
[CodeforcesRound#530(
Div.2
)]A,B,C前言:这是一场十分难受的cf,分数1551→1548,基本上算是变化不大,4min出的A,有点慢,但是考虑到题意稍微有点坑人,总的来说能够接受
落笋
·
2020-08-17 02:11
codeforces
Codeforces Round #442(
Div.2
)Problem D Olya and Energy Drinks(BFS)
D.OlyaandEnergyDrinkstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputOlyalovesenergydrinks.Shelovesthemsomuchthatherroomisfullofemptycansfromenergydrinks.Fo
c_cl
·
2020-08-17 00:32
图论
Codeforces 1333C. Eugene and an array(思维) /详解
CodeforcesRound#632(
Div.2
)C.Eugeneandanarray题意:求出一个数列中子区间满足此区间的任意子区间之和不为0的区间个数。
我不会DP
·
2020-08-16 23:12
acm
Codeforces Round #608 (Div. 2) && Codeforces Round #607 (Div. 2)
CodeforcesRound#607(
Div.2
)A-SuffixThree#includeusingnamespacestd;intmain(){strings;intt;scanf("%d",&t
Huah_2018
·
2020-08-16 23:37
Codeforces Round #591 (Div. 2, based on Technocup 2020 Elimination Round 1)C. Save the Nature
CodeforcesRound#591(
Div.2
,basedonTechnocup2020EliminationRound1)C.SavetheNature题意:一批商品,位置为a的倍数和b的倍数可以获利
w_uxidixi
·
2020-08-16 23:54
Codeforces
弱鸡二分
Omkar and Baseball (Round #655
Div.2
)
#include#include#include#include#include#include#includeusingnamespacestd;#defineINF0x3f3f3f3fconstintmaxn=150;intt,n;inta[maxn];intmain(){cin>>t;while(t--){cin>>n;intcnt=0;for(inti=1;i>a[i];if(a[i]!=
Spike Valentine
·
2020-08-15 17:53
Codeforces Beta Round #49 (Div. 2)
CodeforcesBetaRound#49(
Div.2
)http://codeforces.com/contest/53A1#include2usingnamespacestd;3#definelsonl
weixin_30698527
·
2020-08-15 16:06
上一页
2
3
4
5
6
7
8
9
下一页
按字母分类:
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
其他