随笔分类 - 数学题
摘要:前几天做腾讯的在线笔试题遇到一道卡特兰数的题目,想了好久才想起来怎么做。再仔细想想自己好像从来没有系统地学习过卡特兰数,于是就专门去研究了一下。 一、关于卡特兰数 卡特兰数是一种经典的组合数,经常出现在各种计算中,其前几项为 : 1, 2, 5, 14, 42, 132, 429, 1...
阅读全文
摘要: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...
阅读全文
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:48916Accepted:18476DescriptionThe Joseph's problem is notoriously known. For those who are not f...
阅读全文
摘要: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<N;i++) for(j...
阅读全文
摘要:DartsTime Limit:1000MSMemory Limit:65536KTotal Submissions:58Accepted:32Special JudgeDescriptionAfter a long week of work at the ICPC Headquarters, Bi...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文