摘要: Description Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime i 阅读全文
posted @ 2018-07-16 13:26 霜雪千年 阅读(300) 评论(0) 推荐(0) 编辑
摘要: Description Professor Ibrahim has prepared the final homework for his algorithm’s class. He asked his students to implement the Posterization Image Fi 阅读全文
posted @ 2018-07-16 10:38 霜雪千年 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Desciption Consider a set of n points in a 2-D plane with integer coordinates. There are various ways of measuring distance between two points such as 阅读全文
posted @ 2018-07-16 07:58 霜雪千年 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Description Computing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Chal 阅读全文
posted @ 2018-07-16 07:52 霜雪千年 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Description In how many ways can you choose k elements out of n elements, not taking order into account? Write a program to compute this number. Input 阅读全文
posted @ 2018-07-16 07:48 霜雪千年 阅读(355) 评论(0) 推荐(0) 编辑
摘要: Description There are N kangaroos going out to eat at an Indian restaurant. The ith kangaroo wants to eat exactly xi food. The kangaroos all want to o 阅读全文
posted @ 2018-07-16 07:38 霜雪千年 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Description An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from small 阅读全文
posted @ 2018-07-16 01:10 霜雪千年 阅读(293) 评论(0) 推荐(0) 编辑