随笔分类 - OJ
摘要:1063. Set SimilarityGiven two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of dist...
阅读全文
摘要:1060. Are They Equal If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since t...
阅读全文
摘要:1059. Prime Factors Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…
阅读全文
摘要:1058. A+B in HogwartsIf you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid expl...
阅读全文
摘要:1057. StackStack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basi...
阅读全文
摘要:1056. Mice and RiceMice and Rice is the name of a programming contest in which each programmer must write a piece of code to control t...
阅读全文
摘要:1080. Graduate AdmissionIt is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zh...
阅读全文
摘要:1079. Total Sales of SupplyA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in...
阅读全文
摘要:1078. HashingThe task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the pos...
阅读全文
摘要:1018. Public Bike Management There is a public bike service in Hangzhou City which provides great convenience to the tourists from all...
阅读全文
摘要:#include #define MAX 27void dfs(int i, int j);int dx[8] = {-1, 1, -2, 2, -2, 2, -1, 1};int dy[8] = {-2, -2, -1, -1, 1, 1, 2, 2};int ma...
阅读全文
摘要:#include #include #define PI 3.1415926int get_year(double x, double y);int main(void) { int n; int i = 0; double x, y; ...
阅读全文