码迷,mamicode.com
首页 >  
搜索关键字:acmcoder    ( 28个结果
hdu 2594 Simpsons’ Hidden Talents 【KMP】
题目链接:http://acm.acmcoder.com/showproblem.php?pid=2594题意:求最长的串 同时是s1的前缀又是s2的后缀。输出子串和长度。思路:kmp代码:#include #include #include #include #include #include...
分类:其他好文   时间:2015-06-05 19:53:15    阅读次数:152
hdu 1025 Constructing Roads In JGShining’s Kingdom 【dp+二分】
题目链接:http://acm.acmcoder.com/showproblem.php?pid=1025题意:本求最长公共子序列,但数据太多。转化为求最长不下降子序列。太NB了。复杂度n*log(n).解法:dp+二分代码:#include #include #include #include #include...
分类:其他好文   时间:2015-06-05 17:31:32    阅读次数:116
[ACMcoder] Max Sum
Problem Description Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 =...
分类:其他好文   时间:2015-05-26 21:32:01    阅读次数:114
[ACMcoder] Number Sequence
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). Input The i...
分类:其他好文   时间:2015-05-26 21:31:08    阅读次数:131
[ACMcoder] A + B Problem II
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1 Output F...
分类:其他好文   时间:2015-05-26 18:47:18    阅读次数:148
ACM成长之路
PS: 开始ACM的受虐!site:http://acm.acmcoder.com/listproblem.php一、1000import java.util.Scanner;public class Main { public static void main(String args[]) { ....
分类:其他好文   时间:2015-05-13 21:22:06    阅读次数:165
ACMcoder[p1005]
题目:A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the ...
分类:其他好文   时间:2015-05-04 13:35:13    阅读次数:111
hdu 1513 Invitation Cards【spfa翻转边】
题目链接:http://acm.acmcoder.com/showproblem.php?pid=1535题意:有向图,求源点到各个点最短路径和+各个点到源点最短路径和。spfa求单源最短路径,求各个点到源点最短路径翻转边。#include #include #include #include #include...
分类:其他好文   时间:2015-04-18 16:13:50    阅读次数:160
28条   上一页 1 2 3
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!