摘要: 如何优化幂运算:通过递归优化幂运算:快速幂运算的代码:#includeint mi(int a, int b){ int c; if(b == 1) { return a; } c = mi(a, b / 2); if(b % 2 == 0) { ... 阅读全文
posted @ 2018-03-22 22:00 moonlight987 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Integer ApproximationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5801 Accepted... 阅读全文
posted @ 2018-03-21 23:21 moonlight987 阅读(274) 评论(0) 推荐(0) 编辑
摘要: BabelfishTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 47332 Accep... 阅读全文
posted @ 2018-03-21 18:04 moonlight987 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 问题 : 方阵旋转时间限制: 1 Sec 内存限制: 128 MB提交: 30 解决: 12[提交][状态]题目描述 对一个方阵转置,就是把原来的行号变列号,原来的列号变行号。 但,如果是对该方阵顺时针旋转(不是转置)。 下面的代码实现的功... 阅读全文
posted @ 2018-03-19 13:31 moonlight987 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Anagrams by StackTime Limit: 2 Seconds Memory Limit: 65536 KB ... 阅读全文
posted @ 2018-03-15 21:10 moonlight987 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Word ReversalTime Limit: 2 Seconds Memory Limit: 65536 KB For each list of words, output a line with each word reversed w... 阅读全文
posted @ 2018-02-03 19:46 moonlight987 阅读(117) 评论(0) 推荐(0) 编辑
摘要: There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in... 阅读全文
posted @ 2018-01-31 20:43 moonlight987 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem J - Red and Black题目来源:https://vjudge.net/contest/207868#problem/Jproblem description:There is a rectangular room,cover... 阅读全文
posted @ 2018-01-23 17:33 moonlight987 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Problem F- Knight Moves题目来源:https://vjudge.net/contest/207868#problem/FProblem description:题意概括:中国象棋中的‘马’走日字格,从一个点到另一个点最短需要多少步... 阅读全文
posted @ 2018-01-23 17:27 moonlight987 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem C - Oil Deposits题目来源:https://vjudge.net/contest/207868#problem/CProblem description: TheGeoSurvComp geologic survey co... 阅读全文
posted @ 2018-01-23 17:19 moonlight987 阅读(171) 评论(0) 推荐(0) 编辑