Train Problem II Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Submit Status Description As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing…
Problem Description As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railway. Input The input contains…
这个就是卡特兰数的经典问题 直接用这个公式就好了,但是这个题涉及大数的处理h(n)=h(n-1)*(4*n-2)/(n+1) 其实见过好几次大数的处理了,有一次他存的恰好不多于30位,直接分成两部分long long 存了 这个只涉及到大数乘小数,大数除以小数,所以比较简单些 3551: Game of Connections Time Limit(Common/Java):1000MS/3000MS Memory Limit:65536KByteTotal Submit: 5 …
How Many Trees? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3397 Accepted Submission(s): 1964 Problem Description A binary search tree is a binary tree with root k such that any node v re…
Robot Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description There is a robot on the origin point of an axis.Every second, the robot can move right one unit length or do nothing.If the robot is on the…
Train Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasi…