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
codeforce
Codeforce
s Round #582 (Div. 3) 题解
文章目录A.ChipsMoving(模拟,签到)B.BadPrices(思维,签到)A.ChipsMoving(模拟,签到)原题链接:http://
codeforce
s.com/contest/1213
有所为,无所畏
·
2020-08-11 10:59
算法
CF题解
Codeforce
sRound#579(Div.3)2019年8月17日23:44:37A.CircleofStudents题意:给你一个数组问你里面的值,如果是顺时针或逆时针连续,就输出YES,不连续输出
Cheng Yu
·
2020-08-11 10:02
CF
cf题解
Codeforce
s1325D-EhabtheXorcist早上看了别人写的博客,研究了好久才研究透,写一点自己的理解这道题,首先你拿到u,v两个数,根据二进制的关系,你可以知道,异或值不会大于和,只会小于等于和
a921893396
·
2020-08-11 10:18
题解 CF755D 【PolandBall and Polygon】
Codeforce
s755DPolandBallandPolygon题解题意:给你一个n边行,每次让你将x与(x+k)%n的点连一条边,每次询问该多边形内面积被划分成了几块分析:我们发现这个输出很有规律
Hacheylight
·
2020-08-11 10:37
Codeforce
s 786B - Legacy(线段树优化建图)
线段树优化建图板子题。。。。。。暴力建边\(\mathcalO(n^2)\)肯定会TLE但仔细分析可以发现,题面中有一个我们非常熟悉的字眼“区间”,这启示我们,可不可以以此作为解题的突破口呢?答案是肯定的。想到区间我们可以联想到各种我们很熟悉的trick,如前缀和、差分、线段树等。但对于此题而言前缀和、差分似乎都不太行,于是我们考虑线段树,利用“每一个区间都可以表示为线段树上\(\logn\)个区
ET2006
·
2020-08-11 10:00
ACM学习之路
基础算法【总结】素数筛方法详解【总结】最长连续子序列详细解法汇总【总结】常用排序算法详解【总结】快速幂及取模运算详解【总结】C++各种进制转换函数汇总比赛
Codeforce
sR
有所为,无所畏
·
2020-08-11 10:25
Codeforce
s Round #662 (Div. 2)题解
A.RainbowDash,FluttershyandChessColoringtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputOneeveningRainbowDashandFluttershyhavecomeupwithagame.Sincetheponiesa
狗蛋儿l
·
2020-08-11 06:24
算法
Codeforce
s Round #662 (Div. 2) 比赛中做出的四题
(被hack了b,从260掉到了496,人生第一次打这么好的比赛就被hack了,难受)ARainbowDash,FluttershyandChessColoring传送门:https://
codeforce
s.com
oj让我卡过一条吧
·
2020-08-11 06:42
算法训练
codeforces
cf-div2-
Codeforce
s Round #662 (Div. 2)
Codeforce
sRound#662(Div.2A-RainbowDash,FluttershyandChessColoring#includeusingnamespacestd;typedeflonglongll
抠脚老騷
·
2020-08-11 06:10
C++
acm
cf
acm竞赛
算法
c++
Codeforce
s Round #662 (Div. 2) [ A , B ] 题解报告
文章目录A.RainbowDash,FluttershyandChessColoringInputOutputExampleinputoutputNote思路myAcceptedcodeB.ApplejackandStoragesInputOutputExampleinputoutputNote思路myAcceptedcode[contestlink]A.RainbowDash,Fluttersh
CofDoria
·
2020-08-11 06:35
icpc
cf题解
Codeforce
s Round #662 (Div. 2) D.Rarity and New Dress
题目链接:https://
codeforce
s.com/contest/1393/problem/D题意:给你一个n*m的由字母组成的矩阵,,问你这个矩阵中有多少个“相同字母组成的菱形”,菱形规则看图更好理解比赛的时候一直想着以中心点
Han Gang
·
2020-08-11 06:03
cf
acm
dp
Codeforce
s Round #662 (Div. 2)补题
A.RainbowDash,FluttershyandChessColoring画图,找规律发现结果为n/2+1#include#include#include#include#include#include#include#include#include#include#include#defineM100#definelllonglongusingnamespacestd;intmain(){
是程心媛不是程序媛
·
2020-08-11 06:43
Pinkie Pie Eats Patty-cakes(思维+公式推导)
Codeforce
s Round #662 (Div. 2)
原题链接:https://
codeforce
s.com/contest/1393/problem/C题意:给定n个馅料的馅饼,你要尽量不经常吃同样馅料的馅饼。
叶的一生
·
2020-08-11 06:32
codeforces
思维
思维
codeforces
Applejack and Storages(数学+STL的使用)
Codeforce
s Round #662 (Div. 2)
原题链接:https://
codeforce
s.com/contest/1393/problem/B题意:仓库中原有n块给定长度的木板,我想通过这些木板来形成一个正方形,或者一个矩形(正方形也是矩形)。
叶的一生
·
2020-08-11 06:31
codeforces
STL的使用
算法
codeforces
Codeforce
s Round #662 (Div. 2)A-D题解
Codeforce
sRound#662(Div.2)A-D题解//写于大号rating值2184/2184,小号rating值1881/1881//本场拿小号打的,名次在div2选手排78,rating
StandNotAlone
·
2020-08-11 05:43
codeforces
算法
Codeforce
s Round #662 (Div. 2) / contest 1393
FluttershyandChessColoringBApplejackandStoragesCPinkiePieEatsPatty-cakesDRarityandNewDressE1E2ABCDE1E2√√√√(√:做出;●:尝试未做出;○:已补题)题目地址:https://
codeforce
s.com
dragonylee
·
2020-08-11 05:23
codeforces
Codeforce
s A. Rainbow Dash, Fluttershy and Chess Coloring (思维) (Round #662 div.2)
传送门题意:有n*n的方格棋盘,现有黄蓝两种颜色,一圈一圈的图色,使得上一圈与下一圈相邻。试问总共最少要图多少钱?思路:嗐,太菜了,被这个题卡了好久,还是队友先写出来。答案就是n/2+1。代码实现:#include#defineendl'\n'#definenullNULL#definelllonglong#defineintlonglong#definepiipair#definelowbit(
S atur
·
2020-08-11 05:49
比赛&训练
CodeForce
s - 490A AC me! 暴力 分组问题
Training1-F题TheSchool№0ofthecapitalofBerlandhasnchildrenstudyinginit.Allthechildreninthisschoolaregifted:someofthemaregoodatprogramming,somearegoodatmaths,othersaregoodatPE(PhysicalEducation).Hence,fo
许可可可可
·
2020-08-11 05:55
Codeforce
s 1247C 【思维】【2的幂】【二进制的特点】
C.p-binarySource
Codeforce
s1247Cp-binarySolution题意:把2k-p定义为2的k次幂,然后问最少需要多少个2的幂能够构成n.思路:首先枚举需要多少个2的幂,那么只用
SolitaryOrz
·
2020-08-11 04:30
思维题
Codeforce
s 1200C 【水题】
C.RoundCorridorAmugaeisinaverylargeroundcorridor.Thecorridorconsistsoftwoareas.Theinnerareaisequallydividedbynsectors,andtheouterareaisequallydividedbymsectors.Awallexistsbetweeneachpairofsectorsofsam
SolitaryOrz
·
2020-08-11 04:30
水题
Codeforces
思维题
Codeforce
s 1203D2
D2.RemovetheSubstring(hardversion)Theonlydifferencebetweeneasyandhardversionsisthelengthofthestring.Youaregivenastringsandastringt,bothconsistingonlyoflowercaseLatinletters.Itisguaranteedthattcanbeobt
SolitaryOrz
·
2020-08-11 04:30
Codeforces
思维题
Codeforce
s 1237C2 【几何】
C2.BalancedRemovals(Harder)Thisisaharderversionoftheproblem.Inthisversion,n≤50000.Therearendistinctpointsinthree-dimensionalspacenumberedfrom1ton.Thei-thpointhascoordinates(xi,yi,zi).Thenumberofpoints
SolitaryOrz
·
2020-08-11 04:29
Codeforces
几何
Educational
Codeforce
s Round 92 (Rated for Div. 2) A-F
数学和细节题十分不行的我,这场被打懵了。wa到自闭。A因为对两个数字求lcmlcmlcm,至少需要小的数字乘以二。所以我们针对每个区间端点,乘以二,判断是否在内即可。#include#include#include#include#include#include#include#include#include#include#include#include//#include#include#in
weixin_44019404
·
2020-08-11 04:19
数学
扫描线
模拟
Codeforce
s Round #660 (Div. 2)
A首先前三个符合题意的数字是666101010141414(2∗3,2∗5,2∗7)(2*3,2*5,2*7)(2∗3,2∗5,2∗7)那么最小的数字一定需要大于30,因为n必须由正整数组成。所以我们可以一开始放置666101010141414三个数字,然后再使用n-30即可。注意因为数字不能相同,所以需要判断一下,有相同的数字的话将14换成15。因为10−6=4,14−10=410-6=4,14
weixin_44019404
·
2020-08-11 04:19
dp
贪心
思维
某男子一夜之间竟把
codeforce
s题库刷穿
这就是江湖上失传已久的自动AC机大概就是爬取
codeforce
s的题目的答案然后再交上去以达到刷题的目的注意!这样会给服务器一些没有必要的压力学术目的别乱用注意!
王智峰
·
2020-08-11 04:39
【题解】
codeforce
s Forethought Future Cup - Elimination Round - H
problemsolution1DP所求5角星等价于找5个点的凸包数量把所有边按照极角排序,依次枚举边转移这样就只需要记录第一个点和当前点,不需要记录最后一条边,凸包一定合法(因为没有三点共线的情况,否则要特殊处理共线情况)#includeusingnamespacestd;typedeflonglongll;constintmaxn=320;structpoint{llx,y;point(){}
Thomas_ZQQ@Runespoor
·
2020-08-11 04:21
计算几何
codeforces
codeforce
s B. Permutation 解题报告
题目链接:http://
codeforce
s.com/problemset/problem/359/B题目意思:给定n和k的值,需要构造一条长度为2n(每个元素取值范围只能是[1,2n])且元素各不相同的序列
weixin_30898109
·
2020-08-11 04:46
Codeforce
s-233A Perfect Permutation
PerfectPermutationProblemDescriptionApermutationisasequenceofintegersp1,p2,...,pn,consistingofndistinctpositiveintegers,eachofthemdoesn'texceedn.Let'sdenotethei-thelementofpermutationpaspi.We'llcallnu
weixin_30520015
·
2020-08-11 04:03
Codeforce
s Round #324 (Div. 2) D. Dima and Lisa 数论 三素数定理
D.DimaandLisatimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputDimalovesrepresentinganoddnumberasthesumofmultipleprimes,andLisalovesitwhenthereareatmostthreepr
相知无悔
·
2020-08-11 04:58
cf
数论
Codeforce
s Round #324 (Div. 2) C. Marina and Vasya 字符串处理
C.MarinaandVasyatimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMarinalovesstringsofthesamelengthandVasyaloveswhenthereisathirdstring,differentfromtheminexac
相知无悔
·
2020-08-11 04:58
字符串处理
cf
Codeforce
s Round #201 (Div. 2) C. Alice and Bob
C.AliceandBobtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputItissoboringinthesummerholiday,isn'tit?SoAliceandBobhaveinventedanewgametoplay.Therulesareasfol
相知无悔
·
2020-08-11 04:57
cf
数论
Codeforce
s Round #200 (Div. 2) C. Rational Resistance
C.RationalResistancetimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMadscientistMikeisbuildingatimemachineinhissparetime.Tofinishthework,heneedsaresistorwith
相知无悔
·
2020-08-11 04:57
cf
Permutation Partitions
CodeForce
s - 1326C(组合数学+思维)
Youaregivenapermutationp1,p2,…,pnofintegersfrom1tonandanintegerk,suchthat1≤k≤n.Apermutationmeansthateverynumberfrom1toniscontainedinpexactlyonce.Let’sconsiderallpartitionsofthispermutationintokdisjoin
starlet_kiss
·
2020-08-11 04:36
树上最大带权路径长度和
题目:http://
codeforce
s.com/contest/1092/problem/F分析:拿第一个样例来说,先维护f,s两个数组,f[x]表示以x为根的子树的所有结点到x的带权路径长度和,s[
1naive1
·
2020-08-11 04:19
动态规划
Codeforce
s Round #136 (Div. 1)E(尺取法+树状数组)
题目链接:https://
codeforce
s.com/contest/220/problem/E题意:只保留a数列中1..l和r..n的数构成b数列,然后b数列的逆序对数小于等于k.问这样的l,r的对数
1naive1
·
2020-08-11 04:19
数据结构
Codeforce
s Round #661 (Div. 3) D. Binary String To Subsequences(队列)
题目链接:https://
codeforce
s.ml/contest/1399/problem/D题意:给一串由0和1组成的字符串,问最少可以分成多少个子序列使得每个子序列没有相邻的0和1.题解:直接模拟标号
biuhongWA
·
2020-08-11 03:17
数据结构
codeforces
Codeforce
s Round #661 (Div. 3) D. Binary String To Subsequences
Codeforce
sRound#661(Div.3)BinaryStringToSubsequences题目链接题意01的无序串中,找到010101……或10101……的有序子串,并进行序号标记。
双木林233
·
2020-08-11 03:42
代码
算法题
2018年ICPC徐州现场赛M - Rikka with Illuminations(计算几何+贪心)
菜鸡终于写出来了题目链接:https://
codeforce
s.com/gym/102012/problem/M题意:按逆时针方向给你n个凸多边形的顶点,在凸多边形的外侧给你m个点光源,用最小的点光源照射到所有的边
UUUUh
·
2020-08-11 03:28
0x07贪心
0x73二维凸包
【dp+离散化】2018-2019 ACM-ICPC Pacific Northwest Regional Contest (Div. 1) C题 Contest Setting
2018-2019ACM-ICPCPacificNorthwestRegionalContest(Div.1)C题ContestSettinghttp://
codeforce
s.com/gym/101982
Cherry_0525
·
2020-08-11 03:49
DP
Codeforce
s Round #411 (Div. 1)-F. Fake bullions
题目链接
Codeforce
sRound#411(Div.1)-F.Fakebullions解析首先我们可以把问题分割成两个独立的子问题,即先求出每个点上最小的真金子的数量与最大的真金子的数量,再组合计数考虑题目给的条件
psc233
·
2020-08-11 03:18
CF
2017-2018 ACM-ICPC Pacific Northwest Regional Contest (Div. 2)(蒟蒻解题)(全部都是水题和思维题)
2018.5.14:还有三个没有补,一个然颜色种类那个,一个求fn的,一个尺取能写的题(估计是个简单dp)http://
codeforce
s.com/gym/101652AproblemN给定一个字符串
左佥都御史
·
2020-08-11 03:40
codeforce
Codeforce
s Round #662 (Div. 2) C. Pinkie Pie Eats Patty-cakes 贪心 + 二分
C.PinkiePieEatsPatty-cakestimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputPinkiePiehasboughtabagofpatty-cakeswithdifferentfillings!Butitappearedthatnotallpa
箱@子
·
2020-08-11 03:02
二分
CodeForce
s - 1315B Homecoming
AfteralongpartyPetyadecidedtoreturnhome,butheturnedouttobeattheoppositeendofthetownfromhishome.Therearenncrossroadsinthelineinthetown,andthereiseitherthebusorthetramstationateachcrossroad.Thecrossroad
箱@子
·
2020-08-11 03:01
Codeforces
CodeForce
s - 1307A A - Cow and Haybales
TheUSAConstructionOperation(USACO)recentlyorderedFarmerJohntoarrangearowofnnhaybalepilesonthefarm.Theii-thpilecontainsaiaihaybales.However,FarmerJohnhasjustleftforvacation,leavingBessieallonherown.Eve
箱@子
·
2020-08-11 03:31
Codeforces
CodeForce
s - 1295B B - Infinite Prefixes
Youaregivenstringssoflengthnnconsistingof0-sand1-s.Youbuildaninfinitestringttasaconcatenationofaninfinitenumberofstringsss,ort=ssss…t=ssss…Forexample,ifs=s=10010,thent=t=100101001010010...Calculatethe
箱@子
·
2020-08-11 03:31
Codeforces
Codeforce
s 609E Minimum spanning tree for each edge 树链剖分+RMQ(st算法)+最小生成树
题意就是给你一个有权无向图,无自环、无重边,问你,要求对每一个边i,必须在生成树里时的最小生成树的权值。思路这题思路不算太难想到,主要是第一次写树链剖分各种卡。。。这叫一个烦。。幸亏CF上可以看数据,要不然不知道调哪辈子去了。。。不瞎扯了,这题就是先跑一个最小生成树,得到权值A。然后遍历每个边,对于边{u,v},如果它本身就在最小生成树中,值就是A。如果不在树里,那么我们就需要看在树中的链{u,v
luke2834
·
2020-08-11 03:53
ACM_Codeforces
ACM_图论
ACM_DP
codeforce
s1215E Marbles
https://
codeforce
s.com/problemset/problem/1215/E设f[i][j]为i在houmian,j在后的颜色i,j之间需要交换的次数,那么从前枚举到后,当前的颜色a
二分抄代码
·
2020-08-11 03:40
DP
状态压缩
D. Destroy the Colony(退背包)
originallink-http://
codeforce
s.com/contest/1111/problem/D题意:给出一个字符串,每次选择两个位置的字符,问有多少种字符串满足:可以由原字符串任意次交换两个字符后得到
JK Chen
·
2020-08-11 03:40
DP动态规划
Binary String To Subsequences(思维)
Codeforce
s Round #661 (Div. 3)
原题链接:https://
codeforce
s.com/contest/1399/problem/D题意:给你一个01字符串,计算使得01不相邻的最小子序列数目。
叶的一生
·
2020-08-11 03:52
思维
字符串
codeforces
思维
字符串
2016-2017 ACM-ICPC Northeastern European Regional Contest Problem E. Expect to Wait
题目来源:http://
codeforce
s.com/group/aUVPeyEnI2/contest/229509时间限制:2s空间限制:512MB题目大意:在一个车站中有若干人在队列中等待车辆,求所有人等待时间的期望值首先给定
aolu1911
·
2020-08-11 02:48
上一页
141
142
143
144
145
146
147
148
下一页
按字母分类:
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
其他