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 #280 (Div. 2)A. Vanya and Cubes(简单计算)
题目链接题意:搭积木,告诉你第i层需要i*(i+1)/2个,然后给你总数n个,问你可以搭几层题解:直接计算#defineCF#ifndefCF#include#include#include#include#include#include#include#include#else#include#endif//CFusingnamespacestd;#defineLLlonglong#define
_pkm_
·
2020-08-25 04:07
CF
模拟
CF 280A. Vanya and Cubes(div2)
http://
codeforce
s.com/contest/492/problem/AVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows
bupt_xycr
·
2020-08-25 04:06
CodeForce
s 321 A - Ciel and Robot
【题目链接】:clickhere~~【题目大意】:一个robot机器人,可以根据给定的指令行动,给你四种指令,robot初始位置是(0,0),指令一出,robot会重复行动,判断能否在无限行动的情况下经过点(n,m)。【解题思路】其实仔细模拟一下,可以发现是有周期的,判断即可,见代码吧~~代码:#include#include#includeusingnamespacestd;constintN=
herongweiV
·
2020-08-25 04:06
【模拟/暴力/构造】
CodeForces
=====ACM=====
Codeforce
s Round #221 (Div. 2) D. Maximum Submatrix 2 (思维题)
题目地址:
codeforce
s221D这场是人生中做的第一场CF中的D题。(当时只做出来了A题。。)过年之际回顾了一下,就顺便看了几道D题。现在做CF的D题在比赛时还是做不出来。
Aerolite坠落
·
2020-08-25 04:34
瞎搞题
codeforce
s 852A
原题链接:http://
codeforce
s.com/problemset/problem/852/A大致题意:给出一个数字,一种操作:在数位之间插入加号进行加法运算得到的结果作为新的数字。
蒟蒻111
·
2020-08-25 04:28
CF
杂题
构造
ACM-
Codeforce
s Round #280 (Div. 2)
A.VanyaandCubes题意:有n个方块,要将他们堆起来,第一层要1个方块,第二层要1+2个方块,第三层要1+2+3个方块,等等,也就是第i层要1+...+i个方块,问n个方块最多能堆几层。分析:其实每一层需要的方块就是一个等差数列的前i项和,既然这样我们就可以算出每一层需要的方块数,上限也就是1000层,打好表之后,累加层数即可。源代码:#includeintdata[1005];intm
潜水的疯
·
2020-08-25 04:50
ACM-题集-BC
Codeforce
s373B_Making Sequences is Fun_枚举长度。。。
B.MakingSequencesisFuntimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputWe'lldefineS(n)forpositiveintegernasfollows:thenumberofthen'sdigitsinthedecimalbase.Fo
CS_ChenLI
·
2020-08-25 04:18
acm_想法题
codeforce
s 23A. You're Given a String...
巨水的一道题,100的数据O(n^3)复杂度30ms过。蛋疼的是一开始读错题,substring字串认为是subsequence子序列。字串必须连续...没啥好说的#include#include#include#include#definemax(a,b)((a)>(b)?(a):(b))#defineINF1000000005chara[105];intmain(){scanf("%s",a)
double1994
·
2020-08-25 04:45
乱搞
Codeforce
s 492A Vanya and Cubes(水)
题目链接:
Codeforce
s492AVanyaandCubes#include#include#includeusingnamespacestd;intmain(){intn,s=0;scanf("%
JeraKrs
·
2020-08-25 04:13
CF
GRADE:D
非常简单的签到题
Codeforce
s 425A Sereja and Swaps(暴力枚举)
求出每个区间的最大值,最后记录下所有区间的最大值代码:Bylab104_yifan,contest:
Codeforce
sRound#243(Div.2),problem:(C)
lab104_yifan
·
2020-08-25 04:12
暴力-直接枚举
Codeforce
s Round #136 (Div. 2) B. Little Elephant and Numbers
B.LittleElephantandNumberstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheLittleElephantlovesnumbers.Hehasapositiveintegerx.TheLittleElephantwantstofindt
risker_2013
·
2020-08-25 04:39
CF
C/C++
158B_Taxi
原题链接:http://
codeforce
s.com/problemset/problem/158/B分析:题意分析:有n组人,每组人个人只为4,3,2,1;没辆车最多载4个人,问最少用几辆车把人都装走
徵羽調_xiao賤
·
2020-08-25 04:07
codeforces
KMP||扩展KMP(
Codeforce
s 535D - Tavas and Malekas )
D.TavasandMalekasTavasisastrangecreature.Usually"zzz"comesoutofpeople'smouthwhilesleeping,butstringsoflengthncomesoutfromTavas'mouthinstead.TodayTavasfellasleepinMalekas'place.Whilehewassleeping,Malek
u010660276
·
2020-08-25 04:05
KMP
codeforces
Codeforce
s 715A & 716C Plus and Square Root【数学规律】 (
Codeforce
s Round #372 (Div. 2))
C.PlusandSquareRoottimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputZStheCoderisplayingagame.Thereisanumberdisplayedonthescreenandtherearetwobuttons,' + '(pl
Coolxxs
·
2020-08-25 04:04
题解
Codeforces
数论—数学相关
规律
Codeforce
s Round #157 (Div. 1)B. Little Elephant and Elections 数位dp好
B.LittleElephantandElectionsTherehaverecentlybeenelectionsinthezoo.Overalltherewere7mainpoliticalparties:oneofthemistheLittleElephantPoliticalParty,6otherpartieshavelesscatchynames.Politicalpartiesfin
u010660276
·
2020-08-25 04:34
数位dp
Codeforce
s Round #661 (Div. 3) B.C
今天补了一下cf题,发现昨天有一场比赛结果忘记参加了(懊悔),于是今天除了做了以前的比赛之外,还补了一下昨晚的题目。B.GiftsFixingtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouhavenngiftsandyouwanttogiveallofthe
tianyuanzhidian
·
2020-08-25 04:46
Codeforce
s 991E. Bus Number
题目:点击打开链接题意:题意:给你一个数字序列A(长度不超过18位),问有多少个序列B满足①A中所有数字都一定要在B中出现过;②B中所有数字也一定要在A中出现过;③序列B不能以0开头分析:爆搜所有数字出现情况,然对于每种情况求出非0开头的全排列数量1、记录每个数字出现的次数cnt[i]2、将出现过的数字i从1到cnt[i]遍历。(ifrom0to9)3、得到要使用的数字次数数组tp[]。4、对于每
Self-Discipline
·
2020-08-25 04:46
ACM
codefoces
B. Birthday
B.Birthdayhttp://
codeforce
s.com/group/HD13CEfWEl/contest/239779/problem/Btimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputCowboyVladhasabirthdaytoday
一只大秀逗
·
2020-08-25 04:00
蓝桥杯
cf
Palindromic Paths
CodeForce
s - 1366C(思维+贪心)
Youaregivenamatrixwithnrows(numberedfrom1ton)andmcolumns(numberedfrom1tom).Anumberai,jiswritteninthecellbelongingtothei-throwandthej-thcolumn,eachnumberiseither0or1.Achipisinitiallyinthecell(1,1),andi
starlet_kiss
·
2020-08-25 04:54
XXXXX
CodeForce
s - 1364A(思维)
Ehablovesnumbertheory,butforsomereasonhehatesthenumberx.Givenanarraya,findthelengthofitslongestsubarraysuchthatthesumofitselementsisn’tdivisiblebyx,ordeterminethatsuchsubarraydoesn’texist.Anarrayaisas
starlet_kiss
·
2020-08-25 04:23
思维
贪心算法
Dreamoon Likes Coloring
CodeForce
s - 1330C(贪心+思维)
Dreamoonlikescoloringcellsverymuch.Thereisarowofncells.Initially,allcellsareempty(don’tcontainanycolor).Cellsarenumberedfrom1ton.Youaregivenanintegermandmintegersl1,l2,…,lm(1≤li≤n)Dreamoonwillperformm
starlet_kiss
·
2020-08-25 04:23
Two Divisors
CodeForce
s - 1366D(数论)
Youaregivennintegersa1,a2,…,an.Foreachaifinditstwodivisorsd1>1andd2>1suchthatgcd(d1+d2,ai)=1(wheregcd(a,b)isthegreatestcommondivisorofaandb)orsaythatthereisnosuchpair.InputThefirstlinecontainssinglein
starlet_kiss
·
2020-08-25 04:23
Codeforce
s Round #280 (Div. 2) 解题报告(A B C D E)
A.VanyaandCubes思路:累加计算叠到每个高度至少需要多少方块,然后找最后一个满足的即可。#include#include#include#include#include#include#include#includeusingnamespacestd;#definelllonglong#defineINF1000000000intmain(){intn;while(cin>>n){in
squee_spoon
·
2020-08-25 04:21
解题报告
线性基 求区间异或和最大值
本题和https://
codeforce
s.com/c
sinat_41719390
·
2020-08-25 04:12
模板
codeforce
s158B Taxi(贪心)
AfterthelessonsngroupsofschoolchildrenwentoutsideanddecidedtovisitPolycarpustocelebratehisbirthday.Weknowthatthei-thgroupconsistsofsifriends(1 ≤ si ≤ 4),andtheywanttoGotoPolycarpustogether.Theydecided
竟然有人也叫Webwei
·
2020-08-25 04:38
codeforces
Codeforce
s Round #456 (Div. 2) - (A,B,D)
这场
codeforce
s打的非常惨,B题被HACK成功了两次,终于明白为什么比赛时通过了叫pratestpassed而不是Accepeted,B题我思路还不对时就能通过两次,说明
codeforce
s是故意留给
菜圾
·
2020-08-25 04:22
Codeforces
ACM比赛练习
Educational
Codeforce
s Round 52 (Rated for Div. 2) C. Make It Equal
C.MakeItEqualThereisatoybuildingconsistingofnntowers.Eachtowerconsistsofseveralcubesstandingoneachother.Theii-thtowerconsistsofhihicubes,soithasheighthihi.Let'sdefineoperationsliceonsomeheightHHasfoll
1615925431
·
2020-08-25 04:49
Codeforces
Codeforce
s Round #465 (Div. 2) C. Fifa and Fafa
C.FifaandFafaFifaandFafaaresharingaflat.Fifalovesvideogamesandwantstodownloadanewsoccergame.Unfortunately,Fafaheavilyusestheinternetwhichconsumesthequota.FifacanaccesstheinternetthroughhisWi-Fiaccessp
1615925431
·
2020-08-25 04:49
Codeforces
Codeforce
s Round #519 by Botan Investments C. Smallest Word
C.SmallestWordIAhassomanycolorfulmagnetsonherfridge!Exactlyoneletteriswrittenoneachmagnet,'a'or'b'.Shelovestoplaywiththem,placingallmagnetsinarow.However,thegirlisquicklyboredandusuallythinkshowtomake
1615925431
·
2020-08-25 04:19
Codeforces
Educational
Codeforce
s Round 53 (Rated for Div. 2) B. Vasya and Books
B.VasyaandBooksVasyahasgotnnbooks,numberedfrom11tonn,arrangedinastack.Thetopmostbookhasnumbera1a1,thenextone—a2a2,andsoon.Thebookatthebottomofthestackhasnumberanan.Allnumbersaredistinct.Vasyawantstomo
1615925431
·
2020-08-25 04:19
Codeforces
Codeforce
s Round #514 (Div. 2) C. Sequence Transformation
C.SequenceTransformationLet'scallthefollowingprocessatransformationofasequenceoflengthnn.Ifthesequenceisempty,theprocessends.Otherwise,appendthegreatestcommondivisor(GCD)ofalltheelementsofthesequencet
1615925431
·
2020-08-25 04:19
Codeforces
Educational
Codeforce
s Round 53 (Rated for Div. 2) A. Diverse Substring
consistingofnnlowercaseLatinletters.Asubstringofstringssisacontinuoussegmentoflettersfromss.Forexample,"defor"isasubstringof"
codeforce
s"and"fors"isnot.Thelengtho
1615925431
·
2020-08-25 04:19
Codeforces
Codeforce
s Round #465 (Div. 2) B. Fafa and the Gates
B.FafaandtheGatesTwoneighboringkingdomsdecidedtobuildawallbetweenthemwithsomegatestoenablethecitizenstogofromonekingdomtoanother.Eachtimeacitizenpassesthroughagate,hehastopayonesilvercoin.Theworldcanb
1615925431
·
2020-08-25 04:18
Codeforces
Codeforce
s 934A A Compatible Pair
A.ACompatiblePairNianisamonsterwhichlivesdeepintheoceans.Onceayear,itshowsupontheland,devouringlivestockandevenpeople.Inordertokeepthemonsteraway,peoplefilltheirvillageswithredcolour,light,andcracking
1615925431
·
2020-08-25 04:18
Codeforces
Codeforce
s Round #466 (Div. 2) A. Points on the line
A.PointsonthelineWe'vegotnotestcases.Abigolympiadiscomingup.Buttheproblemsetters'numberonepriorityshouldbeaddinganotherproblemtotheround.Thediameterofamultisetofpointsonthelineisthelargestdistancebetw
1615925431
·
2020-08-25 04:18
Codeforces
Codeforce
s Round #661-C Boats Competition
题目描述:给出每个人的质量,要求两人一组分组,每组两人的重量和与其他组的重量和相等,求最多能分多少组。输入描述:第1行:t(1\(\leq\)t\(\leq\)1000)。表示测试的个数。第2行:n(1\(\leq\)n\(\leq\)50)。第一个测试中参赛者的个数。第3行:n个数字组成的数组w。表示n位参赛者的重量。(1\(\leq\)\(w_i\)\(\leq\)n)剩下的t-1个测试依此类
Acapplella
·
2020-08-25 04:35
codeforce
--------Fafa and his Company
Fafaownsacompanythatworksonhugeprojects.TherearenemployeesinFafa’scompany.Wheneverthecompanyhasanewprojecttostartworkingon,Fafahastodividethetasksofthisprojectamongalltheemployees.Fafafindsdoingthisev
王文波~
·
2020-08-25 04:03
Codeforce
Codeforce
s 1279A New Year Garland(鸽巢原理)
题目链接:
Codeforce
s1279ANewYearGarland思路:简单的鸽巢原理思想代码:#includeusingnamespacestd;typedefpairP;typedeflonglongLL
Yuhan の Blog
·
2020-08-25 04:30
Codeforces
#
数学
Codeforce
s Round #641 (Div. 2) C. Orac and LCM(gcd和lcm的重要理解)
传送门实际上不难发现序列中a1对应的lcm对为n-1对,a2对应的n-2对…以此类推,关键是如何化简如下的表达式:gcd{lcm(a1,a2),lcm(a1,a3),…,lcm(a1,an)}GCD和LCM在质因数分解下的意义假设a经过质因数分解后为P1k1*P2k2,…*Pnkn,b经过质因数分解为Q1t1*Q2t2,…*Qmtm假设质因子p为a和b共有的质因子,在a中p的幂次为k1,在b中p的
Happig丶
·
2020-08-25 04:28
Codeforces
数论
Codeforce
s Round #608 (Div. 2)——A、B、C题解
题目传送门:https://
codeforce
s.com/contest/1271/A.Suits(贪心)题目大意:第一个套餐是一条领带+一条夹克能赚e元,第二个套餐是一个背心+一个围巾+一件夹克能赚f
Friends.
·
2020-08-25 04:24
ACM
CodeForce
s - 492A Vanya and Cubes【水题】
VanyaandCubestimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows:thetoplevel
黑糖22
·
2020-08-25 04:20
Codeforce
s刷题记录(知识点、链接、索引)不定时更新
此博客作为
codeforce
s的刷题记录,以及回忆知识点时的索引带有G、H的题目自有其意义(想知道就私信博主)单击题目可跳转至题解界面题号题目知识点题解链接1312EArrayShrinking区间dphttps
一只酷酷光儿( CoolGuang)
·
2020-08-25 04:20
Codeforce
s Round #531 (Div. 3) D - Balanced Ternary String
从前往后把0换够n/3;把1换够n/3;从后往前换2;从前往后变小,从后往前变大`#includeconstintN=300300;constlonglongmod=1e9+7;usingnamespacestd;intn;intc[4];strings;intmain(){ios_base::sync_with_stdio(0);//c++快速输入可和scanf达到一个层次的速度cin>>n>>
nobugexist
·
2020-08-25 04:20
Codeforce
s Round #624 (Div. 3) E. Construct the Binary Tree(模拟二叉树)
Description:Youaregiventwointegersnnnandddd.Youneedtoconstructarootedbinarytreeconsistingofnverticeswitharootatthevertex111andthesumofdepthsofallverticesequalstoddd.Atreeisaconnectedgraphwithoutcycles
柠檬咕咕咕
·
2020-08-25 04:18
CodeBlocks
Codeforce
s Round #665 (Div. 2) D. Maximum Distributed Tree(DFS+贪心)
题目链接:https://
codeforce
s.ml/contest/1401/problem/D题意:n个点,n-1条边,一个数k拆分成若干个素因数将其放置在边上,f(i,j)表示从i顶点到j顶点的边权和
biuhongWA
·
2020-08-25 04:18
codeforces
数据结构
Codeforce
s 1350 C. Orac and LCM
题意;求所有对的最小公倍数组成新集合的最大公约数是多少?假设aia_iai没有222这个因子,且aja_jaj也没222这个因子,那么lcm(ai,aj)lcm(a_i,a_j)lcm(ai,aj)就不包含222这个因子那么ans=gcd{lcm(ai,aj))∣iv[N];voidinit(){vis[1]=1;rep(i,2,N-10){if(!vis[i])prime[++cnt]=i;fo
邵光亮
·
2020-08-25 04:17
CodeForces
Codeforce
s Round #641 (Div. 1) C
C.OracandGameofLife题意:一张图,只有黑点白点,如果一个点旁边的点的颜色和他一样,那他下次就会变色,问一个点在第k次迭代后的颜色思路:直接BFS暴力,预处理一下每个点是从第几次迭代开始变色的就可以随便搞了代码附上:#pragmaGCCoptimize("Ofast","inline","-ffast-math")#pragmaGCCtarget("avx,sse2,sse3,ss
狐佑 怜
·
2020-08-25 04:46
BFS
搜索
题解
Codeforce
s Round #615 (Div. 3) A、B、C、D、E
A.CollectingCoinstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputPolycarphasthreesisters:Alice,Barbara,andCerene.They’recollectingcoins.Currently,Alicehasac
菜狗一枚
·
2020-08-25 04:45
cf
codeforce
455A. Boredom(经典dp水题)
A.Boredomtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAlexdoesn'tlikeboredom.That'swhywheneverhegetsbored,hecomesupwithgames.Onelongwintereveninghecameupw
饮酒在风里
·
2020-08-25 04:08
dp
Educational
Codeforce
s Round 92 (Rated for Div. 2) 题解 (A到G)
目录CF1389A-LCMProblemCF1389B-ArrayWalkCF1389C-GoodStringCF1389D-SegmentIntersectionsCF1389E-CalendarAmbiguityCF1389F-BicoloredSegmentsCF1389G-DirectingEdgesCF1389A-LCMProblem设z=LCA(x,y),l≤x,y,z≤rz=LCA(
g@2y
·
2020-08-25 04:03
题解
上一页
77
78
79
80
81
82
83
84
下一页
按字母分类:
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
其他