随笔分类 -  数学题

摘要:前几天做腾讯的在线笔试题遇到一道卡特兰数的题目,想了好久才想起来怎么做。再仔细想想自己好像从来没有系统地学习过卡特兰数,于是就专门去研究了一下。 一、关于卡特兰数 卡特兰数是一种经典的组合数,经常出现在各种计算中,其前几项为 : 1, 2, 5, 14, 42, 132, 429, 1... 阅读全文
posted @ 2015-04-11 12:09 一个大叔 阅读(10561) 评论(3) 推荐(4) 编辑
摘要:102. Coprimestime limit per test: 0.25 sec.memory limit per test: 4096 KBFor given integer N (1<=N<=104) find amount of positive numbers not greater t... 阅读全文
posted @ 2015-03-26 14:49 一个大叔 阅读(106) 评论(0) 推荐(0) 编辑
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:48916Accepted:18476DescriptionThe Joseph's problem is notoriously known. For those who are not f... 阅读全文
posted @ 2015-02-01 23:09 一个大叔 阅读(295) 评论(0) 推荐(0) 编辑
摘要:DescriptionGiven the value of N, you will have to find the value of G. The meaning of G is given in the following codeG=0; for(i=1;i&ltN;i++) for(j... 阅读全文
posted @ 2014-09-09 16:58 一个大叔 阅读(212) 评论(0) 推荐(0) 编辑
摘要:DartsTime Limit:1000MSMemory Limit:65536KTotal Submissions:58Accepted:32Special JudgeDescriptionAfter a long week of work at the ICPC Headquarters, Bi... 阅读全文
posted @ 2014-08-24 00:17 一个大叔 阅读(291) 评论(0) 推荐(0) 编辑
摘要:DescriptionYou have an arraya[1], a[2], ..., a[n], containing distinct integers from1ton. Your task is to sort this array in increasing order with the... 阅读全文
posted @ 2014-07-26 12:30 一个大叔 阅读(410) 评论(0) 推荐(0) 编辑
摘要:DescriptionYYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficult... 阅读全文
posted @ 2014-05-25 12:44 一个大叔 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionIn your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all t... 阅读全文
posted @ 2014-05-25 12:36 一个大叔 阅读(140) 评论(0) 推荐(0) 编辑
摘要:It's Saturday today, what day is it after 11+ 22+ 33+ ... +NNdays?InputThere are multiple test cases. The first line of input contains an integerTindi... 阅读全文
posted @ 2014-05-18 14:12 一个大叔 阅读(416) 评论(0) 推荐(0) 编辑