摘要: 快速幂一种比较快速计算pow(a,b)的方法 其原理主要来自 so,根据这个我们就可以依次迭代计算pow(a,b) 还有符合结合律的都可以使用快速幂,比如快速乘法————使用加法,等等 至于取模因为取模在乘法中满足结合律 ,所以我们可以先取模再计算 题目https://www.luogu.org/p 阅读全文
posted @ 2019-08-12 14:13 流照君 阅读(242) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class Distance { private: int feet; // 0 到无穷 int inches; // 0 到 12 public: // 所需的构造函数 Distance(){ feet = 0; inches = 0; } Distance(int f, int i){ feet = f; inc 阅读全文
posted @ 2019-08-09 17:26 流照君 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a 阅读全文
posted @ 2019-08-09 08:45 流照君 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color 阅读全文
posted @ 2019-08-07 15:22 流照君 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "ins 阅读全文
posted @ 2019-08-07 11:58 流照君 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p​1​​​k​1​​​​×p​2​​​k​2​​​​×⋯×p​m​​​ 阅读全文
posted @ 2019-08-06 14:12 流照君 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minut 阅读全文
posted @ 2019-08-06 10:46 流照君 阅读(182) 评论(0) 推荐(0) 编辑
摘要: The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. 阅读全文
posted @ 2019-08-05 19:00 流照君 阅读(239) 评论(1) 推荐(0) 编辑
摘要: Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output t 阅读全文
posted @ 2019-08-04 20:02 流照君 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给一n \times nn×n的字母方阵,内可能蕴含多个“yizhong”单词。单词在方阵中是沿着同一方向连续摆放的。摆放可沿着 88 个方向的任一方向,同一单词摆放时不再改变方向,单词与单词之间可以交叉,因此有可能共用字母。输出时,将不是单词的字母用*代替,以突出显示单词。例如: 输入: 阅读全文
posted @ 2019-08-04 16:26 流照君 阅读(296) 评论(0) 推荐(1) 编辑