欢迎来到PJCK的博客

摘要: 1005 继续(3n+1)猜想 (25 分) 卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对  阅读全文
posted @ 2019-03-23 17:38 PJCK 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o 阅读全文
posted @ 2019-03-23 09:43 PJCK 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Given a balanced parentheses string S, compute the score of the string based on the following rule: () has score 1 AB has score A + B, where A and B a 阅读全文
posted @ 2019-03-23 09:32 PJCK 阅读(79) 评论(0) 推荐(0) 编辑