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
Educational
Codeforce
s Round 34 A. Hungry Student Problem【枚举】
A.HungryStudentProblemtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputIvan'sclassesattheuniversityhavejustfinished,andnowhewantstogotothelocalCFKcafeandeatso
weixin_34404393
·
2020-08-17 16:18
CodeForce
s - 163B Lemmings (排序+二分)
B.Lemmingstimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAsyouknow,lemmingslikejumping.Forthenextspectaculargroupjumpnlemmingsgatherednearahighrockwithkcomf
scau_rb
·
2020-08-17 16:17
SCAU
Codeforce
s Round #561 (Div. 2) C. A Tale of Two Lands
链接:https://
codeforce
s.com/contest/1166/problem/C题意:ThelegendofthefoundationofVectorlandtalksoftwointegersxxandyy.Centuriesago
weixin_33935777
·
2020-08-17 16:16
Educational
Codeforce
s Round 34 (Rated for Div. 2) D. Almost Difference[数据结构]
题意:求一个数列中所有的绝对值差大于2的数,并用后面的数字减前面的数字的加和。分析:可以用树状数组每次找前面的差值大于2的数,也可以直接每次加前面所有的数字,再减去差值为1的数字。题目最坑爹的是答案也许会爆longlong,可以用longdouble或者使用unsignedlonglong手动模拟符号位,或者用pythonC++代码:1#define_CRT_SECURE_NO_DEPRECATE
weixin_33861800
·
2020-08-17 16:38
CodeForce
s 163B Lemmings 二分
题意:给你n个袋鼠,然后袋鼠要跳楼梯,你需要选出k个袋鼠出来,跳k个楼梯,第一个楼梯的高度为h,第二个为2h,第三个为3h,第n个为nh,每个袋鼠有两个属性,体重和速度,要求如果i的体重大于j的话,i只能跳比j高的楼梯你需要使得k个袋鼠跳的最慢的袋鼠的时间最小,然后让你把方案输出思路:二分最后的时间,然后贪心的去选就好了,袋鼠按照体重为第一关键字,速度第二关键字从小到大排序贪心去选#include
weixin_30737363
·
2020-08-17 16:27
Codeforece Educational
Codeforce
s Round 34 (Rated for Div. 2) (A-D)题解
A:A.HungryStudentProblemtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputIvan'sclassesattheuniversityhavejustfinished,andnowhewantstogotothelocalCFKcafeandeat
weixin_30677073
·
2020-08-17 16:51
Day7:
CodeForce
s-1166C.A Tale of Two Lands (二分 + 排序)
原题链接参考代码:#include#definemid((l+r)/2)#includeusingnamespacestd;constintmaxn=200000+5,maxvalue=1e9;intn,value[maxn];intmain(){scanf("%d",&n);for(inti=0;i=value[mid])l=mid+1;elser=mid-1;}ans+=(l-i-1);}pr
weixin_30609331
·
2020-08-17 16:15
CF1166C A Tale of Two Lands
http://
codeforce
s.com/blog/entry/67081实现:1#include2usingnamespacestd;3typedeflonglongll;4inta[200005]
weixin_30575309
·
2020-08-17 15:43
Codeforce
s 1077A Frog Jumping (模拟,计算)
A.FrogJumpingtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAfrogiscurrentlyatthepoint00onacoordinateaxisOxOx.Itjumpsbythefollowingalgorithm:thefirstjumpisa
weixin_30508241
·
2020-08-17 15:06
3.26
http://
codeforce
s.com/gym/101196/attachmentsA题B题题意:一群人玩桌上足球(>4人),分成黑白两队,每队有进攻和防守两名玩家,如果有一方失败则失败方的防守坐到等候席的结尾
weixin_30383279
·
2020-08-17 15:57
2048 Game
CodeForce
s - 1221A
A.2048Gametimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouareplayingavariationofgame2048.Initiallyyouhaveamultiset?of?integers.Everyintegerinthismultiseti
tomjobs
·
2020-08-17 15:21
#
codeforces
Educational
Codeforce
s Round 34 E. Swapping Characters
原题:E.SwappingCharacterstimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputWehadastringsconsistingofnlowercaseLatinletters.Wemadekcopiesofthisstring,thusobtainin
红鲤鱼遇绿鲤鱼
·
2020-08-17 15:40
贪心\模拟\STL\暴力
分治/优化
根本不会/就差一点/记得再看
Educational
Codeforce
s Round 64 (Rated for Div. 2)E. Special Segments of Permutation(单调栈+分治)
题目链接:https://
codeforce
s.com/contest/1156/problem/E题意:给你1-n的序列并且这n个数只出现一次,定义区间中的最大值为,对于区间,如果,则称这个区间为特殊区间
sugarbliss
·
2020-08-17 15:17
【单调队列
/
单调栈】
Codeforce
s Educational
Codeforce
s Round 45 A-D
A:http://
codeforce
s.com/contest/990/problem/A让n是m的整数倍,的最小花费是多少#includetypedeflonglongll;constintMAXN=
sizaif
·
2020-08-17 15:47
CodeForeces
ACM进阶之路
Educational
Codeforce
s Round 34 (Rated for Div. 2) E. Swapping Characters(暴力)
题目链接:http://
codeforce
s.com/contest/903/problem/E被这个题关了一天啊?
_bibibibi
·
2020-08-17 15:05
codeforces
Codeforce
s Round #383 (Div. 2)全部题解 (A,B,C,D,E)
A.Arpa’shardexamandMehrdad’snaivecheattimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThereexistsanislandcalledArpa’sland,somebeautifulgirlslivethere,asuglyo
say_c_box
·
2020-08-17 14:09
算法
背包问题
动态规划
二分法
模拟
搜索
贪心算法
图论
Codeforce
s-Educational
Codeforce
s Round 32-(A,B,C,D)
今天这场A了4道题,哈哈哈哈,虽然题目水的不行,还是挺开心的,而且有一道题是最后一分钟AC。。。先贴代码A.LocalExtrematimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenanarraya.Someelementofthisarraya
菜圾
·
2020-08-17 14:34
ACM比赛练习
Educational
Codeforce
s Round 51 (Rated for Div. 2) A. Vasya And Password
A.VasyaAndPasswordVasyacameupwithapasswordtoregisterforEatForces—astringss.ThepasswordinEatForcesshouldbeastring,consistingoflowercaseanduppercaseLatinlettersanddigits.ButsinceEatForcestakescareofthes
1615925431
·
2020-08-17 14:56
Codeforces
CodeForce
s 506 Div.1 A. Mr. Kitayuta, the Treasure Hunter
A.Mr.Kitayuta,theTreasureHuntertimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheShusekiIslandsareanarchipelagoof30001smallislandsintheYutampoSea.Theislands
ArthurYang
·
2020-08-17 14:35
ACM
Codeforce
s Round #228 Fox and Card Game 解题报告
无聊了,晚上也睡不着,写个解题报告。这次没敢用大号打Div.1,就新注册了一个小号又打了盘Div.2,幸好第三题在multiset遍历并删除那里卡了半小时,只涨到了1693,差7分就只能又注册个小号了,以现在的局势还能再打一盘Div.2。废话不说,先flag一下STL的知识。STL中的关联容器如果在遍历的时候进行删除的话,不能这样:for(list::iteratoriter=m_map.begi
ArthurYang
·
2020-08-17 14:35
ACM
【Trie树&分治&异或】
Codeforce
- 888G - 8
问题:888G-8问题传送门题目大意:你有一个含有nnn个点的完全图,每一个顶点有一个权值,在这张图中,连接两个顶点的边权值是这两个顶点的点权值的异或和,接着在这张完全图中求最小生成树,输出最小生成树的数值。解题思路:(1)暴力法:每一条边的边权已知,利用最小生成树算法(primprimprim或kruskalkruskalkruskal都可)求最小生成树。分析数据范围,nnn的范围是2e52e5
biu~跃哥冲冲冲
·
2020-08-17 14:53
A Tale of Two Lands--- 二分--
Codeforce
s Round #561 (Div. 2)
ATaleofTwoLandstimelimitpertest1secondmemorylimitpertest256megabytes题目链接http://
codeforce
s.com/problemset
lonely_wind_
·
2020-08-17 14:38
Codeforces
#
二分&三分
CodeForce
s - 125ABC
文章目录A-MeasuringLengthsinBaden
CodeForce
s-125AB-SimpleXML
CodeForce
s-125BC-Hobbits'Party
CodeForce
s-125CA-MeasuringLengthsinBaden
CodeForce
s
Dream-chasing ant
·
2020-08-17 14:36
--------【训练赛】
Codeforce
s Round #651 (Div. 2) (1370 ABCD题解)
比赛链接AMaximumGCD题意如图,让你在[2,n]中选两个数,使得他们的GCD最大。思路:直接输出(n/2).代码:#includeusingnamespacestd;typedeflonglongll;intmain(){llt,n;cin>>t;while(t--){cin>>n;coutusingnamespacestd;constintN=1e6+15;typedeflonglong
ldu 王跃
·
2020-08-17 14:27
codeforces
思维
codeforce
s global round 5 B题权值线段树
有一些车要进洞和出洞,给出它们的进洞和出洞序列,如果有超车的情况发生,超车的那辆车要被罚款,即如果a比b先进洞,但是b却先出洞,b就要被罚款。这个题有很多的方法,但是终究都围绕着一个思想:比自己先进洞的车一定要先出洞,否则就要被罚款。我看了大佬的博客,这题用树状数组写的,思想是按照出洞的顺序,找出这辆车的前面本应该有多少辆车已经出洞了。再找实际上有多少辆车出洞了。如果实际上的更少,就要被罚款。然后
sunnyorrainy
·
2020-08-17 14:26
线段树
ACM的人生
交换字符,
codeforce
s1015B
题意:给两个字符串,s,t需要把他们变成一样的。对于字符串s,可以让它的两个相邻字符s[i],s[i+1]交换(1#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;typedeflonglongll;strings1,s2;//两个字符串intans[1
sunnyorrainy
·
2020-08-17 14:26
字符串
Educational
Codeforce
s Round 57 (Rated for Div. 2) 小结 A,B,C
Educational
Codeforce
sRound57(RatedforDiv.2)小结A,B,C前言:好几天没写博客了,先反省一下,然后
codeforce
s529打的很不好,还在补题,有时间应该会把博客补起来
落笋
·
2020-08-17 14:31
codeforces
南昌不翻车
Codeforce
s Global Round 5
C2:https://
codeforce
s.com/contest/1237/problem/C2题目大意:n个点,每次去掉一对点,保证围成的区域不能包含其他的点,输出方案。
我不管这题我就是不会做
·
2020-08-17 14:38
codeforces
【
CodeForce
s - 1051C 】Vasya and Multisets (模拟)
题干:Vasyahasamultisetssconsistingofnnintegernumbers.Vasyacallssomenumberxxniceifitappearsinthemultisetexactlyonce.Forexample,multiset{1,1,2,3,3,3,4}{1,1,2,3,3,3,4}containsnicenumbers22and44.Vasyawantst
韬光养晦_
·
2020-08-17 14:28
模拟
水题纪念
Codeforce~
Educational
Codeforce
s Round 60 Editorial
猝死场。。没有写。。直接做的练习。。。前三题解如下。。之后的还在看。。(简单的直接口胡了。。。)A.一如既往的水题,l可以等于r,找最大数字最大连续长度。。。B.贪心是万物之敌系列。。。k+1组进行循环,每次使用k个最大,1个次大,最后剩余部分全用最大C.二分结果,我们可以看成先吹了t天的风,之后再走t天,所以只需要对吹t天的风之后坐标进行计算,之后计算曼哈顿距离,这个距离就是我们无风天走的部分,
LXY_XYL
·
2020-08-17 14:17
寒假计划
Codeforce
s Global Round 5 D. Balanced Playlist
D.BalancedPlaylisthttps://
codeforce
s.com/contest/1237/problem/DEverymorning,youchooseatrack.Theplaylistthenstartsplayingfromthistrackinitsusualcyclicfashion.Atanymoment
ZHXU1998
·
2020-08-17 14:45
线段树
思维
Educational
Codeforce
s Round 15 E Analysis of Pathes in Functional Graph(倍增)
题目链接大意:给你一个有向图,每个点有且只有一个出边。问你从所有点出发长经过k个点路径长度和,和最小边权。倍增处理每个点出发跳2x2^x2x点的路径上的信息即可。#includeusingnamespacestd;typedeflonglongLL;constintN=2e5+10;#definefifirst#definesesecond#definepbpush_backintn;LLk;LL
pubgoso
·
2020-08-17 14:40
acm
cf
倍增
Codeforce
s 1166C A Tale of Two Lands
枚举x每次符合条件y的个数即为对数求和xxpos-1-(i+1)+1#includeusingnamespacestd;#defineIOios::sync_with_stdio(false)#definelllonglong#definempmake_pair#definefifirst#definesesecond#definepbemplace_back#definepiipair#defi
阿晴0219
·
2020-08-17 14:08
二分
Educational
Codeforce
s Round 51 (Rated for Div. 2) D. Bicolorings
D.Bicoloringstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenagrid,consistingof22rowsandnncolumns.Eachcellofthisgridshouldbecoloredeitherblackorw
叶子心情你不懂
·
2020-08-17 14:07
cf
Educational
Codeforce
s Round 51 (Rated for Div. 2) D
现将代码发在这里:c++代码:#include#includeusingnamespacestd;typedeflonglongLL;constintmaxn=2005;constLLmod=998244353;LLdp[maxn][maxn][5];intmain(){intn,k;cin>>n>>k;memset(dp,0,sizeof(dp));dp[1][1][0]=1;dp[1][1][
一只谜谜怪
·
2020-08-17 14:51
codeforces
Educational
Codeforce
s Round 71 (Rated for Div. 2) C. Gas Pipeline (dp)
题目链接:https://
codeforce
s.com/contest/1207/problem/C思路:令dp[i][0]为i位置高度为1所能取的最小值,dp[i][1]为i位置高度为2所能取的最小值
一只谜谜怪
·
2020-08-17 14:20
codeforces
线性dp
国庆第三场训练赛
A-A
CodeForce
s-1042ATherearenbenchesintheBerlandCentralpark.Itisknownthataipeoplearecurrentlysittingonthei-thbench.Anothermpeoplearecomingtotheparkandeachofthemisgoingtohaveaseatonsomebenchoutofnavaila
Allen_0526
·
2020-08-17 14:43
比赛
Educational
Codeforce
s Round 45 (Rated for Div. 2)题解(a-e)
A.CommentaryBoxestimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputBerlandFootballCupstartsreallysoon!Commentatorsfromallovertheworldcometotheevent.Organizers
neuq_zsmj
·
2020-08-17 13:47
Relatively Prime Pairs (
CodeForce
s 1051B)
欢迎访问https://blog.csdn.net/lxt_Lucia~~宇宙第一小仙女\(^o^)/~~萌量爆表求带飞=≡Σ(((つ^o^)つ~dalao们点个关注呗~~DescriptionYouaregivenasetofallintegersfromlltorrinclusive,lintmain(){longlongl,r;scanf("%lld%lld",&l,&r);printf("
lxt_Lucia
·
2020-08-17 13:20
spiny
Educational
Codeforce
s Round 76 D. Yet Another Monster Killing Problem(贪心)
题目描述Youplayacomputergame.Inthisgame,youleadapartyofmheroes,andyouhavetoclearadungeonwithnmonsters.Eachmonsterischaracterizedbyitspowerai.Eachheroischaracterizedbyhispowerpiandendurancesi.Theheroesclea
li_wen_zhuo
·
2020-08-17 13:23
Codeforces
Educational
Codeforce
s Round 32 题解
题目链接:http://
codeforce
s.com/contest/888A.LocalExtrema题意:没啥好说的。解法:模拟,扫一遍统计答案。
just_sort
·
2020-08-17 13:34
Educational
Codeforce
s Round 1 B.Queries on a String(模拟)
Educational
Codeforce
sRound1B:http://
codeforce
s.com/contest/598/problem/BB.QueriesonaStringtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenastring
idealism_xxm
·
2020-08-17 12:49
其他
Codeforces
Codeforce
s Global Round 9 ABCD
比赛连接:
Codeforce
sGlobalRound9传送门目录A-SignFlippingB-NeighborGridC-ElementExterminationD-ReplacebyMEXA-SignFlipping
丶di
·
2020-08-17 12:00
codeforces题解
Educational
Codeforce
s Round 73 (Rated for Div. 2) ABCDE
传送门A.2048Game题意:给出一些数这些数都是2的指数,每次都可以任意选两个数相加,操作次数不限,问最后能否得到2048思路:转化成是2的多少次方存起来然后递归查询#includeusingnamespacestd;intfind(intx){intans=0;while(x!=1){x>>=1;ans++;}returnans;}intmain(){intt;cin>>t;while(t-
henucm
·
2020-08-17 12:17
CF
某类线段树的复杂度分析
题目:http://
codeforce
s.com/contest/610/problem/E题意:给出一个长为n,nrk[ss[i−1]]?
i_lovelife
·
2020-08-17 12:12
cf
数据结构
复杂度分析
Codeforce
s Round #153 (Div. 2)
A:http://
codeforce
s.com/contest/252/problem/A暴力intdata[110];intmain(){intn;cin>>n;for(inti=1;i>data[i
fx397993401
·
2020-08-17 12:03
ACM
数据结构
和
算法
Educational
Codeforce
s Round 84
Educational
Codeforce
sRound84(Div.2)(1327)感想完美错过的一场,记错时间了。。。不过感觉题目质量蛮高。
Edward-Tsui
·
2020-08-17 12:04
心得
【
codeforce
s 20C】 Dijkstra?(堆优化)最短路
CodeForce
s-20C#includeusingnamespacestd;typedeflonglongLL;constintMAXN=1e5+10;constLLINF=1LLe[MAXN];/
codancer
·
2020-08-17 12:59
图论--Dijkstra
优化--堆优化
OJ--codeforces
【CF#612E】Square Root of Permutation 置换群
AC通道:http://
codeforce
s.com/problemset/problem/612/E【题目翻译】定义置换的平方为1~n的排列做两次该置换得到的结果。已知一个置换的平方,求该置换。
chty_syq
·
2020-08-17 12:01
codeforces
置换群
Educational
Codeforce
s Round 74 E - Keyboard Purchase 状压dp
E.KeyboardPurchase题意:你要给字母表的前mmm个字母排列,定义每对字母的距离:dist(si,sj)=abs(i−j)dist(s_{i},s_{j})=abs(i-j)dist(si,sj)=abs(i−j),给定一个长度为nnn的字符串sss,求∑i=2ndist(si−1,si)\sum_{i=2}^{n}dist(s_{i-1},s_{i})∑i=2ndist(si−1,
一只叫橘子的猫
·
2020-08-17 12:12
动态规划
上一页
110
111
112
113
114
115
116
117
下一页
按字母分类:
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
其他