#ICPC

2019 ICPC上海站K.Color Graph

ColorGraph题意:给出一个由(n)个点和(m)条边组成的无向图,保证无自环无重边,初始时所有的边都是白色的,每一次都可以选择一条边把它染成红色,不过需要保证不存在红色的奇环,现在要求尽可能多的将白边染成红色,问最多能染多少条边题解:看到奇环首先想到二分图:所以这道题就转化成了一个二分图问题:就是要找尽可能多的边...

2015 ICPC 沈阳站M题

M- MeetingTimeLimit:6000MS     MemoryLimit:262144KB     64bitIOFormat:%I64d&%I64uSubmit cid=113817#status//M/0"class="ui-buttonui-widgetui-state-defaultui-c...
代码星球 ·2020-08-28

Ice Cream Tower(The 2016 ACM-ICPC Asia China-Final Contest 二分&贪心)

题目:  Mr.Pandalikesicecreamverymuchespeciallytheicecreamtower.AnicecreamtowerconsistsofKicecreamballsstackingupasatower.Inordertomakethetowerstable,thelowericecr...
代码星球 ·2020-07-18

Bet(The 2016 ACM-ICPC Asia China-Final Contest 思路题)

题目:  TheCodejamongameisonfire!Fansacrosstheworldarepredictingandbettingonwhichteamwillwinthegame.  Agamblingcompanyisprovidingbettingoddsforallteams;theoddsfort...
代码星球 ·2020-07-18

World Cup(The 2016 ACM-ICPC Asia China-Final Contest dfs搜索)

题目:  HereisWorldCupagain,thetop32teamscometogethertofightfortheWorldChampion.Theteamsareassignedinto8groups,with4teamsineachgroup.Everytwoteamsinthesamegroupwil...
代码星球 ·2020-07-18

Number Theory Problem(The 2016 ACM-ICPC Asia China-Final Contest 找规律)

题目:Mr.Pandaisoneofthetopspecialistsonnumbertheoryallovertheworld.NowMr.Pandaisinvestigatingthepropertyofthepowersof2.Since7istheluckynumberofMr.Panda,heisalways...

ACM-ICPC 2018 南京赛区网络预赛

AAnOlympianMathProblem #include<bits/stdc++.h>usingnamespacestd;typedeflonglongll;llT,n;intmain(){scanf("%lld",&T);while(T--){scanf("%lld",&n...

ACM-ICPC 2018 沈阳赛区网络预赛

AGudakoandRitsuka BCallofAccepted CConvexHull DMadeInHeaven#include<bits/stdc++.h>usingnamespacestd;constintMM=1e5+5;constintINF=1e9+7;intd...

ACM-ICPC 2018 徐州赛区网络预赛

AHardtoprepare#include<bits/stdc++.h>usingnamespacestd;#defineN1000005longlongmod=1e9+7;longlongpower(longlonga,longlongb){a%=mod;longlongret=1;while(b){i...

ACM-ICPC 2018 焦作赛区网络预赛

A MagicMirror#include<bits/stdc++.h>usingnamespacestd;chars[20];intmain(){intT;scanf("%d",&T);cin.ignore();while(T--){gets(s);intlen=strlen(s);fo...

ACM-ICPC 2018 I. Characters with Hash

 I.CharacterswithHashMurloveshashalgorithm,andhesometimesencryptanotherone'sname,andcallhimwiththatencryptedvalue.Forinstance,hecallsKimuraKMR,andcallsSuzu...

hihoCoder #1871 : Heshen's Account Book-字符串暴力模拟 自闭(getline()函数) (ACM-ICPC Asia Beijing Regional Contest 2018 Reproduction B) 2018 ICPC 北京区域赛现场赛B

P2:Heshen'sAccountBookTimeLimit:1000msCaseTimeLimit:1000msMemoryLimit:512MBDescriptionHeshenwasanofficialoftheQingdynasty.Hemadeafortunewhichcouldbecomparableto...