码迷,mamicode.com
首页 >  
搜索关键字:prime    ( 2475个结果
USACO 6.4 The Primes
In the square below, each row, each column and the two diagonals can be read as a five digit prime number. The rows are read from left to right. The c ...
分类:其他好文   时间:2017-05-29 19:53:29    阅读次数:197
BNU 25593 Prime Time 记忆化dp
题目链接:点击打开链接 题意: 一个游戏由3个人轮流玩 每局游戏由当中一名玩家选择一个数字作为開始 目的:获得最小的得分 对于当前玩家 O 。面对 u 这个数字 则他的操作有: 1、 计分 u +1 ,然后 u++; 2、计分 u / x, 然后 u /= x; 当中x为u的因子且x为素数 然后下一 ...
分类:其他好文   时间:2017-05-29 14:10:26    阅读次数:171
UVA 11762 - Race to 1(概率)
UVA 11762 - Race to 1 题意:给定一个n,每次随即选择一个n以内的质数,假设不是质因子,就保持不变,假设是的话。就把n除掉该因子,问n变成1的次数的期望值 思路:tot为总的质数。cnt为质因子个数,那么f(n)=(1?cnt/tot)?f(n)+∑f(n/prime)?(1/t ...
分类:其他好文   时间:2017-05-28 13:01:44    阅读次数:206
如何高效利用你所“劫持”的HTTP会话?
HTTP会话劫持 HTTP是无状态的协议,为了维持和跟踪用户的状态,引入了Cookie和Session,但都是基于客户端发送cookie来对用户身份进行识别,所以说拿到了cookie,就可以获得victim的登录状态,也就达到了会话劫持的效果。 如何拿到cookie xss xss有很多的姿势可以拿 ...
分类:Web程序   时间:2017-05-28 13:00:05    阅读次数:673
Python数组使用
python数组的使用 2010-07-28 17:17 1、Python的数组分三种类型: (1) list 普通的链表,初始化后可以通过特定方法动态增加元素。 定义方式:arr = [元素] (2) Tuple 固定的数组,一旦定义后,其元素个数是不能再改变的。 定义方式:arr = (元素) ...
分类:编程语言   时间:2017-05-27 15:22:01    阅读次数:146
数论(同余+hash)
Time Limit:3000MS Memory Limit:65536KB Description You are given a sequence a[0]a[1] ... a[N-1] of digits and a prime number Q. For each i<=j with a[i ...
分类:其他好文   时间:2017-05-25 10:13:01    阅读次数:151
POJ 3126 Prime Path SPFA
http://poj.org/problem?id=3126 题目大意: 给你两个四位的素数s和t,要求每次改变一个数字。使得改变后的数字也为素数,求s变化到t的最少变化次数。 思路: 首先求出全部4位素数。 对于两个素数之间,假设仅仅相差一个数字,那么就建立图。(双向) 最后求最短路就可以(能够S ...
分类:其他好文   时间:2017-05-23 14:14:36    阅读次数:169
Introduction to Mathematical Thinking - Week 3
there exists and all there exists 证明根号2是无理数 all 习题 3. Which of the following formal propositions says that there is no largest prime. (There may be mo ...
分类:其他好文   时间:2017-05-21 14:54:56    阅读次数:220
[leetcode-204-Count Primes]
Description:Count the number of prime numbers less than a non-negative number, n. 思路: 参考http://www.cnblogs.com/TonyYPZhang/p/5138018.html给出的方案以及wiki的方 ...
分类:其他好文   时间:2017-05-21 01:06:32    阅读次数:218
[leetcode-263-Ugly Number]
Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exam ...
分类:其他好文   时间:2017-05-20 01:04:54    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!