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
Educational Codeforces Round 132
div.2
A-F题解
视频讲解:TBDA.ThreeDoors题目大意有333个门和333把对应的钥匙。其中222把钥匙分别在222扇门后,111把在手上。打开门才能获得门后的钥匙,问能否打开所有的门。题解判断前两次开的门后,是否有钥匙即可。参考代码#includeusingnamespacestd;typedeflonglongll;intmain(){intT,x,a[5],now;scanf("%d",&T);w
欣君
·
2023-10-31 20:16
----Codeforces
算法
图论
c++
Educational Codeforces Round 118
div.2
A-E题解
视频讲解:咕了,推荐看wls的视频题解。A.LongComparison题目大意有两个数,它们都用同一种格式表示:一个正整数x(1≤x≤106)x(1\leqx\leq10^6)x(1≤x≤106),后面附加p(0≤p≤106)p(0\leqp\leq10^6)p(0≤p≤106)个000。现在给定两个数,求他们的大小比较关系。题解由于1≤x≤1061\leqx\leq10^61≤x≤106,因此
欣君
·
2023-10-31 20:44
----Codeforces
算法
c语言
c语言
Codeforces Round 880 (Div. 2) A-C题解
CodeforcesRound880(
Div.2
)A-Destroyer题意:n个人站了几条线,每个人会报出所在线自己前面的人数,判断报数是否合法思路:数很小在100以内,直接开一个桶,把每次读入放进去
じ☆时.倾.灬
·
2023-10-31 20:11
c语言
算法
c++
Codeforces Round #807 (Div. 2) A-C题解
CodeforcesRound#807(
Div.2
)A、B、C题题解A-MarkthePhotographer题意:马克要给2n个人照相,分两排,一排站n人,给出每个人的身高,要求后排要比前排的身高至少高出
Gowilli
·
2023-10-31 20:09
C++
Codeforces
算法
Codeforces Round #742
Div.2
(A~E)题解
比赛链接:点击这里传送官方题解链接:点击这里传送Codeforces1567A题目链接:点击这里传送题意:给出n个1×\times×2大小的多米诺骨牌组成2×\times×n的矩形。现输入第一行的多米诺骨牌的方向,根据上图的格式输出排列方法。思路:上下左右四个方向都取其对立面输出就行。#includeusingnamespacestd;intt,n;strings;stringans;intmai
老鸡奇遇记
·
2023-10-31 20:38
Codeforces题解
算法
c++
贪心算法
acm竞赛
Codeforces Round #684 (Div. 2) A - C2 题解
CodeforcesRound#684(
Div.2
)A-C2题解ABuytheString题意给定一个长度为nnn的01串,你可以用hhh的代价把字符串中任意一个字符取反,最终你要把这个01串买下来,0
avgstuBoboge
·
2023-10-31 20:37
codeforce记录
算法
Codeforces Round #818 (Div. 2) A - D题解
CodeforcesRound#818(
Div.2
)A-D题解A题意找出共有多少对数(a,b),满足lcm(a,b)gcd(a,b)≤3\frac{lcm(a,b)}{gcd(a,b)}\leq3gcd
绝尘JC
·
2023-10-31 20:06
codeforces
算法
c++
Codeforces Round #415 (
Div.2
) A-D 题解
ABCDhttp://codeforces.com/contest/810这场题目确实不错,E也是挺难的,我看了看数位dp还是算了.A你有n个数字,每个数字在1-k之间.问你最少添加多少个1-k间的数字,使得这些数字的平均数小数部分四舍五入之后等于k.明显必须添加kk,我们可以暴力添加ii个kk,看看添加多少个的时候四舍五入等于kk.#include//ItheaMyseValguliousnam
Fuko_Ibuki
·
2023-10-30 08:17
codeforces
题解
codeforces
题解
Codeforces Round #383
Div.2
A-E 题解
ABCDE这场题目不难,但是很有意思.A求1378^n的个位数.特判n=0n=0的情况即可.intd[]={6,8,4,2};intmain(){intn=read();write(!n?1:d[n%4]);}B求a[i]^a[j]=x的pair(i,j)(i//ItheaMyseValguliousnamespacechtholly{typedeflonglongll;#definere0reg
Fuko_Ibuki
·
2023-10-30 08:17
codeforces
题解
总结
codeforces
题解
总结
Codeforces Round #191 (
Div.2
) 题解
ABCDE这场打的很爽,题目质量很高.A给一个01序列,能将一个子串取反,求整个序列的最多1的个数.数据范围很小,暴力枚举所有子串取反,求最大的值即可.#include//ItheaMyseValguliousnamespacechtholly{typedeflonglongll;#definere0registerint#definerecregisterchar#definerelregist
Fuko_Ibuki
·
2023-10-30 08:46
codeforces
总结
题解
codeforces
总结
题解
Codeforces Round #768 (Div. 2) (ABCDEF)
CodeforcesRound#768(
Div.2
)(ABCDEF)本场个人总结:本场感觉思维题为主,不过还是读错了题意,耽误了一些时间。补题:总感觉F题好像是原题,但不记得是哪一题了。
斗奋力努
·
2023-10-28 04:05
codeforces
思维
算法
c++
Codeforces Round #830解题记录
解题记录文章目录CodeforcesRound#830(
Div.2
)ABCDECodeforcesRound#830(
Div.2
)使用C++语言解题,可能存在不简洁的地方。
weie99
·
2023-10-23 21:07
c++
开发语言
Codeforces Round#566(
Div.2
)1182C. Beautiful Lyrics
C.BeautifulLyricstimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivennwords,eachofwhichconsistsoflowercasealphabetletters.Eachwordcontainsatleastonevo
GUESSERR
·
2023-10-23 00:54
错题集
贪心
Codeforces
B
Codeforces Round #604 (Div. 2) D. Beautiful Sequence(贪心)
CodeforcesRound#604(
Div.2
)D.BeautifulSequence(贪心)传送门BeautifulSequencetimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAnintegersequenceiscalledbeautifulifthed
XiaoHan-zhhy
·
2023-10-23 00:20
codeforces
codeforces
贪心
算法
Codeforces Round 857
div.2
目录A.Likes(贪心)题面翻译思路代码实现B.SettlementofGuineaPigs题面翻译思路代码实现C.TheVeryBeautifulBlanket题面翻译思路代码实现D.Buyinggifts题面翻译思路代码实现这场太失败了,40分钟A了两道签到,然后两个多小时全程梦游,相继开了C、D、E三道题,一道也写不出来,现来补个题A.Likes(贪心)Nikitarecentlyheld
Auroraaaaaaaaaaaaa
·
2023-10-23 00:17
codeforces题解
算法
c++
Matrix Game (思维) (Round #648
Div.2
)
传送门题意:有一个棋盘初始状态有些位置是’1’—表示该位置对应的行和列都已经被占用。现在Vivek和Ashish一起做游戏,两人轮流选一个未被占用的位置标记,且Ashish是先手,谁动不了了谁就输了。输出每次的赢家。思路:直接统计没有’1’的行的数量line,以及没有’1’的列的数量row.取line与row的min为minn,若minn为奇数就是先手赢,反之后手赢。代码实现:#include#d
S atur
·
2023-10-22 11:33
比赛&训练
Codeforces Round 901 (Div. 2)
Dashboard-CodeforcesRound901(
Div.2
)-CodeforcesA.JellyfishandUndertale题意:有一个炸弹,给出初始爆炸时间b,可以进行n次操作,每次可以延长炸弹爆炸时间
maisui12138
·
2023-10-21 15:21
算法
c++
Codeforce Round 991(
Div.2
)A-D
文章目录A.JellyfishandUndertaleB.JellyfishandGameC.JellyfishandGreenAppleD.JellyfishandMexA.JellyfishandUndertale题目大意:给出一个炸弹,bbb秒后爆炸,给出nnn个操作,可以使炸弹多延长xxx秒,炸弹最多可以延长至aaa秒;求炸弹最终在多少秒后爆炸思路:贪心,每次等到炸弹还差一秒的时候给它续命
予你成风
·
2023-10-21 15:51
算法
动态规划
Codeforces Round 389
Div.2
B. Santa Claus and Keyboard Check(模拟)
B.SantaClausandKeyboardCheck原题链接:http://codeforces.com/problemset/problem/748/BSantaClausdecidedtodisassemblehiskeyboardtocleanit.Afterhereturnedallthekeysback,hesuddenlyrealizedthatsomepairsofkeystoo
Alzh
·
2023-10-15 18:37
#
模拟
#
水题
ACM
Codeforces
Round
389
Div.2
B.
Santa
Claus
and
Keyboard
Check
【cf】Codeforces 题解等汇总
【cf】CodeforcesRound#774(
Div.2
)前4题【cf】CodeforcesRound#774(
Div.2
)前4题_legend_yst的博客-CSDN博客【算法刷题】排序:CodeForces984A
dllglvzhenfeng
·
2023-10-15 15:53
CF:codeForces
信息技术
计算机考研机试
算法
蓝桥杯
信奥
青少年趣味编程
计算机考研
Codeforces Round 879
Div.2
文章目录A.UnitArrayB.MaximumStrengthC.GamewithReversingD.SurveyinClassE.MEXofLCMA.UnitArrayProblem-A-Codeforces统计-1的数量cnt,当cnt为奇数或者n-cnt-cntusingnamespacestd;constintN=110;intT,a[N];intmain(){cin>>T;while
.SacaJawea
·
2023-10-15 13:35
练习赛补题
算法
贪心算法
Game On Leaves (贪心 / “博弈”) (Round #646
Div.2
)
传送门题意:给你一个n个节点的无根树和一个特殊节点x。Ayush和Ashish轮流在树上进行游戏:找到一个叶节点(度大于或等于零)将其删除(包括以其为端点的边),删除特殊点的就是赢家,且Ayush为先手。输出每个测试的赢家名字。思路:这道题看起来是博弈,其实就是个贪心的思维题若特殊点就是叶节点则直接先手Ayush赢将特殊点看做根节点,必须删除其他n-2个点后再看谁是先手谁就是赢家(也就相当于n%2
S atur
·
2023-10-15 02:37
贪心
比赛&训练
博弈
CodeForces每日好题10.14
是一个奇数行的时候,显然只要最小步数小于等于给定的步数的话就是有解的~//Problem:B.LiHuaandPattern//Contest:Codeforces-CodeforcesRound864(
Div
灬德布罗意的猫灬
·
2023-10-14 16:17
Codeforces
算法
c++
数据结构
Codeforces Round #789 (Div. 2)
CF系列题解CodeforcesRound#789(
Div.2
)题目A.TokitsukazeandAllZeroSequence原题链接题意题解思路代码B1.TokitsukazeandGood01-
XLS_233
·
2023-10-14 06:17
codeforces日常
算法
c++
Codeforces Round #789 (Div. 2) A B1 B2 C D E
CodeforcesRound#789(
Div.2
)AB1B2CDEA.TokitsukazeandAllZeroSequence题意:给你一个长度为nnn的aaa数组,你每次操作可以进行下述两种操作的任意一种
Snow_raw
·
2023-10-14 06:44
CodeForces
c语言
算法
数据结构
Codeforces Round 892 (Div. 2)
CodeforcesRound892(
Div.2
)A.UnitedWeStand思路:很容易想到让数组里面的最小值放在b数组里让其余的放在c数组里即可。
LINDKK
·
2023-10-05 23:41
算法
c++
Codeforces Round 879 (Div. 2) D题 记录做法
首先给出题目来源CodeforcesRound879(
Div.2
)D题先通读一遍题目,我们可以知道本题的思路就是要求2个区间的最大不重合区间,以此来让一个人的分数尽可能高一个人的分数尽可能低。
旭光×拂晓
·
2023-10-05 23:10
算法
贪心算法
c++
Codeforces Round #763 (Div. 2)
题目列表1.A-RobotCleaner-codeforcesRound#763(
Div.2
)题意:题解:解释:AC代码:2.B-GameonRanges-codeforcesRound#763(
Div
WRC11
·
2023-10-05 23:40
笔记
算法
c++
数据结构
Codeforces Round 899 (Div. 2)
Dashboard-CodeforcesRound899(
Div.2
)-CodeforcesA.IncreasingSequence由于a与b不相等,但b必须算出最小故可以从最小开始(1),故如果b=a
Akct
·
2023-10-02 03:39
算法
Codeforces Round #779 (Div. 2)
原题链接:Dashboard-CodeforcesRound#779(
Div.2
)-Codeforceshttps://codeforces.com/contest/1658A.MarinandPhotoshoot
Yang 丶。
·
2023-10-01 15:41
c++
Codeforces Round 597 (Div. 2) D (最小生成树)
题目链接:CodeforcesRound597(
Div.2
)D//Problem:D.ShichikujiandPowerGrid//Contest:Codeforces-CodeforcesRound597
萌新好菜
·
2023-10-01 08:25
算法
E. ANDfinity
Status-CodeforcesRound798(
Div.2
)-Codeforces思路:这个题想明白了,但是实现的时候卡了半天。。。
zzzyyzz_
·
2023-09-28 11:47
codeforces
算法
Codeforces Round 897 (Div. 2)
Dashboard-CodeforcesRound897(
Div.2
)-CodeforcesB.XORPalindromes先算出每一串数字变成回文数最少需要的次数,然后进行分类讨论如果这串数的长度为偶数
Akct
·
2023-09-20 12:30
算法
Codeforces Round 897 (Div. 2)
CodeforcesRound897(
Div.2
)A.green_gold_dog,arrayandpermutation思路:记录原数组中从大到小的值,并输出原数组对应的大小的值#includeusingnamespacestd
LINDKK
·
2023-09-14 16:37
算法
图论
Codeforces Round 866 (Div 2)(A - D)
CodeforcesRound866(
Div.2
)(A-D)Dashboard-CodeforcesRound866(
Div.2
)-CodeforcesA.Yura’sNewName(思维)思路:枚举每个下划线
.Ashy.
·
2023-09-11 09:17
算法
【cf】CodeForces Round 893(
Div.2
)题解 A - C
A.Buttons原题链接题意有三堆物品,给出每一堆物品的数量,第一个人只能从第一堆和第三堆每次拿一个,第二个人只能从第二堆和第三堆每次拿一个,谁先没东西拿谁就输,问谁能赢思路这一题一开始脑子抽了wa了一发,都想让对方输所以都得先拿第三堆的,第三堆拿完了再看第一二堆谁多谁少,注意一下奇偶即可代码#includeusingnamespacestd;usingi64=longlong;typedefp
Texcavator
·
2023-09-09 22:08
Codeforces
题解
c语言
算法
开发语言
【cf】CodeForces Round 892(
Div.2
)题解 A - D
文章目录A.UnitedWeStand题意思路代码B.OlyaandGamewithArrays题意思路代码C.AnotherPermutationProblem题意思路代码D.AndreyandEscapefromCapygrad题意思路代码A.UnitedWeStand原题链接题意给出一个数组a,把数组a中的元素分给两个空数组,要求第一个数组中的每个元素都不能是第二个数组中元素的倍数,输出一种
Texcavator
·
2023-09-09 22:38
Codeforces
题解
c语言
算法
c++
Codeforces Round 856 (Div. 2) A-C
比赛链接:Dashboard-CodeforcesRound856(
Div.2
)-CodeforcesA:思维题意:给定一个字符串的长度N,再给2N-2个子串,判断原字符串是否是回文串。
Black_Chocolate.
·
2023-09-09 08:02
Codeforces
Contest
c语言
算法
c++
codeforces
C - Orac and LCM
CodeforcesRound#641(
Div.2
)2021/11/12题目大意:给一组数a[n]a[n]a[n],求gcd({lcm(ai,aj)∣iusingnamespacestd;#define_orzios
Bzdhxs_nt
·
2023-09-07 21:19
数论
codeforces
算法
Codeforces Round #782 (Div. 2)
所以停了一段时间的训练,嘤嘤嘤这场本来要打,然后十分钟写A写bug了,于是玩游戏去了……早上vp了一下,下课了就溜回去睡觉了,下午把c做了,d还没看,回头看一下Dashboard-CodeforcesRound#782(
Div
yeah17981
·
2023-09-05 19:41
#
每日cf计划
c++
算法
Codeforces Round 875
div.2
problemB. Array merging题解
目录一、题目二、题目分析三、一、题目传送门B.Arraymergingtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregiventwoarraysaandbbothoflengthn.Youwillmerge††thesearraysformingano
Enjoycola_
·
2023-09-01 17:54
题解
算法
c++
Codeforces
Div.2
1798B Three Sevens题解
题目:传送门B.ThreeSevenstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputLottery"ThreeSevens"washeldformdays.Ondayi,nipeoplewiththenumbersai,1,…,ai,ni,participate
Enjoycola_
·
2023-09-01 17:53
算法
数据结构
【cf】CodeForces Edu Round 153(
Div.2
)题解 A - C
文章目录A.NotaSubstring题意思路代码B.FancyCoins题意思路代码C.GameonPermutation题意思路代码A.NotaSubstring原题链接题意给出一段长度为n的仅由(和)组成的字符串,要求输出一段长度为2*n的不包含给定字串的字符串,其中()要对应,比如说不能)(思路这题还是想了一会儿,最后发现其实只有()的情况不能输出,其余情况可以按照以下规则输出:如果给出的
Texcavator
·
2023-08-23 12:22
Codeforces
题解
c语言
c++
算法
Codeforces Round 893 (Div. 2)ABC
CodeforcesRound893(
Div.2
)目录A.Buttons题目大意思路核心代码B.TheWalkway题目大意思路核心代码C.YetAnotherPermutationProblem题目大意思路核心代码
想要AC的sjh
·
2023-08-17 03:52
ACM
c++
算法
数论
codeforces
Codeforces Round 893 (Div. 2)ABC
CodeforcesRound892(
Div.2
)目录A.UnitedWeStand题目大意思路代码B.OlyaandGamewithArrays题目大意思路代码C.AnotherPermutationProblem
想要AC的sjh
·
2023-08-13 23:58
ACM
算法
数据结构
c++
codeforces
Codeforces Round 890 (Div. 2) supported by Constructor Institute C. To Become Max
CodeforcesRound890(
Div.2
)supportedbyConstructorInstituteC.ToBecomeMaxCode:#include#includeusingnamespacestd
极地星辰
·
2023-08-13 08:24
codeforces
ACM-ICPC算法
算法
c++
数据结构
Codeforces Round 892 (Div. 2) C. Another Permutation Problem 纯数学方法 思维题
CodeforcesRound892(
Div.2
)C.AnotherPermutationProblem源码:#include#include#include#include#include#include
极地星辰
·
2023-08-13 08:52
ACM-ICPC算法
codeforces
数论
c语言
算法
开发语言
【cf】CodeForces Round 890(
Div.2
)题解 A - C
A.TalesofaSort题意给出一个数组,每次操作可以将所有元素a[i]a[i]a[i]变成max(0,ai−i)max(0,a_i-i)max(0,ai−i),问至少操作多少次能将数组变成递增数组思路这一题卡很久,最后发现踩了两个坑题目读错了,每次操作会改变所有元素,而不是指定元素!元素a[i]>=0a[i]>=0a[i]>=0,不用考虑负数情况!我的思路是,另外开一个数组存储原数组排好序的
Texcavator
·
2023-08-08 07:48
Codeforces
题解
c语言
算法
c++
【每日一题】—— B1. Palindrome Game (easy version)(Codeforces Round 721 (Div. 2))
一.题目描述题目大意:题目链接:B1.PalindromeGame(easyversion)(CodeforcesRound721(
Div.2
))二.思路分析一般这种题目就是判断奇偶如果有偶数个0,A先改
PH_modest
·
2023-08-05 21:51
每日一题
c++
算法
学习
coderforces
【每日一题】—— C. Mocha and Hiking(Codeforces Round 738 (Div. 2))
一.题目描述题目大意:题目链接C.MochaandHiking(CodeforcesRound738(
Div.2
))二.思路分析三种情况,1~n-1,n-1~1~n,1~i~n-1~i+1~n三.代码展示
PH_modest
·
2023-08-04 23:02
每日一题
c语言
算法
c++
codeforces
学习
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
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
其他