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
Berland
Ancient
Berland
Circus
1C.AncientBerlandCircusNowadaysallcircusesinBerlandhavearoundarenawithdiameter13meters,butinthepastthingsweredifferent.InAncientBerlandarenasincircuseswereshapedasaregular(equiangular)polygon,thesizea
Dodd9199
·
2018-09-17 23:19
算法
C++
codeforces
Codeforces Round #503 (by SIS, Div. 2) C. Elections
首先枚举
Berland
最后的得票数,然后根据这个得票数,根据得票数,贪心的取价钱少的人:首先原票数就比
Berland
预计票数的团队需要票投到比
Berland
少1如果
Berland
还是达到预计的票数,然后再贪心从其他人中取
basasuya
·
2018-08-15 22:00
Berland
.Taxi(Treap+优先队列)
题目传送门:HERE就让它成为2017年的最后一篇博客吧这道无脑数据结构题题面过长,翻译自寻。题解这是一道令人愉悦的巧妙的数据结构题。这道题,从爆零到AC用了我两天的时间。直接分析题目。非常明显,我们需要一些数据结构去处理车辆的调动。用堆来存储那些载客的车,记录那些正在载客车辆的编号与可调用的时刻。然后我们对于每一单,需要call那个离出发地最近的taxi,这点用线段树或者Treap可以解决。但需
AbEver
·
2017-12-29 14:41
平衡树
非可持久化数据结构
STL
Berland
Miners
首先把木棒按长度排序。找找规律可以发现每个节点都会覆盖一个区间,而这个区间是一个前缀,再找找规律发现,序列中第i个木棒被覆盖至少i次就会存在解(可以用霍尔定理证明),那么就可以线段树乱搞了。找出最右边的没有满足条件的木棒,增加的长度就至少是这个木棒的长度减去这个节点到根路径的最小值。用线段树乱搞一下就好了考场上多写了个二分,多了个log……就被卡成40分#include#include#inclu
LowestJN
·
2017-07-06 21:03
线段树
二分图
Lakes in
Berland
__ dfs+贪心+小根堆
D.LakesinBerlandtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThemapofBerlandisarectangleofthesize n × m,whichconsistsofcellsofsize 1 × 1.Eachcelliseither
ProLightsfxjh
·
2016-10-16 11:00
ACM
codeforces
dfs+贪心+小根堆
Old
Berland
Language 暴力 dfs
C.OldBerlandLanguage题目连接:http://www.codeforces.com/contest/37/problem/CDescriptionBerlandscientistsknowthattheOldBerlandlanguagehadexactlynwords.Thosewordshadlengthsofl1, l2, ..., lnletters.Everywordc
qscqesze
·
2016-05-19 23:00
CodeForces 567B
Berland
National Library
思路:按照题意模拟就好了#include usingnamespacestd; mapmark; intmain() { intn; scanf("%d",&n); intnow=0,tip=0,ans=0; for(inti=0;i>s; intk; scanf("%d",&k); if(s[0]=='+') { if(tip>0) { tip--; mark[k]=1; } else { no
qq_21057881
·
2016-04-29 20:00
NYOJ 991 Registration system
Registrationsystem时间限制:1000 ms | 内存限制:65535 KB难度:2描述A new e-mail service "Berlandesk" is going to be opened in
Berland
jinjide_ajin
·
2016-04-29 17:00
CodeForces - 557A Ilya and Diplomas (模拟)水
557AIlyaandDiplomasTimeLimit: 1000MS MemoryLimit: 262144KB 64bitIOFormat: %I64d&%I64uSubmit StatusDescription不久以后,一场信息学奥林匹克竞赛将在
BERLAND
yanghui07216
·
2016-04-21 21:00
A. World Football Cup
A.WorldFootballCuptimelimitpertest2secondsmemorylimitpertest64megabytesinputstandardinputoutputstandardoutputEveryoneknowsthat2010FIFAWorldCupisbeingheldinSouthAfricanow.BythedecisionofBFA(
Berland
'sFo
u013077144
·
2016-04-21 19:00
CodeForces 638B Making Genome in
Berland
思路:dfs维护一个拓扑序就好了#include usingnamespacestd; constintmaxn=250; vectore[30]; intvis[maxn]; stringans; voiddfs(intx) { vis[x]=2; for(inti=0;i>s; for(intj=0;j
qq_21057881
·
2016-04-19 21:00
Code Forces 644A Parliament of
Berland
A.ParliamentofBerlandtimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTherearenparliamentariansinBerland.Theyarenumberedwithintegersfrom1ton.Ithappenedthatall
Dacc123
·
2016-04-16 11:00
codeforces
644A
CodeForces 19A World Football Cup
DescriptionEveryoneknowsthat2010FIFAWorldCupisbeingheldinSouthAfricanow.BythedecisionofBFA(
Berland
'sFootballAssociation
jtjy568805874
·
2016-04-04 20:00
codeforces
codeforces 638B - Making Genome in
Berland
(STL&&DFS)
大意给定一些序列a-z,问你能把他们全部连在一起,并输出最短的最终序列。思路:类似与拓扑排序,并且只有26个字母所以爆搜就行,存储序列可以用vector存储,记录入度并标记出现的字母最后再标记已经存储的字母即可。#include #include #include #include #include #include #include #include #defineLLlonglong #def
Grit_ICPC
·
2016-03-31 21:00
STL
DFS
codeforces
CodeForces 25C Roads in
Berland
RoadsinBerlandtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThereare n citiesnumberedfrom1to n inBerland.Someofthemareconnectedbytwo-wayroads.Eachroadhasi
imwutianqi
·
2016-03-31 20:00
CodeForces 25D Roads not only in
Berland
(并查集)
RoadsnotonlyinBerlandtimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputBerlandGovernmentdecidedtoimproverelationswithneighboringcountries.Firstofall,itwasdec
imwutianqi
·
2016-03-31 20:00
CodeForces 19A World Football Cup (水题)
DescriptionEveryoneknowsthat2010FIFAWorldCupisbeingheldinSouthAfricanow.BythedecisionofBFA(
Berland
'sFootballAssociation
imwutianqi
·
2016-03-31 19:00
CodeForces Roads not only in
Berland
(并查集)
H- RoadsnotonlyinBerlandTimeLimit:2000MS MemoryLimit:262144KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice CodeForces25DDescriptionBerlandGovernmentdecidedtoimproverelationswithneighboringc
Dacc123
·
2016-03-28 07:00
并查集
codeforces
Ancient
Berland
Circus 计算几何
C.AncientBerlandCircus题目连接:http://www.codeforces.com/contest/1/problem/CDescriptionNowadaysallcircusesinBerlandhavearoundarenawithdiameter13meters,butinthepastthingsweredifferent.InAncientBerlandarena
qscqesze
·
2016-03-10 17:00
CodeForces 25D - Roads not only in
Berland
(并查集题目)
本题为并查集题目,个人觉得本题的答案并不唯一题目的大意为:为了方便沟通任一两地之间,所以删除一条路的时候沟通另外一条路(一天只能进行一次),并且让花费的天数尽可能的少,所以在这里就得用并查集对是否成环进行判断。对成环的路断开,然后在端点连接另外一条与上一个环没有交点的路线,渣渣可能说的不太详细,各大神结合代码和题目样例再进行思考吧,就说到这里,下面附上AC代码。这里写代码片#include #in
qq_32866009
·
2016-02-19 11:00
并查集
codeforces
Codeforces 25C Roads in
Berland
(floyed)
题目:http://codeforces.com/problemset/problem/25/C代码:#include #include #include usingnamespacestd; longlongmaps[305][305]; intn,m; intmain() { scanf("%d",&n); for(inti=1;ic) { maps[a][b]=maps[b][a]=c
qq_32473657
·
2016-02-18 14:00
Ancient
Berland
Hieroglyphs 单调队列
B.AncientBerlandHieroglyphs题目连接:http://codeforces.com/problemset/problem/164/BDescriptionww.coPolycarpusenjoysstudyingBerlandhieroglyphs.OncePolycarpgotholdoftwoancientBerlandpictures,oneachofwhichwas
qscqesze
·
2016-01-21 20:00
Ancient
Berland
Hieroglyphs 单调队列
B.AncientBerlandHieroglyphs题目连接:http://codeforces.com/problemset/problem/164/BDescriptionww.coPolycarpusenjoysstudyingBerlandhieroglyphs.OncePolycarpgotholdoftwoancientBerlandpictures,oneachofwhichwas
qscqesze
·
2016-01-21 20:00
【codechef】Ancient
Berland
Roads(线段树)
题目描述在古老的宝兰国有N座城市和M条双向道路。随着时间的流逝,一些道路渐渐变得破旧,最后因为损坏而无法使用,而从来没有人维修这些道路。作为古宝兰国历史的热爱者,你想要做一个小小的研究。为此,你想要写一个程序来处理以下的操作:•DK,代表输入中的第K条道路损坏了。道路从1开始编号;•PAB,代表编号为A的城市的人口数变为了B。我们称一些城市构成的集合为一个区域,当且仅当对于集合中的任意两座城市,都
cacyth
·
2015-12-27 17:00
CodeForce 356A Knight Tournament(set应用)
Berl II, the king of
Berland
is makin
·
2015-11-13 12:11
code
codeforces 2A. Winner
megabytes input standard input output standard output The winner of the card game popular in
Berland
·
2015-11-13 06:35
codeforces
Berland
Bingo
http://codeforces.com/contest/370/problem/B 题意:给你n个卡片,卡片上有m个不同的数字,这个游戏是随即的从袋子里面抽球,球上有数字1-100;如果第ith玩家比起他人卡片上的数字早读出来,就输出YES,有多个就输出NO。 1 #include <cstdio> 2 #include <cstring> 3 #
·
2015-11-13 01:06
bing
codeforces 228E The Road to
Berland
is Paved With Good Intentions(2-SAT)
Berland
has n cities, some of them are connected by bidirectional roads.
·
2015-11-13 00:52
codeforces
Berland
Bingo
http://codeforces.com/contest/370/problem/B 题意 :呃,这个题我说不清楚。。。。就是有n个人,第 i 个人手里有 mi 张牌,如果,现在主人念数,念到哪张牌谁就把哪张删掉,最后谁手里没有了谁就赢,如果同时没有了,两个人都输都输出no,最重要的是Write a program that determines whether a player can wi
·
2015-11-12 09:11
bing
cf------(round 2)A. Winner
megabytes input standard input output standard output The winner of the card game popular in
Berland
·
2015-11-11 19:04
round
Ancient
Berland
Circus(几何)
Ancient
Berland
Circus time limit per test 2 seconds memory limit per test 64 megabytes input
·
2015-11-11 19:03
round
cf--------(div1)1A. Theatre Square
megabytes input standard input output standard output Theatre Square in the capital city of
Berland
·
2015-11-11 19:01
div
CodeForces 1209 B. Jury Size 树状数组处理区间统计问题
limit per test 256 megabytes input input.txt output output.txt In 2013, the writers of
Berland
·
2015-11-11 11:12
codeforces
SGU114-Telecasting station
memory limit per test: 4096 KB Every city in
Berland
is situated on Ox axis.
·
2015-11-11 10:35
cast
SGU 303 Great
Berland
Wall(计算几何判环+最小割)
题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=303 题意:给出平面上一些线段,已知这些线段只在端点处相交,且这些线段围成了若干封闭图形。每条线段有一个代价。有两个点分别位于两个封闭图形中。选择一些线段将两个点分开且这些线段的代价和最小? 思路:首先,找出所有的环。对于一条线段,每次找它的最左侧的作为下一条。将所有的环编号。然
·
2015-11-11 09:23
计算
SGU 148 B-Station(堆)
contest=0&problem=148 题意:在离著名的国家
Berland
不远的地方,有一个水下工作站。这个工作站有N层。
·
2015-11-11 03:29
IO
codeforces 144D Missile Silos(最短路)
nbsp; ——by fraud Missile Silos A country called
Berland
·
2015-11-11 02:16
codeforces
CF Theatre Square
megabytes input standard input output standard output Theatre Square in the capital city of
Berland
·
2015-11-08 16:17
tr
CodeForces 1A Theatre Square
Theatre Square Theatre Square in the capital city of
Berland
has a rectangular shape with the
·
2015-11-02 19:50
codeforces
Codeforces Round #133 (Div. 2) C. Hiring Staff 想法题目
http://codeforces.com/problemset/problem/216/C 题意: 在
Berland
法律规定每个工人的工作是这样的:它必须连续工作n天,然后休息m天,然后才能继续工作
·
2015-11-02 15:02
codeforces
Codeforces489D——暴力水题——Unbearable Controversy of Being
Description Tomash keeps wandering off and getting lost while he is walking along the streets of
Berland
·
2015-11-02 15:29
codeforces
shakes hands
February, 30th n students came in the Center for Training Olympiad Programmers (CTOP) of the
Berland
·
2015-11-02 09:15
sha
Codeforces Football Championship
规定只有4个球队,我方球队为
BERLAND
,一定会有的,然后另外3个球队的名字不一定。4个球队,两两球队间打且仅打一场比赛(所以可以知道一共是打了6场)。
·
2015-10-31 14:44
codeforces
VK Cup 2012 Qualification Round 1 D. Ice Sculptures
memory limit per test 256 megabytes input standard input output standard output The
Berland
·
2015-10-31 09:13
round
SGU 148.B-Station
时间限制:0.25s 空间限制:4M 题目 在离著名的国家
Berland
不远的地方,有一个水下工作站。这个工作站有N层。
·
2015-10-31 09:29
IO
Berland
Local Positioning System 构造
Berland
Local Positioning System Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com
·
2015-10-31 08:01
codeforces
Hot Days Codeforces Round #132 (Div. 2) D(贪婪)
Description The official capital and the cultural capital of
Berland
are connected by a single
·
2015-10-30 15:40
codeforces
sgu 121. Bridges painting 列举情况 难度:1
memory limit per test: 4096 KB New
Berland
consists of N (1£ N£
·
2015-10-30 13:18
bridge
sgu114. Telecasting station 难度:1
memory limit per test: 4096 KB Every city in
Berland
is situated on Ox axis.
·
2015-10-30 13:14
cast
Codeforces Round #288 (Div. 2) B. Anton and currency you all know 贪心
seconds memory limit per test 256 megabytes input standard input output standard output
Berland
·
2015-10-30 13:55
codeforces
上一页
1
2
3
下一页
按字母分类:
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
其他