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 414B - Mashmokh and ACM
给你长度为l的整数数列b1, b2, ..., bl(1 ≤ b1 ≤ b2 ≤ ... ≤ bl ≤ n)如果这个数列被称为好的,那么每个元素都可以整除下一个元素给你n和k,去找到长度为k的好数列的个数dp[任意i][1]=1;dp[i的倍数][长度k]=sum(dp[i][长度k-1]+1);1#include2#include3usingnamespacestd;4constintMOD=1
weixin_34186128
·
2020-09-17 13:04
codeforce
s 788C The Great Mixing (bitset优化dp、bfs)
题目原文http://
codeforce
s.com/problemset/problem/788/CSashaandKolyadecidedtogetdrunkwithCoke,again.ThistimetheyhavektypesofCoke.i-thtypeischaracterisedbyitscarbondioxideconcentration.Today
wchhlbt
·
2020-09-17 13:17
codeforces
动态规划
搜索
codeforces
bitset
bfs
dp
codeforce
s 4D Mysterious Present
题意:n个信封,第i个信封宽w[i],高h[i],现有宽为w,高为h的卡片,求满足下面条件的信封序列:1、宽、高大于卡片的宽、高2、序列中第i个信封宽、高严格小于第i+1个信封的宽、高分析:对于条件1,可以在输入时就把满足条件的信封记录下来;对于条件2,对满足条件1的信封按照宽由小到大排序。因为宽已经按照由小到大排序了,于是只需高度满足后者大于前者即可,所以对排好序的信封的高度求一次LIS,所得的
克莉丝汀娜
·
2020-09-17 13:25
dp
codeforce
s--414B--Mashmokh and ACM
MashmokhandACMTimeLimit:1000MSMemoryLimit:262144KB64bitIOFormat:%I64d&%I64uSubmitStatusDescriptionMashmokh'sboss,Bimokh,didn'tlikeMashmokh.Sohefiredhim.MashmokhdecidedtogotouniversityandparticipateinA
刀刀狗0102
·
2020-09-17 13:59
Codeforce
s 394B Very Beautiful Number(水题)
题目链接:
Codeforce
s394BVeryBeautifulNumber题目大意:给出p和x,要求找出一个p位数,要求p*x=t,t为p的各位移动到最前面。
JeraKrs
·
2020-09-17 13:36
CF
GRADE:D
非常简单的签到题
Codeforce
s Beta Round #17 C. Balance (字符串计数 dp)
C.Balancetimelimitpertest3secondsmemorylimitpertest128megabytesinputstandardinputoutputstandardoutputNicklikesstringsverymuch,helikestorotatethem,sortthem,rearrangecharacterswithinastring...Oncehewrot
utobe67
·
2020-09-17 13:46
dp
codeforce
比赛规则介绍(转)
Codeforce
s简称:cf(所以谈论cf的时候经常被误会成TX的那款游戏).网址:
codeforce
s.com这是一个俄国的算法竞赛网站,由来自萨拉托夫州立大学、由MikeMirzayanov领导的一个团队创立和维护
狮子淡泊名利
·
2020-09-17 12:12
题目分类
codeforces
codeforce
s 414B B. Mashmokh and ACM(dp)
题目链接:
codeforce
s414B题目大意:定义一个序列,前一项能够整除后一项,给定这个序列中数的取值范围和序列的长度,问有多少种构造方法。
黎辰
·
2020-09-17 12:24
codeforces的dp专题
Codeforce
s 414B Mashmokh and ACM【预处理+dp】
B.MashmokhandACMtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMashmokh'sboss,Bimokh,didn'tlikeMashmokh.Sohefiredhim.Mashmokhdecidedtogotouniversityandparti
mengxiang000000
·
2020-09-17 12:34
dp
codeforce
s-414B-Mashmokh and ACM
codeforce
s-414B-MashmokhandACMtimelimitpertest1secondmemorylimitpertest256megabytesMashmokh’sboss,Bimokh
宣之于口
·
2020-09-17 12:02
codeforces
ACM_动态规划
Codeforce
s Round #369 (Div. 2) C. Coloring Trees (DP)
ColoringTrees题目链接:http://
codeforce
s.com/contest/711/problem/CDescriptionZStheCoderandChristheBaboonhasarrivedatUdayland
dituonian8372
·
2020-09-17 11:33
数据结构与算法
Codeforce
s Round #369 (Div. 2) A. Bus to Udayland (水题)
BustoUdayland题目链接:http://
codeforce
s.com/contest/711/problem/ADescriptionZStheCoderandChristheBaboonaretravellingtoUdayland
dituonian8372
·
2020-09-17 11:33
数据结构与算法
Codeforce
s Round #460 (Div. 2) D. Substring(拓扑排序)
题目链接题意:有一个n个点m条边的有向图,每个节点有一个字母,路径的权值是路径上相同字母的最大个数。求最大的路径权值。思路:因为只有26个字母,所以直接假设其中一个字母为相同字母数最大的字母。枚举每一个字母,通过拓扑排序找到最大权值,取其中的最大值就是答案。当图中存在环时,答案就是无穷大,输出-1;代码:#includeusingnamespacestd;#defineLLlonglong#def
GOTOTHEBAD
·
2020-09-17 11:12
图论综合
codeforces
【数位DP】CF55D BZOJ3329 HDU4352 SGU390 HDU5519
SPOJ10606SPOJ10606BZOJ3629BZOJ3629
CodeForce
s55D
CodeForce
s-55D题目大意:题目大意
冬日阳光下的一只猫
·
2020-09-17 11:32
DP
Codeforce
s Problem 414B. Mashmokh and ACM
题目链接:http://
codeforce
s.com/problemset/problem/414/B题意:Asequenceoflintegersb1, b2, ..., bl(1 ≤ b1 ≤ b2
ckmoonfish
·
2020-09-17 11:53
codeforces
Codeforce
s Round #657 (Div. 2) A-D
A:枚举哪7个连续字串是abacaba即可,注意一些细节处理#includeusingnamespacestd;typedeflonglongll;#definels(o>T;while(T--){intn;memset(p,0,sizeof(p));cin>>n>>p;boolz=true;for(inti=0;i+6usingnamespacestd;typedeflonglongll;#de
夕林山寸
·
2020-09-17 11:45
CF
CodeForce
s 657B Bear and Polynomials
题目链接:http://
codeforce
s.com/problemset/problem/657/BBearandPolynomialstimelimitpertest:2secondsmemorylimitpertest
Silenceneo
·
2020-09-17 11:46
数学
CodeForce
s 850A(105/600)
Youaregivensetofnpointsin5-dimensionalspace.Thepointsarelabeledfrom1ton.Notwopointscoincide.Wewillcallpointabadiftherearedifferentpointsbandc,notequaltoa,fromthegivensetsuchthatanglebetweenvectorsandi
NineFailure
·
2020-09-17 11:23
ACM练习
思维
CodeForce
s - 650A(104/600)
WatchmenareinadangerandDoctorManhattantogetherwithhisfriendDanielDreibergshouldwarnthemassoonaspossible.Therearenwatchmenonaplane,thei-thwatchmanislocatedatpoint(xi, yi).Theyneedtoarrangeaplan,butther
NineFailure
·
2020-09-17 11:22
ACM练习
模拟
CodeForce
s - 631C(103/600)
EachmonthBlakegetsthereportcontainingmaineconomicindicatorsofthecompany“BlakeTechnologies”.Therearencommoditiesproducedbythecompany.Foreachofthemthereisexactlyoneintegerinthefinalreport,thatdenotescor
NineFailure
·
2020-09-17 11:22
ACM练习
模拟
CF1176C Lose it!(简单题)
题目链接:http://
codeforce
s.com/contest/1176/problem/C题意:https://www.luogu.com.cn/problem/CF1176C思路:把这6个数按顺序排成一排
LLL_yx
·
2020-09-17 10:00
思维
水题
acm竞赛
CF1168C And Reachability(位运算+dp)
题目链接:http://
codeforce
s.com/problemset/problem/1168/C题意:https://www.luogu.com.cn/problem/CF1168C思路:最后一定时要跳到
LLL_yx
·
2020-09-17 10:00
dp
acm竞赛
Mashmokh and ACM
CodeForce
s - 414B 【DP】
B.MashmokhandACMtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMashmokh'sboss,Bimokh,didn'tlikeMashmokh.Sohefiredhim.Mashmokhdecidedtogotouniversityandparti
Conchpeng
·
2020-09-17 10:14
动态规划之基础DP
Codeforce
s Round #240 (Div. 1)B---Mashmokh and ACM(水dp)
Mashmokh’sboss,Bimokh,didn’tlikeMashmokh.Sohefiredhim.MashmokhdecidedtogotouniversityandparticipateinACMinsteadoffindinganewjob.HewantstobecomeamemberofBamokh’steam.Inordertojoinhewasgivensomeprogramm
tokers
·
2020-09-17 10:42
DP
codeforces
CodeForce
s 414B Mashmokh and ACM (DP)
B.MashmokhandACMtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputMashmokh'sboss,Bimokh,didn'tlikeMashmokh.Sohefiredhim.Mashmokhdecidedtogotouniversityandparti
GODLINESS_
·
2020-09-17 10:39
动态规划
Codeforce
s Round #658 (Div. 2)
A-CommonSubsequence最短相同子序列长度肯定为1,如果一个元素都不相等之间不存在相同子序列#defineIOios::sync_with_stdio(false);cin.tie();cout.tie(0)#definedebug(x)cout#include#includeusingnamespacestd;constintN=1010;intn,m;inta[N],b[N];b
Fighting_Peter
·
2020-09-17 10:06
Codeforces
算法
数据结构
c++
Codeforce
s Round #169 (Div. 2)
A:#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#defineNN16384#defineINF0x7ffffff#defineeps1e-6#definepi3.1415926535
Chromer_cn
·
2020-09-17 10:23
Codeforces
CodeForce
s - 414B Mashmokh and ACM(dp)
题目链接:https://vjudge.net/problem/
CodeForce
s-414BMashmokh’sboss,Bimokh,didn’tlikeMashmokh.Sohefiredhim.MashmokhdecidedtogotouniversityandparticipateinACMinsteadoffindinganewjob.HewantstobecomeamemberofB
zaiyang遇见
·
2020-09-17 10:59
动态规划1---子序列问题
CodeForce
s 149D Coloring Brackets
ColoringBracketstimelimitpertest:2secondsmemorylimitpertest:256megabytesinput:standardinputoutput:standardoutputOncePetyareadaproblemaboutabracketsequence.Hegaveitmuchthoughtbutdidn'tfindasolution.Tod
Silenceneo
·
2020-09-17 10:51
CodeForce
s 657A Bear and Forgotten Tree 3
题目链接:http://
codeforce
s.com/problemset/problem/657/ABearandForgottenTree3timelimitpertest:2secondsmemorylimitpertest
Silenceneo
·
2020-09-17 10:50
构造算法
CodeForce
s 680A 680B
680A:BearandFiveCards简单判断计算#include#include#include#includeusingnamespacestd;intmain(){inta[5],sum,i,flag,j1,j2;while(scanf("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){sum=0;flag=0;j1=0;j2=0;sor
haohaoxuexilmy
·
2020-09-17 04:18
题目
Gym - 101982B Coprime Integers (莫比乌斯裸题)
原题地址:http://
codeforce
s.com/gym/101982参考博客:https://blog.csdn.net/jk_chen_acmer/article/details/82016719
yiqzq
·
2020-09-17 04:25
ACM_数论
暑假训练第二期---思维题2
A-SlimeCombiningTimeLimit:2000MSMemoryLimit:262144KB64bitIOFormat:%I64d&%I64uSubmitStatusPractice
CodeForce
s618ADescriptionYourfriendrecentlygaveyousomeslimesforyourbirthday.Youhavenslimesallinitiallyw
PrConstantin
·
2020-09-17 04:40
暑假
Educational
Codeforce
s Round 20 F. Coprime Subsequences(容斥)
题目链接:https://
codeforce
s.com/problemset/problem/803/F题目大意:我们称一段非空序列为互质序列当且仅当gcd(a1,a2,…,ak)=1。
CourierLo
·
2020-09-17 04:12
CF
Codeforce
s Gym 101982 F Rectangles —— 线段树+扫描线求面被矩形个数为奇数个的面积
题意:给你n个矩形,问你所有多少1*1的格子被奇数个矩形覆盖。题解:用线段树做一下区间更新即可。这里是奇数个矩形,可以用异或来处理数组。用sum记录一个区间上的有效的长度,被异或的话就根据原来的长度减一下就行。需要注意的是,我们存的是边值。只需要将原来的update和运算修改一下即可。#includeusingnamespacestd;constintN=1e5+5;#definelllonglo
天翼之城*
·
2020-09-17 03:01
扫描线
线段树
Codeforce
s 1401 F. Reverse and Swap —— 线段树,区间翻转
Thisway题意:给你一个长度为2n2^n2n的数组,有4种操作:嗝太长了,自己看一下吧题解:我一开始还想着用FHQTreap,没仔细考虑时间复杂度,如果2,3操作每次k都是0的话,就是n2logn^2logn2log的时间复杂度。然后的话,由于是简单翻转没有插入删除,于是可以用线段树,区间打上翻转标记就行了,第二种和第三种有一些区别。操作二的话,就需要在深度为k以及之后的所有深度都打上左右互换
天翼之城*
·
2020-09-17 03:01
想法
线段树
B - Coprime Integers Gym - 101982B 莫比乌斯板子题
题目链接:http://
codeforce
s.com/gym/101982题意:,求gcd(x,y)=1的对数做法:莫比乌斯函数,贴个链接。。
余西子
·
2020-09-17 03:12
模板
数论
F - Rectangles Gym - 101982F 扫描线+线段树
题面:http://
codeforce
s.com/gym/101982/attachments/download/7897/20182019-acmicpc-pacific-northwest-regional-contest-div
余西子
·
2020-09-17 03:41
模板
codeforce
s698f(数学)
F.CoprimePermutationtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTwopositiveintegersarecoprimeifandonlyiftheydon'thaveacommondivisorgreaterthan1.Somebear
yyPurpose_forever
·
2020-09-17 03:47
数学
Codeforce
s Round #508 (Div. 2) B. Non-Coprime Partition
problemlink:http://
codeforce
s.com/contest/1038/problem/B题意:给你一个n,让你将从1~n这n个数分为两部分,使得两部分的和的最大公约数不为1。
图南1204
·
2020-09-17 03:15
codeforces
gym 101982 B题 Coprime Integers
题目链接:https://
codeforce
s.com/gym/101982/attachments贴一张图吧:题目意思就是给出四个数字,a,b,c,d,分别代表两个区间[a,b],[c,d],从这两个区间里面分别拿一个数字组成
weixin_30564901
·
2020-09-17 03:49
Gym - 101982B Coprime Integers (莫比乌斯反演)
题目链接:http://
codeforce
s.com/gym/101982/attachments题目大意:有区间[a,b]和区间[c,d],求gcd(x,y)=1,其中x属于[a,b],y属于[c,d
weixin_30627381
·
2020-09-17 03:49
gym101982 B Coprime Integers (莫比乌斯)
链接:http://
codeforce
s.com/gym/101982/attachments题意:有两个区间[a,b]和[c,d],求gcd(i,j)==1的对数,i∈\in∈[a,b],j∈\in∈
bnc1010
·
2020-09-17 03:06
数论
【莫比乌斯反演最简单的入门题】B.Coprime Integers
来源ICPCPacificNorthwestRegionalContest2018B移步
codeforce
sgym提交或者vjudge思路真是个傻逼题,但是当时没有学完莫比乌斯init是在用线性筛获得莫比乌斯函数的前缀和然后用容斥原理得到解注意溢出前置知识莫比乌斯反演线性筛积性函数说明莫比乌斯真是毒瘤
STL_CC
·
2020-09-17 03:32
ACM赛题与杂谈
Codeforce
s Round #432 (Div. 2, based on IndiaHacks Final Round 2017)ABCD
A.ArpaandaresearchinMexicanwavetimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputArpaisresearchingtheMexicanwave.Therearenspectatorsinthestadium,labeledfrom1to
weixin_30687811
·
2020-09-17 03:05
数据结构与算法
[
Codeforce
s] #432 div.2 (Virtual)
==自觉太颓,模拟赛#432
Codeforce
sRound#432(Div.2,basedonIndiaHacksFinalRound2017)A-ArpaandaresearchinMexicanwave
weixin_30421809
·
2020-09-17 03:04
数据结构与算法
Codeforce
s #663 (Div. 2) D. 505(状压dp)
Abinarymatrixiscalledgoodifeveryevenlengthsquaresub-matrixhasanoddnumberofones.Givenabinarymatrixaaconsistingofnnrowsandmmcolumns,determinetheminimumnumberofcellsyouneedtochangetomakeitgood,orreportth
墨韵*
·
2020-09-17 02:26
dp
2016XTU算法专题个人赛1 题解
-Taxi(
CodeForce
s158B)题意:n个团队,每个团队1-4人,搭可以坐4人的车,每个团队的人必须在同一辆车上,问最少需要多少辆车?
hnshhslsh
·
2020-09-17 02:29
【
Codeforce
s Round】 #432 (Div. 2) 题解
Codeforce
sRound#432(Div.2,basedonIndiaHacksFinalRound2017)A.ArpaandaresearchinMexicanwavetimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputArpaisresearchingthe
baochui8729
·
2020-09-17 02:08
数据结构与算法
【长更】一句话题解(组队训练的俄罗斯题、oj、camp)
的表示看别人是这样做的但是没懂为什么 组队训练的题,如果是队友过的板刷题,题面又很长,就会标个“队友说是沙雕题”
Codeforce
s(主要是gym)300iqContest1 每天起床第一句,300iqTXDE
rzO_KQP_Orz
·
2020-09-17 02:25
上一页
47
48
49
50
51
52
53
54
下一页
按字母分类:
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
其他