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
joj
joj
2443
/*f(n,m)为前N个数字逆序数为M的种类数当m-n-1>=0时(n-1可以找到以m为逆序数的排列,当然f[n-1][m]=0)f(n,m)=f(n-1,m)+f(n-1,m-1)+f(n-1,m-2)+....+f(n-1,m-n+1);f(n,m-1)=f(n-1,m-1)+f(n-1,m-2)+....+f(n-1,m-n-1)+f(n-1,m-n)f(n,m)=f(n-1,m)+f(
hqd_acm
·
2011-03-24 19:00
c
joj
Fatmouse and JavaBean
#include#include#includeusingnamespacestd;constintnodesize=1010;constintinf=1h[j]){h[j]=h[now]+bean[j];pre[j]=now;c[j]=c[now];}elseif(h[now]+bean[j]==h[j])c[j]+=c[now];}elseif(d[j]>d[now]+map[now][j
hqd_acm
·
2011-03-24 09:00
poj 3093 Margaritas on the River Walk //
joj
MargaritasontheRiverWalkTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:1579 Accepted:545DescriptionOneofthemorepopularactivitiesinSanAntonioistoenjoymargaritasintheparkalongtheriverknowastheRive
hqd_acm
·
2011-03-24 09:00
Integer
input
each
dataset
methods
combinations
joj
1031 Hanoi Tower Troubles Again!解题报告
1031:HanoiTowerTroublesAgain!ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K1034606StandardPeoplestoppedmovingdiscsfrompegtopegaftertheyknowthenumberofstepsneededtocompletetheentiretask.Butont
neoxuhaotian
·
2011-01-28 18:00
Integer
input
语言
each
output
Numbers
joj
1026解题报告
1026:TheStaircasesResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K1590530StandardOnecuriouschildhasasetofNlittlebricks.Fromthesebrickshebuildsdifferentstaircases.Staircaseconsistsofstepsofdiffe
neoxuhaotian
·
2011-01-28 14:00
zoj 1133||
joj
1027解题报告
SmithNumbersTimeLimit: 1Second MemoryLimit: 32768KBWhileskimminghisphonedirectoryin1982,AlbertWilansky,amathematicianofLehighUniversity,noticedthatthetelephonenumberofhisbrother-in-lawH.Smithhadt
neoxuhaotian
·
2011-01-27 17:00
Integer
input
语言
each
output
Numbers
joj
1019解题报告
1019:DotheUntwistResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K992556StandardCryptography dealswithmethodsofsecretcommunicationthattransformamessage(theplaintext)intoadisguisedform(the cipher
neoxuhaotian
·
2011-01-24 19:00
underscore
Integer
Arrays
encryption
pascal
output
zoj1828||
joj
1949 解题报告
FibonacciNumbersTimeLimit: 1Second MemoryLimit: 32768KBAFibonaccisequenceiscalculatedbyaddingtheprevioustwomembersofthesequence,withthefirsttwomembersbeingboth1.f(1)=1,f(2)=1,f(n>2)=f(n-1)+f(n-2)
neoxuhaotian
·
2011-01-23 12:00
joj
1920解题报告
1920:JojerResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K733231StandardMrJojerisateacher,andheiscrazyinprogramming,hewantsthecomputertodoeverythingforhim,oneday,oneofhiscolleagueMrNEtigerasksh
neoxuhaotian
·
2011-01-22 21:00
c
input
语言
output
Numbers
joj
1386解题报告
1386:500!ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K2898518StandardInthesedaysyoucanmoreandmoreoftenhappentoseeprogramswhichperformsomeusefulcalculationsbeingexecutedratherthentrivialscree
neoxuhaotian
·
2011-01-22 21:00
Integer
input
character
each
output
Numbers
joj
1386解题报告
1386:500!ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K2898518StandardInthesedaysyoucanmoreandmoreoftenhappentoseeprogramswhichperformsomeusefulcalculationsbeingexecutedratherthentrivialscreen
neoxuhaotian
·
2011-01-21 21:00
Integer
input
character
each
output
Numbers
JOJ
1126 Monkey and Banana
1126:MonkeyandBananaResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K22294StandardAgroupofresearchersaredesigninganexperimenttotesttheIQofamonkey.Theywillhangabananaattheroofofabuilding,andattheme
JackyZhengX1990
·
2010-12-17 10:00
c
Integer
input
Build
each
Types
JOJ
2237 Hero Ranklist
2237:HeroRanklistResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE5s8192K257119StandardArthur想要将手下的战士按照能力进行排名,选择出得力的助手进行冒险.他收集了很多人之间比武的胜负情况,如A战胜了B,B战胜了C等。他发现,这些胜负关系之间彼此互不矛盾,也就是不能出现C又战胜了A这种情况,但很多人之间并没有比武,
JackyZhengX1990
·
2010-12-14 13:00
数据结构
c
ini
input
output
2010
JOJ
2306 Marriage(归并排序求逆序数)
2306:Marriage ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K42460StandardNow,alotofpersonsholdingtheirmarriagestogetherareinfashion.Oneday,alotofpeopleholdtheirmarriagestogether.Theyareallhappy
JackyZhengX1990
·
2010-12-07 14:00
JOJ
2329 Maximal
2329:MaximalResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K375126StandardGiveyousomepositiveintegers,youshouldtellmethemaxof(a+b+c)wherea,b,ccanmakeupatriangle,andineachtraingle,everyedgeyouchoo
JackyZhengX1990
·
2010-12-06 09:00
c
算法
input
UP
each
output
JOJ
2701 Party
2701:PartyResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE1s8192K11623StandardGo,go,go,it'spartytime!!!Agreatmanyofguestsareinvited.Guestsarenumberedfrom1toN.Tomakethepartymorejoyful,every3guests,whoar
JackyZhengX1990
·
2010-12-05 22:00
c
算法
input
each
Go
output
JOJ
1600 Big Mod
一直对那些ACM的神牛们从心底里有膜拜知情,总会对自己有些鄙视啊,好多数学方面的知识真的不是一般的匮乏,就唠叨到这里吧,1600:BigModResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K1725324StandardCalculate forlargevaluesofB,P,andMusinganefficientalgorithm.
JackyZhengX1990
·
2010-12-04 12:00
算法
测试
Integer
input
语言
output
图的着色问题
今天又重温了一道以前做过的ACM题目,
joj
1003,一道典型的图形着色问题。具体题目不列了。同学写的算法忽略了一种情况,但是我们两个找了很久才找到。
caols0621
·
2010-11-26 20:47
职场
ACM
休闲
图形着色
joj1003
图的着色问题
今天又重温了一道以前做过的ACM题目,
joj
1003,一道典型的图形着色问题。具体题目不列了。同学写的算法忽略了一种情况,但是我们两个找了很久才找到。
caols0621
·
2010-11-26 20:47
职场
休闲
joj1003
ACM之路
joj
2603 世界末日
2603:2012世界末日ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE10s65536K22786Standard 种种迹象表明,公元2012年为世界末日,而科学家们进一步预测,人类将被一种神秘的时空机器送到另一个宇宙,所以不要害怕,我们只是搬了个新家而已~ 每一次改变都是一种进步,这个新的世界并不像我们的地球,不再有南方北方(不倒翁已为
tonghu2010
·
2010-11-19 11:00
joj
1349 Oil Deposits
1349:OilDepositsResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE3s8192K533260StandardTheGeoSurvCompgeologicsurveycompanyisresponsiblefordetectingundergroundoildeposits.GeoSurvCompworkswithonelargerectan
tonghu2010
·
2010-11-18 12:00
File
input
character
each
output
plot
joj
2660: 河床 求最长区间满足条件(0<=max-min<=k) 单调队列
2660:河床ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE2s32768K36750Standard地理学家对一段河床进行测量分析。他们从上游到下游等距离的选择了n(#include#includeusingnamespacestd;constintmaxn=100005;intQ_max[maxn],I_max[maxn];intQ_min[ma
kongming_acm
·
2010-10-08 23:00
数据分析
input
output
JOJ
2656: 霍格瓦兹魔法阵 //最小割
2656:霍格瓦兹魔法阵ResultTIMELimitMEMORYLimitRunTimesACTimesJUDGE2s32768K8913Standard最近,伏地魔开始网罗党羽,许多女巫和男巫为了获得他赋予的力量加入了他的阵营。为了抵抗伏地魔的进攻,霍格瓦兹的魔法师们摆出了一个n*m方格的魔法方阵,每个方格中都站有一位魔法师。当然,魔法师们都有自己的魔法值,用非负整数表示。然而,对伏地魔发起攻
hqd_acm
·
2010-09-27 23:00
list
System
input
output
JOJ
2687
JOJ
2687刘备的连营话说关羽败走麦城,张飞急兄仇反被害后,刘备在夷陵连营七百余里以战孙权。但当马良将先主的布阵图交与诸葛亮后,孔明大怒,只呼喊:“汉室亡已”。
hqd_acm
·
2010-09-24 15:00
c
struct
String
input
character
each
JLU2686awake点兵题解动态规划DP
http://acm.jlu.edu.cn/
joj
/showproblem.php?
power721
·
2010-08-17 20:00
国内外著名或者非著名的OJ
JudgeOnline/ 浙大:http://acm.zju.edu.cn/ 同济:http://acm.tongji.edu.cn/ 吉林大学:http://acm.jlu.edu.cn/
joj
Brian Warehouse
·
2010-08-17 13:00
JOJ
分类 循序渐进200题(下篇 zz )
6,同余方程,不定方程,最大公约数,整除相关 不定方程: 1491 整除: 1716 1775 1926 2179 2513 1600 1716 1775 1874 1894(同余性质) 19267 ,进位制,数位处理 2236 2243 2252 22598,字符串处理 1490(可用map) 2098 1125 1877(map或二叉
ACM___________________________
·
2010-08-10 20:00
JOJ
分类 循序渐进200题(上篇 zz )
什么都不说了,先看看下面这两篇文章吧,希望您不再是过客《向ECUST-ACM队学习(转载,奋斗不是说说而已)》《就这样莫名其妙地爱上了ACM》 推荐一个Flash:《理想服务员》 热血沸腾了吧,那就开始吧,做梦的追随者!Level0(试试吧,电脑判题很神奇的):AC掉 1000(TheA+BProblem) 吧!(一二阶段,共49题,每天至少三题,由简到难)Level1(格式
ACM___________________________
·
2010-08-10 20:00
POJ
JOJ
RAILS 栈的应用
#include#includeinta[1000];usingnamespacestd;intmain(){ intn; while(scanf("%d",&n)!=EOF&&n) { intx,t; stackq; while(scanf("%d",&x)&&x) { a[1]=x; for(inti=2;in) printf
hqd_acm
·
2010-07-21 12:00
Rails
poj 2552
JOJ
2083 The Bottom of a Graph 图的强连通性
TheBottomofaGraphTimeLimit:3000MS MemoryLimit:65536KTotalSubmissions:3066 Accepted:1227DescriptionWewillusethefollowing(standard)definitionsfromgraphtheory.LetVbeanonemptyandfiniteset,itselementsbeing
hqd_acm
·
2010-07-19 16:00
JOJ
2319: Score List
大教训StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s16384K27344StandardStudent'sranklistissortedbytheiraveragescore.Giventhelistofnameandscore,youcanpointouteveryone'srank.
hqd_acm
·
2010-03-27 21:00
JOJ
2257
#include#includeintmain(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); intx,y,l1,l2; boolflag1,flag2; while(scanf("%d%d",&x,&y)!=EOF) { flag1=false;flag2=false; if((x%4==1&&y%4==
hqd_acm
·
2010-03-13 15:00
joj
2568: Think I will Buy Me a Football Team
FallingStocks.Bankruptedcompanies.BankswithnoCash.Seemslikethebesttimetoinvest:``ThinkI'llbuymeafootballteam!"Noseriously,IthinkIhavethesolutiontoatleasttheproblemofcashinbanks.Banksnowadaysareallowin
hqd_acm
·
2010-03-12 21:00
再探拓扑排序
JOJ
2237 Hero Ranklist
#include#includeintm,n;intmap[20][20],degree[20];chars[20],list[20];boolvisit[20];voiddfs(intdepth){ inti,j; if(depth>=m) { list[depth]=0; printf("%s/n",list); return; } for(i=1;i<=m;i++) if(degree
hqd_acm
·
2010-03-12 09:00
JOJ
1170: Wire Is So Expensive
最小生成树。StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K551233Standard1stJilinUniversityACMInternationalCollegiateProgrammingContestAssumeyouareworkingforACM(AndrewComm
hqd_acm
·
2010-03-12 08:00
struct
Integer
BI
input
each
Numbers
拓扑排序
JOJ
2237: Hero Ranklist
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout5s8192K228103StandardArthur想要将手下的战士按照能力进行排名,选择出得力的助手进行冒险.他收集了很多人之间比武的胜负情况,如A战胜了B,B战胜了C等。他发现,这些胜负关系之间彼此互不矛盾,也就是不能出现C又战胜了A这种情况
hqd_acm
·
2010-03-12 08:00
c
ini
input
output
JOJ
1534: Sticks(麻烦的剪枝)
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K942143StandardGeorgetooksticksofthesamelengthandcutthemrandomlyuntilallpartsbecameatmost50unitslong.Nowhewantstoretur
hqd_acm
·
2010-03-11 19:00
JOJ
2431: Shift and Increment
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout5s16384K1099158StandardShiftandincrementisthebasicoperationsoftheALU(ArithmeticLogicalUnit)inCPU.Onenumbercanbetransformtoany
hqd_acm
·
2010-03-11 10:00
JOJ
1185: Knight Moves
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout1s8192K562262StandardAfriendofyouisdoingresearchontheTravelingKnightProblem(TKP)whereyouaretofindtheshortestclosedtourofknig
hqd_acm
·
2010-03-11 09:00
c
String
File
input
each
JOJ
1198: Risk
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K322183StandardRiskisaboardgameinwhichseveralopposingplayersattempttoconquertheworld.Thegameboardconsistsofaworldmapbr
hqd_acm
·
2010-03-10 17:00
JOJ
2360: Trading Transaction
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout5s16384K73855StandardInChinesecurrencysystem,thebillscomein100,50,20,10,5,2and1denominations.Whenyoubuysomething,themoneyyoug
hqd_acm
·
2010-03-09 11:00
c
struct
360
each
output
Numbers
JOJ
1197: Sum It Up
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K484201StandardGivenaspecifiedtotaltandalistofnintegers,findalldistinctsumsusingnumbersfromthelistthatadduptot.Forexamp
hqd_acm
·
2010-03-09 10:00
list
Integer
input
each
output
Numbers
joj
1197: Sum It Up
StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K489203StandardGivenaspecifiedtotaltandalistofnintegers,findalldistinctsumsusingnumbersfromthelistthatadduptot.Forexam
hqd_acm
·
2010-03-09 08:00
list
Integer
UP
each
output
Numbers
JOJ
1182: Lotto
深度搜索,递归而已StatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout1s8192K531280StandardInaLottoIhaveeverplayed,onehastoselect6numbersfromtheset{1,2,...,49}.ApopularstrategytoplayLott
hqd_acm
·
2010-03-09 08:00
Integer
ini
input
each
output
Numbers
JOJ
2039: Fire Net III
2039:FireNetIIIStatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout1s10240K22963StandardSupposethatwehaveasquarecitywithstraightstreets.Amapofacityisasquareboardwithnrowsandncol
hqd_acm
·
2010-02-20 09:00
input
each
output
distance
Numbers
Forms
线性石子归并
JOJ
2521: Monkey and fruits
2521:MonkeyandfruitsStatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout3s8192K31250StandardAftercullinghismostfavoritefruitsfromthetreesinanorchard,KeenAS,amischievousmonkey,is
hqd_acm
·
2010-02-19 15:00
File
Integer
equals
input
each
output
JOJ
2035: Leaf Nodes
2035:LeafNodesStatusIn/OutTIMELimitMEMORYLimitSubmitTimesSolvedUsersJUDGETYPEstdin/stdout1s10240K224104StandardKateislearningaboutbinarytree.Shethinksheknoweverythingyouknowaboutbinarytrees.Wait,youdo
hqd_acm
·
2010-02-19 14:00
tree
Integer
input
each
output
traversal
分酒问题与
JOJ
1200 Jugs
JOJ
1200Jugs题目链接:http://acm.jlu.edu.cn/
joj
/showproblem.php?
jcwkyl
·
2009-08-03 14:00
Algorithm
分酒问题与
JOJ
1200 Jugs
JOJ
1200Jugs题目链接:http://acm.jlu.edu.cn/
joj
/showproblem.php?
jcwKyl
·
2009-08-03 14:00
c
算法
joj
1868 Blocks 无敌的枚举法
joj
1868Blocks无敌的枚举法第一次1.3秒,第二次0.1第三次,0.0秒#include voidfunc(inti) { intm,n,k,j; inttemp,vmax=4*i+2
I believe
·
2009-07-25 22:00
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
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
其他