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
USCAO
USCAO
section 1.3 Calf Flac
CalfFlacItissaidthatifyougiveaninfinitenumberofcowsaninfinitenumberofheavy-dutylaptops(withverylargekeys),thattheywillultimatelyproducealltheworld'sgreatpalindromes.Yourjobwillbetodetectthesebovinebea
剑不飞
·
2020-08-13 10:47
USCAO
贪心
uscao
母亲的牛奶 dfs
母亲的牛奶农民约翰有三个容量分别是A,B,C升的桶,A,B,C分别是三个从1到20的整数,最初,A和B桶都是空的,而C桶是装满牛奶的.有时,约翰把牛奶从一个桶倒到另一个桶中,直到被灌桶装满或原桶空了.当然每一次灌注都是完全的.由于节约,牛奶不会有丢失.#include#include#include#include#include#includeusingnamespacestd;intf[30]
zhhx2001
·
2016-04-28 20:00
NKOI 1015(
USCAO
2.2.2)子集
子集TimeLimit:1000MS MemoryLimit:65536KTotalSubmit:112Accepted:65Description对于从1到N(1#includeusingnamespacestd;longlongf[40][391];intn,r,i,j,cnt;intmain(){ scanf("%d",&n); r=n*(n+1)/2; if(r&1)print
getsum
·
2016-04-09 20:00
USCAO
3.26Sweet Butter(SPFA)
最短路复杂度估计错误 以为SPFA是N*m的 用了dij超时 用SPFA直接跑就好了 O(k*e) K 一般为2,3; 1 /* 2 ID: shangca2 3 LANG: C++ 4 TASK: butter 5 */ 6 #include <iostream> 7 #include<cstdio&
·
2015-11-13 02:38
SPFA
USCAO
4.3.1 buylow 动态规划-高精度
第一问:显然是最长下降子序列f[i]=max{f[j]+1} a[i]a[j]加上限制条件,要怎么办呢?如何去掉重复的情况呢?我们考虑如下情况65[4]98[4]到4的最长下降子序列为3,可以654(第一个4) 也可以654(第二个4),也可以984(第二个4)显然,对于最长下降子序列为【相同】的时候,对于4这个数字,最后一个4的方案数,包含所有以4结尾,最长下降子序列为3的解的数量。基于此,我们
baidu_23081367
·
2015-05-16 16:00
USCAO
4.2 The Perfect Stall ,二分图最大匹配
题目地址:http://poj.org/problem?id=1274题意:给你n头牛,和m个墙,每头牛有自己喜欢的墙,要求每堵墙只能有一头牛,求最多的匹配数。分析:二分图的最大匹配sample_input552253234215312512sample_output4如下构成二分图,我们可以直接采用匈牙利算法。给上图添加源点和汇点,就构成了网络流。把图构好后,就可以直接上模板了。Code:#in
yew1eb
·
2013-08-16 11:00
USCAO
section 4.1 Fence Loops(最短路,最小环,5级)
FenceLoopsThefencesthatsurroundFarmerBrown'scollectionofpastureshavegottenoutofcontrol.Theyaremadeupofstraightsegmentsfrom1through200feetlongthatjointogetheronlyattheirendpointsthoughsometimesmorethan
nealgavin
·
2013-07-08 19:00
USCAO
:Ordered Fractions
/* ID:JangLawrence PROG:frac1 LANG:C++ */ #include #include #include #include #include #definempmake_pair usingnamespacestd; structp { inta,v; p(){} p(intx,inty){a=x,v=y;} voidprint(){printf("%d%c%d\n
Lawrence_Jang
·
2013-03-06 13:00
USCAO
section 2.3 Zero Sum(dfs)
ZeroSumConsiderthesequenceofdigitsfrom1throughN(whereN=9)inincreasingorder:123...N.Nowinserteithera`+'foradditionora`-'forsubtractionora`'[blank]torunthedigitstogetherbetweeneachpairofdigits(notinfron
nealgavin
·
2012-09-08 20:00
USCAO
section 2,2 Preface Numbering(算是DP吧)
PrefaceNumberingAcertainbook'sprefacesarenumberedinuppercaseRomannumerals.TraditionalRomannumeralvaluesuseasinglelettertorepresentacertainsubsetofdecimalnumbers.Hereisthestandardset:I1L50M1000 V5C100
nealgavin
·
2012-08-29 16:00
USCAO
section 1.4 Number Triangles(DP)
NumberTriangles Considerthenumbertriangleshownbelow.Writeaprogramthatcalculatesthehighestsumofnumbersthatcanbepassedonaroutethatstartsatthetopandendssomewhereonthebase.Eachstepcangoeitherdiagonallydow
nealgavin
·
2012-08-09 20:00
input
Path
each
output
traversal
Numbers
USCAO
section 1.4 Arithmetic Progressions(枚举)
ArithmeticProgressionsAnarithmeticprogressionisasequenceoftheforma,a+b,a+2b,...,a+nbwheren=0,1,2,3,....Forthisproblem,aisanon-negativeintegerandbisapositiveinteger.Writeaprogramthatfindsallarithmeticp
nealgavin
·
2012-08-09 19:00
search
PIVOT
n2
output
sorting
Numbers
USCAO
section Mother's Milk(搜索)
Mother'sMilkFarmerJohnhasthreemilkingbucketsofcapacityA,B,andCliters.EachofthenumbersA,B,andCisanintegerfrom1through20,inclusive.Initially,bucketsAandBareemptywhilebucketCisfullofmilk.Sometimes,FJpour
nealgavin
·
2012-08-07 14:00
c
File
Integer
search
input
output
USCAO
section 1.4 The Clocks
TheClocksIOI'94-Day2Considernineclocksarrangedina3x3arraythusly:|-------||-------||-------| ||||||| |---O||---O||O| |||||| |-------||-------||-------| ABC |-------||-------||-------| |||||| |O||O||O
nealgavin
·
2012-07-24 19:00
table
Integer
each
Matrix
output
Numbers
USCAO
section 1.4 Packing Rectangles
PackingRectanglesIOI95 Thesixbasiclayoutsoffourrectangles Fourrectanglesaregiven.Findthesmallestenclosing(new)rectangleintowhichthesefourmaybefittedwithoutoverlapping.Bysmallestrectangle,wemeanthe
nealgavin
·
2012-07-20 16:00
USCAO
section1.3 Prime Cryptarithm(感觉思路挺好)
PrimeCryptarithm ThefollowingcryptarithmisamultiplicationproblemthatcanbesolvedbysubstitutingdigitsfromaspecifiedsetofNdigitsintothepositionsmarkedwith*.Ifthesetofprimedigits{2,3,5,7}isselected,thecr
nealgavin
·
2012-07-11 17:00
File
null
input
constraints
output
Numbers
USCAO
section1.3 Barn Repair
BarnRepair ItwasadarkandstormynightthatrippedtheroofandgatesoffthestallsthatholdFarmerJohn'scows.Happily,manyofthecowswereonvacation,sothebarnwasnotcompletelyfull.Thecowsspendthenightinstallsthatarear
nealgavin
·
2012-07-10 18:00
list
File
Integer
input
output
Numbers
USCAO
section 1.3 Mixing Milk
MixingMilkSincemilkpackagingissuchalowmarginbusiness,itisimportanttokeepthepriceoftherawproduct(milk)aslowaspossible.HelpMerryMilkMakersgetthemilktheyneedinthecheapestpossiblemanner.TheMerryMilkMakers
nealgavin
·
2012-07-10 17:00
USCAO
section 1.2 Name That Number
NameThatNumberAmongthelargeWisconsincattleranchers,itiscustomarytobrandcowswithserialnumberstopleasetheAccountingDepartment.Thecowhandsdon'tappreciatetheadvantageofthisfilingsystem,though,andwishtoca
nealgavin
·
2012-07-07 11:00
USCAO
section 1.2 Dual Palindromes
DualPalindromesMarioCruz(Colombia)&HugoRickeboer(Argentina) Anumberthatreadsthesamefromrighttoleftaswhenreadfromlefttorightiscalledapalindrome.Thenumber12321isapalindrome;thenumber77778isnot.Ofcour
nealgavin
·
2012-07-05 21:00
USCAO
section1.2 Palindromic Squares
PalindromicSquares RobKolstad Palindromesarenumbersthatreadthesameforwardsasbackwards.Thenumber12321isatypicalpalindrome.GivenanumberbaseB(2 #include #include #defineN1234 usingnamespacestd; struct
nealgavin
·
2012-07-04 09:00
struct
File
null
Integer
output
Numbers
USCAO
section 1.1 Transformations
Transformations AsquarepatternofsizeNxN(1 #include #include #include #defineN15 usingnamespacestd; charmap[N][N]; char_map[N][N]; intmain() { freopen("transform.in","r",stdin); freopen("transform.ou
nealgavin
·
2012-04-28 13:00
USCAO
Section 1.1 Milking Cows
MilkingCowsThreefarmersriseat5ameachmorningandheadforthebarntomilkthreecows.Thefirstfarmerbeginsmilkinghiscowattime300(measuredinsecondsafter5am)andendsattime1000.Thesecondfarmerbeginsattime700andends
nealgavin
·
2012-04-27 20:00
uscao
Section 1.1 Friday the Thirteenth
/*ID:nealgav1 PROG:friday LANG:C++ */ #include #include #defineN403 intweek[N][7]; voidsearch() {memset(week,0,sizeof(week)); inti,j,k,year,ri,count=0; boolflag=0; for(i=1900,year=0;i<1900+N;i++,year
nealgavin
·
2012-04-11 20:00
c
search
uscao
Section 1.1 Greedy Gift Givers
简单题,建个结构体/*ID:nealgav1 PROG:gift1 LANG:C++ */ #include #include #defineN2004 classpeople { public: charname[20]; intmoney; }; intm; peoplename[N]; intgetid(charname_[]) { for(inti=0;i
nealgavin
·
2012-04-07 20:00
c
Class
IM
上一页
1
下一页
按字母分类:
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
其他