上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 45 下一页
摘要: #include #include #include #include #include #include using namespace std; //**************************************************************** // Miller_Rabin 算法进行素数测试 //速度快,而且可以判断 =c)a%=c; ... 阅读全文
posted @ 2018-04-29 16:13 楼主好菜啊 阅读(186) 评论(0) 推荐(0) 编辑
摘要: XOR is a kind of bit operator, we define that as follow: for two binary base number A and B, let C=A XOR B, then for each bit of C, we can get its val 阅读全文
posted @ 2018-04-29 15:17 楼主好菜啊 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 推荐博客 : https://www.cnblogs.com/vb4896/p/6149022.html https://blog.csdn.net/qaq__qaq/article/details/53812883 这个我觉得不是很好理解,花了一天半得时间,稍微懂了一点,写个博客 首先我们要明确这 阅读全文
posted @ 2018-04-27 21:00 楼主好菜啊 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 给一个1-base数组{a},有N次操作,每次操作会使一个位置无效。一个区间的权值定义为这个区间里选出一些数的异或和的最大值。求在每次操作前,所有不包含无效位置的区间的权值的最大值。 给一个1-base数组{a},有N次操作,每次操作会使一个位置无效。一个区间的权值定义为这个区间里选出一些数的异或和 阅读全文
posted @ 2018-04-27 20:17 楼主好菜啊 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 欧拉公式的表述是这样的 V+F-E = 2, V 表示点的数量, F表示面的数量, E表示边的数量 一道新疆区域赛的题, 凉... Farmer John owns a farm. He first builds a circle fence. Then, he will choose n poin 阅读全文
posted @ 2018-04-26 15:21 楼主好菜啊 阅读(1792) 评论(0) 推荐(0) 编辑
摘要: The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the 阅读全文
posted @ 2018-04-25 15:17 楼主好菜啊 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 推荐博客 : https://blog.csdn.net/qq_26525215/article/details/51453493 https://blog.csdn.net/doc_sgl/article/details/8880468 http://www.jb51.net/article/37 阅读全文
posted @ 2018-04-24 21:50 楼主好菜啊 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题意: 给出两个6行5列的字母矩阵,一个密码满足:密码的第i个字母在两个字母矩阵的第i列均出现。 然后找出字典序为k的密码,如果不存在输出NO 思路分析 : 暴力枚举就可以,但是有两个细节,每一列的字母必须是同时出现在两个表中的,并且要保证相同的字母出现多次均按照一次计算 代码示例 : 阅读全文
posted @ 2018-04-24 17:54 楼主好菜啊 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 推荐博客 :https://www.cnblogs.com/handsomecui/p/4755455.html 在很早前就听过欧拉函数,不过一直没有去看,最近在补数论的时候,学一下它 根据约数定理,我们很容易求出来一个数约数的个数 欧拉函数的定义是这样的, 小于 n 且与 n 互素的正整数(包括1 阅读全文
posted @ 2018-04-24 16:23 楼主好菜啊 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 给定n个数a1,a2····an,依次求出相邻两个数值和,将得到一个新数列,重复上述操作,最后结果将变为一个数,问这个数除以m的余数与那些数无关?例如n=3,m=2时,第一次得到a1+a2,a2+a3,在求和得到a1+2*a2+a3,它除以2的余数和a2无关。1=<n<=10^5, 2=<m<=10 阅读全文
posted @ 2018-04-24 13:50 楼主好菜啊 阅读(575) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 45 下一页