码迷,mamicode.com
首页 >  
搜索关键字:ikkis problem    ( 37569个结果
006:欧拉项目平方和与和的平方的差
Sum square difference Problem 6 The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ....
分类:其他好文   时间:2014-05-23 02:22:57    阅读次数:193
hdu 2576 Another Sum Problem
数学推导题,f(n)=n*(n+1)*(n+2)/6 推导思路如下: #include"cstdio" #include"cstring" #include"cmath" #include"cstdlib" #include"iostream" #include"algorithm" #include"queue" using namespace std; int main()...
分类:其他好文   时间:2014-05-23 02:13:15    阅读次数:269
欧拉项目005:最小公倍数
Smallest multiple Problem 5 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly di...
分类:其他好文   时间:2014-05-23 01:51:13    阅读次数:261
HDU 1048 What Is Your Grade? (简单模拟)
What Is Your Grade? Problem Description “Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must care about your...
分类:其他好文   时间:2014-05-23 00:59:22    阅读次数:375
002. 斐波那契数列中的偶数
Problem 2: Even Fibonacci numbers Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:             1, 2,...
分类:其他好文   时间:2014-05-22 23:29:44    阅读次数:435
poj 3261 后缀数组 找重复出现k次的子串(子串可以重叠)
题目:http://poj.org/problem?id=3261 仍然是后缀数组的典型应用----后缀数组+lcp+二分 做的蛮顺的,1A 但是大部分时间是在调试代码,因为模板的全局变量用混了,而自己又忘了,,,等西安邀请赛还有四省赛结束之后,该冷静反思下尝试拜托模板了 错误   :1、k用错,题目的k和模板的k用混; 2、还是二分的C()函数,这个其实跟前一篇《poj 1...
分类:其他好文   时间:2014-05-22 23:14:51    阅读次数:361
欧拉项目004:寻找最大的回文数
Problem 4: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest pal...
分类:其他好文   时间:2014-05-22 18:48:46    阅读次数:355
欧拉计划003. 最大素因子
Problem 3: Largest prime factor The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? 求出最大素因子 我的python代码如下: 又不懂的,或者更好的可以留言,大家互相...
分类:其他好文   时间:2014-05-22 18:40:17    阅读次数:198
HDU1251统计难题(字典树)
题目: Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).   Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统...
分类:其他好文   时间:2014-05-22 17:31:06    阅读次数:307
poj 1226 hdu 1238 Substrings 求若干字符串正串及反串的最长公共子串 2002亚洲赛天津预选题
题目:http://poj.org/problem?id=1226 http://acm.hdu.edu.cn/showproblem.php?pid=1238 其实用hash+lcp可能也可以,甚至可能写起来更快,不过我没试,我最近在练习后缀数组,所以来练手 后缀数组的典型用法之一----------------后缀数组+lcp+二分 思路:1、首先将所有的字符串每读...
分类:其他好文   时间:2014-05-22 17:14:08    阅读次数:289
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!