摘要:Integer PartitionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22Accepted Submission(s): 15Problem DescriptionGiven n, k, calculate the number of different (unordered) partitions of n such that no part is repeated k or more times. InputFirst line
阅读全文
摘要:Who's Aunt ZhangTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19Accepted Submission(s): 16Problem DescriptionAunt Zhang, well known as 张阿姨, is a fan of Rubik’s cube. One day she buys a new one and would like to color it as a gift to send to T
阅读全文
摘要:Magic BraceletTime Limit:2000MSMemory Limit:131072KTotal Submissions:3731Accepted:1227DescriptionGinny’s birthday is coming soon. Harry Potter is preparing a birthday present for his new girlfriend. The present is a magic bracelet which consists ofnmagic beads. The aremkinds of different magic beads
阅读全文
摘要:本原串Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 408Accepted Submission(s): 129Problem Description由0和1组成的串中,不能表示为由几个相同的较小的串连接成的串,称为本原串,有多少个长为n(n<=100000000)的本原串?答案mod2008.例如,100100不是本原串,因为他是由两个100组成,而1101是本原串。Input输入包括多个数据,每个数据一行,包括一个整数n,代表串的长
阅读全文
摘要:Gao the GridTime Limit: 2 Seconds Memory Limit: 65536 KBA n * m grid as follow:Count the number of triangles, three of whose vertice must be grid-points.Note that the three vertice of the triangle must not be in a line(the right picture is not a triangle). InputThe input consists of several cases...
阅读全文
摘要:Round NumbersTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6051Accepted: 2050DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other name
阅读全文
摘要:选课时间(题目已修改,注意读题)Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1516Accepted Submission(s): 1253Problem Description又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合。你来帮帮他吧。(xhd认为一样学分的课没区别)Input输入数据的第一行是一个数据T,表示有T组数据。每组数据的第一行是两个整数n(1 <= n <= 40
阅读全文