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 #638 (Div. 2) BC
B要构造一个循环节为k的字符串计算相异元素个数c,若c>k,不可能构造若cusingnamespacestd;constintMAX_N=105;inta[MAX_N],cnt[MAX_N],v[MAX_N];vectortab;intmain(){intt;cin>>t;while(t--){memset(cnt,0,sizeof(cnt));memset(v,0,sizeof(v));tab.
とと
·
2020-08-25 05:42
Codeforce
s Round #639 (Div. 2) BC
B找规律可以想象为\\这样斜向右的摆放,每加一层,相当于把最右边的\向右平移复制一次,再加上最顶部的3个#includeusingnamespacestd;typedeflonglongll;constintMAX_N=3e4+5;longlongf[MAX_N];intmain(){f[1]=2;llx=5;longlongmx=30000;for(inti=2;i>t;while(t--){i
とと
·
2020-08-25 05:42
codeforce
s 排位赛4
传送门题面B.DiverseGarlandtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouhaveagarlandconsistingofnlamps.Eachlampiscoloredred,greenorblue.Thecolorofthei-thlamp
とと
·
2020-08-25 05:41
2019寒假专题一 L
CodeForce
s - 1260B
题面B.ObtainTwoZeroestimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregiventwointegersaandb.Youmayperformanynumberofoperationsonthem(possiblyzero).Duringe
とと
·
2020-08-25 05:41
codeforce
s 排位赛3
传送门题面A.WormholeSorttimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputFarmerJohn’scowshavegrowntiredofhisdailyrequestthattheysortthemselvesbeforeleavingthebarne
とと
·
2020-08-25 05:41
Codeforce
s Round #664 (Div. 2) 题解
A.BoboniuLikestoColorBalls查看题解数学B.BoboniuPlaysChess查看题解构造C.BoboniuandBitOperations查看题解位运算+暴力D.BoboniuChatswithDu查看题解贪心
忘梦心
·
2020-08-25 05:37
codeforces
codeforce
s C. Frog Jumps
题目题意:给你一个L,RL,RL,R序列,如果青蛙在LLL上就最多往左边跳d个格子,如果是RRR就最多往右边跳d个格子,问青蛙跳到最右边的格子需要的最小的d是多少。思路:最小的距离其实就是两个RRR之间的间隔,因为题目没说要最小次数,所以也就是说假如我们跳到了LLL上我们就可以跳到最近的一个RRR上面,然后由于这个R再跳到下一个R上,为了计算方便我们可以直接把首尾也设成RRR,如果首尾只能跳到LL
忘梦心
·
2020-08-25 05:37
codeforces
Codeforce
s Round 89 (Rated for Div. 2)
A.ShovelsandSwords题解:假设第一种工具买了x个,第二种买了y个。那么由题可知0≤2x+y≤a{0≤2x+y≤a}0≤2x+y≤a0≤x+2y≤b{0≤x+2y≤b}0≤x+2y≤b求(x+y)max,高中线性规划可以求解。intmain(){intt;cin>>t;while(t--){lla,b;cin>>a>>b;if(2*min(a,b)>t;while(t--){lln,
张小生的先生
·
2020-08-25 05:15
Educational
Codeforce
s Round 92 (Rated for Div. 2)解题报告
Educational
Codeforce
sRound92(RatedforDiv.2)A.LCMProblem题目大意给定区间[l,r][l,r][l,r],让你找到正整数xxx,yyy满足l≤xry>
CUG_YZL
·
2020-08-25 05:15
codeforces
Codeforce
s Round #624 (Div. 3) A—C
A-AddOddorSubtractEven(奇偶)将x变成y两种操作1,x可以加一个任意的奇数2,x可以减一个任意的偶数判断x与y的奇偶,以及他的大小关系即可代码:#include#include#include#include#include#include#include#include#include#includetypedeflonglongll;#definePllmake_pair
_Alexander
·
2020-08-25 05:41
Codeforces
Codeforce
s Round #641 (Div. 1)
A-OracandLCM先对每一个数字进行质因数分解,记录,该质因数的次方和出现次数。如果出现了n-1次,那么答案有该质因数最小次方。如果出现了n次,那么答案拥有该质因数次小次方。#include#include#include#include#include#include#include#include#include#include#include#include//#include#inc
weixin_44019404
·
2020-08-25 05:10
规律
最短路
数学
Codeforce
s Round #587 (Div. 3) C. White Sheet
题目http://
codeforce
s.com/contest/1216/problem/C题意给你三个矩形的左下角坐标和右上角坐标。第一个矩形为白矩形,第二第三个为黑矩形。
皓洲
·
2020-08-25 05:05
Codeforces
补题库
CodeForce
s - 266A——Stones on the Table
StonesontheTableTherearenstonesonthetableinarow,eachofthemcanbered,greenorblue.Counttheminimumnumberofstonestotakefromthetablesothatanytwoneighboringstoneshaddifferentcolors.Stonesinarowareconsideredn
螢塚
·
2020-08-25 05:33
ACM训练题
CodeForce
s - 492A(第三期白银组比赛T2)
Timelimit1000msMemorylimit262144kBVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows:thetoplevelofthepyramidmustconsistof1cube,thesecondlevelmustconsistof1 + 2 = 3cub
糖贩
·
2020-08-25 05:33
Codeforce
s Round #624 (Div. 3) A - Add Odd or Subtract Even
AddOddorSubtractEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregiventwopositiveintegersaaandbb.Inonemove,youcanchangeaainthefollowingway:Choosean
菱形继承
·
2020-08-25 05:26
#
Codeforces
Codeforce
s Round #491 (Div. 2)题解
A.Ifatfirstyoudon’tsucceed…timelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputEachstudenteagerlyawaitsthedayhewouldpasstheexamssuccessfully.Thus,Vasyawasreadyto
ssqsssq
·
2020-08-25 05:54
Codeforces
Frog Jumping
https://
codeforce
s.com/contest/1077/problem/Atimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAfrogiscurrentlyatthepoint0onacoordinateaxisOx.Itjumpsbythefollo
STZG
·
2020-08-25 05:10
#
C++
Codeforce
s Round #587 (Div. 3)E2. Numerical Sequence (hard version)(二分)
题目:E2.NumericalSequence(hardversion)题意:一串数11212312341234512345612345671234567812345678912345678910……有q(qusingnamespacestd;typedeflonglongll;inlinellget_sum(llx){//从1~区间长度x的前x项和returnx*(x+1)/2;}inlinel
Mr.路痴
·
2020-08-25 05:37
算法与数据结构
Educational
Codeforce
s Round 61 (Rated for Div. 2) F题解
FYouaregivenastringssoflengthnnconsistingoflowercaseLatinletters.Youmayapplysomeoperationstothisstring:inoneoperationyoucandeletesomecontiguoussubstringofthisstring,ifalllettersinthesubstringyoudelete
weixin_42754967
·
2020-08-25 05:05
dp
【
Codeforce
s】1216B - Shooting
ProblemDescription:RecentlyVasyadecidedtoimprovehispistolshootingskills.Todayhiscoachofferedhimthefollowingexercise.Heplacedncansinarowonatable.Cansarenumberedfromlefttorightfrom1ton.Vasyahastoknockdo
喜欢ctrl的cxk
·
2020-08-25 05:31
C++
非降路径和Lindström–Gessel–Viennot定理(例题 牛客网暑期ACM多校训练营(第一场)A.Monotonic Matrix)(
codeforce
s 348D HDU 5852)
参考博客and图片来源https://blog.csdn.net/ftx456789/article/details/81132126非降路径就是给定一个起点(0,0)和终点(m,n),然后只能向右或者向上走。非降路径问题转换为组合数可以认为总共有n+m种选择,从中选出m步向右走,或者选择n步向上走,则可得路径的方案数为或。Lindström–Gessel–Viennot定理详见维基百科:http
Bug_Programmer
·
2020-08-25 05:54
学习随笔
Educational
Codeforce
s Round 47 B Minimum Ternary String[字符串]
B.MinimumTernaryStringtimelimitpertest:1secondmemorylimitpertest:256megabytesinput:standardinputoutput:standardoutputYouaregivenaternarystring(itisastringwhichconsistsonlyofcharacters'0','1'and'2').Yo
Whowell
·
2020-08-25 05:35
字符串
codeforce
s679 D. Bear and Chase
codeforce
s679D.BearandChasehttp://blog.csdn.net/Ezereal/article/details/52743686DBearandChaseO(n^3)暴力首先
weixin_34341229
·
2020-08-25 05:40
Codeforce
s 321A
x[i]表示:从第一步到第i步为止,横坐标的位置;y[i]表示:从第一步到第i步为止,纵坐标的位置;设字符串S的长度为len;则有k*x[len]+x[i]=a;而且k*y[len]+y[i]=b;(这里下标从1开始),而且要注意的是k为非负整数,还要考虑x[len]或y[len]为0的情况。然后从1到len枚举i就可以了。附上代码:1#byStomach_ache2defmove(s,i):3i
weixin_34021089
·
2020-08-25 05:47
如何获取
codeforce
s的完整数据?(玄学方法)
做cf题总是wa,wa了以后还没发看完整数据,好气哦!怎么办?这其实非常简单首先看一下wa的那个数据有什么特点比如说n=1111,m=1111那么就if(n==1111&&m==1111)getdata();getdata()是什么,其实就是把数据按行输出出来的程序因为cf的输入数据只能显示一部分,但是输出数据我们可以自我调整把输入数据进行分块处理,然后按行输出cf显示输出数据是可以显示20行的,
weixin_33800463
·
2020-08-25 05:01
CF492E Vanya and Field
题目描述:http://
codeforce
s.com/problemset/problem/492/E(英文题)翻译不写了大家都能看懂。看到这道题的第一想法是啥……?暴力模拟?
weixin_30918415
·
2020-08-25 05:53
Codeforce
s Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) C. Stairs and Elevators【二分查找】...
Intheyearof30XX30XXparticipantsofsomeworldprogrammingchampionshipliveinasinglelargehotel.Thehotelhasnnfloors.Eachfloorhasmmsectionswithasinglecorridorconnectingallofthem.Thesectionsareenumeratedfrom11
yuxiaoyu.
·
2020-08-25 05:21
Codeforce
s Round #465 (Div. 2) Fifa and Fafa
C.FifaandFafatimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputFifaandFafaaresharingaflat.Fifalovesvideogamesandwantstodownloadanewsoccergame.Unfortunately,Faf
weixin_30737433
·
2020-08-25 05:44
Codeforce
s题目
A-WatermelonCrawlinginprocess...CrawlingfailedTimeLimit:1000MSMemoryLimit:65536KB64bitIOFormat:%I64d&%I64uSubmitStatusDescriptionOnehotsummerdayPeteandhisfriendBillydecidedtobuyawatermelon.Theychoseth
weixin_30725315
·
2020-08-25 05:12
Codeforce
s Round #277.5 (Div. 2)
题目链接:http://
codeforce
s.com/contest/489A:SwapSortInthisproblemyourgoalistosortanarrayconsistingofnintegersinatmostnswaps.Forthegivenarrayfindthesequenceofswapsthatmakesthearraysortedinthenon-descending
weixin_30517001
·
2020-08-25 05:02
CodeForce
s - 321E Ciel and Gondolas
DiscriptionFoxCielisintheAmusementPark.AndnowsheisinaqueueinfrontoftheFerriswheel.Therearenpeople(orfoxesmoreprecisely)inthequeue:weusefirstpeopletoreferoneattheheadofthequeue,andn-thpeopletoreferthel
weixin_30488313
·
2020-08-25 05:30
CodeForce
s 492A Vanya and Cubes
A.VanyaandCubestimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows:thetoplev
weixin_30480583
·
2020-08-25 05:59
网络流(费用流)
CodeForce
s 321B:Ciel and Duel
FoxCielisplayingacardgamewithherfriendJiro.Jirohasncards,eachonehastwoattributes:position(AttackorDefense)andstrength.FoxCielhasmcards,eachonehasthesetwoattributestoo.It'sknownthatpositionofallCiel'sc
weixin_30466039
·
2020-08-25 05:58
Codeforce
s Round #277.5 (Div. 2) A,B,C,D,E,F题解
转载请注明出处:http://www.cnblogs.com/fraud/——byfraudA.SwapSorttimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputInthisproblemyourgoalistosortanarrayconsistingofninte
weixin_30293135
·
2020-08-25 04:49
Codeforce
s Gym100952 D. Time to go back-杨辉三角处理组合数 (2015 HIAST Collegiate Programming Contest)...
D.Timetogobacktimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouhavebeenoutofSyriaforalongtime,andyourecentlydecidedtocomeback.YourememberthatyouhaveMfriend
weixin_30263277
·
2020-08-25 04:17
如何获取
codeforce
s的完整数据
推荐:如何获取
codeforce
s的完整数据?
weixin_30240349
·
2020-08-25 04:46
codeforce
s round477
codeforce
sround477好久没打cf了,回来打一场,pp了4个题的fst了三个,掉了100多分。好像cf已经三连掉从接近2000掉到1700+了。老年选手打什么cf嘛。
wcy_1122
·
2020-08-25 04:45
题解
套题总结
贪心
构造
CodeForce
s 158B taxi
AfterthelessonsngroupsofschoolchildrenwentoutsideanddecidedtovisitPolycarpustocelebratehisbirthday.Weknowthatthei-thgroupconsistsofsifriends(1 ≤ si ≤ 4),andtheywanttogotoPolycarpustogether.Theydecided
ELL_COOL_A
·
2020-08-25 04:08
我的CF笔记
Codeforce
s 158B:Taxi
B.Taxitimelimitpertest3secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAfterthelessonsngroupsofschoolchildrenwentoutsideanddecidedtovisitPolycarpustocelebratehisbirthday.Wek
_执念_
·
2020-08-25 04:07
Codeforces
Anya and Ghosts -
CodeForce
s 508 C 水题
AnyaandGhoststimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAnyalovestowatchhorrormovies.Inthebesttraditionsofhorror,shewillbevisitedbymghoststonight.Anyah
提比-我有特殊的AC技巧
·
2020-08-25 04:24
CodeForces
水题
Codeforce
s Round #280 (Div. 2) A B C
http://
codeforce
s.com/contest/492A水题A.VanyaandCubestimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawants
mfcheer
·
2020-08-25 04:50
Codeforce
s Round #280 (Div. 2)A B C
A-VanyaandCubes:#include#include#includeusingnamespacestd;typedef__int64ll;constintN=10005;lla[N];intmain(){a[0]=0;for(lli=1;in)ans--;printf("%d\n",ans);}return0;}B-VanyaandLanterns:#include#include#i
zxxxxzzz
·
2020-08-25 04:48
CF
Codeforce
s 258B. Little Elephant and Elections【数位DP,DFS】
B.LittleElephantandElectionstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTherehaverecentlybeenelectionsinthezoo.Overalltherewere7mainpoliticalparties:one
朽弈
·
2020-08-25 04:16
codeforces
dfs
动态规划
ACM之路
ACM
C++
dp
dfs
Codeforce
s 140E New Year Garland (dp + 容斥)
#include#include#include#include#include#include#include#include#includeusingnamespacestd;#defineinf0x3f3f3f3f#defineN5020#defineM1000020#defineLLlonglong#definemod1000000007#definels(i>1)#definelsonl
yamiedie_
·
2020-08-25 04:44
codeforces
组合计数
Codeforce
s Round #243 (Div. 2) A,B,C(暴力枚举)
A.SerejaandMugs思路:大水杯的水是累计的..定定要改掉自己读题猴急的毛病!!CODE:#include#include#include#includeusingnamespacestd;intmain(){intn,m;while(~scanf("%d%d",&n,&m)){inta[105],s=0;for(inti=0;i#includeusingnamespacestd;int
HonniLin
·
2020-08-25 04:13
CF
Codeforce
s Round #369 (Div. 2) B. Chris and Magic Square
B.ChrisandMagicSquaretimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputZStheCoderandChristheBaboonarrivedattheentranceofUdayland.Thereisan × nmagicgridontheen
神探特斯拉
·
2020-08-25 04:13
Codeforce
s Round #222 (Div. 2)---A. Playing with Dice
PlayingwithDicetimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTwoplayersareplayingagame.Firsteachofthemwritesanintegerfrom1to6,andthenadiceisthrown.Theplaye
sxk_sxy
·
2020-08-25 04:12
暴力
Codeforces
Codeforces
Codeforce
s Round #280 (Div. 2)---A. Vanya and Cubes (规律 + 暴力)
VanyaandCubestimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVanyagotncubes.Hedecidedtobuildapyramidfromthem.Vanyawantstobuildthepyramidasfollows:thetoplevel
sxk_sxy
·
2020-08-25 04:12
Codeforces
【
codeforce
s】
Codeforce
s Round #280 (Div. 2) 水题专场
传送门:【
codeforce
s】
Codeforce
sRound#280(Div.2)492A.VanyaandCubes找到最大的i使得1+2+3+……+i小于等于n,并且输出i。
poursoul
·
2020-08-25 04:11
题解
CodeForce
Round #484 B - Bus of Characters(思维+栈)
题目链接题目大意:公交车有n排座位,每排的座位有两个,且这两个座位的宽度一样。任何两排座位的宽度度都不一样。首先给你一个n,接下来给你n个数字代表第i排座位的宽度。然后给你一个01字符串代表乘客上车的顺序。0和1分别代表内向的人和外向的人。内向的人会从没有人坐的那几排选出一个宽度最小的那排座。外向的人会从有一个人坐的那几排选出宽度最大的那排座。题目要求你根据上车的顺序输出他们应该坐第几排。解题思路
糖宋元明清
·
2020-08-25 04:11
ac的题
上一页
76
77
78
79
80
81
82
83
下一页
按字母分类:
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
其他