码迷,mamicode.com
首页 >  
搜索关键字:oj    ( 4253个结果
九度OJ—题目1527:首尾相连数组的最大子数组和
题目描述: 给定一个由N个整数元素组成的数组arr,数组中有正数也有负数,这个数组不是一般的数组,其首尾是相连的。数组中一个或多个连续元素可以组成一个子数组,其中存在这样的子数组arr[i],…arr[n-1],arr[0],…,arr[j],现在请你这个ACM_Lover用一个最高效的方法帮忙找出所有连续子数组和的最大值(如果数组中的元素全部为负数,则最大和为0,即一个也没有选)。 输...
分类:编程语言   时间:2014-12-18 17:04:25    阅读次数:197
Prime Path (swust oj 0002)
先占个坑。。。 Description:http://acm.swust.edu.cn/problem/0002/
分类:其他好文   时间:2014-12-18 15:05:46    阅读次数:90
A+B Problem(swust oj 0020)
Description:http://acm.swust.edu.cn/problem/0020/AC源代码:#include int main(){int a,b;scanf("%d%d",&a,&b);if (a>=0&&a=0&&b<=10)printf("%d\n",a+b);return ...
分类:其他好文   时间:2014-12-18 14:59:19    阅读次数:170
A + B(swust oj 0015)
Description:http://acm.swust.edu.cn/problem/0015/AC代码:#include int main(){ int m,n;scanf("%d%d",&m,&n); printf("%d\n",m+n);return 0;}
分类:其他好文   时间:2014-12-18 14:56:46    阅读次数:124
HDU 3788 和九度OJ 1006测试数据不一样
ZOJ问题 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2935    Accepted Submission(s): 889 Problem Description 对给定的字符串(只包含'z','o','j...
分类:其他好文   时间:2014-12-18 01:44:32    阅读次数:223
九度OJ 1042 Coincidence (动态规划求最长公共子序列)
题目1042:Coincidence 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:1689 解决:898 题目描述: Find a longest common subsequence of two strings. 输入: First and second line of each input case co...
分类:其他好文   时间:2014-12-18 01:42:32    阅读次数:162
【Leetcode】:Min Stack
题目链接:https://oj.leetcode.com/problems/min-stack/ Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack.pop(...
分类:其他好文   时间:2014-12-17 16:28:46    阅读次数:181
swust oj 方程式(0300)
DescriptionConsider equations having the following form: a*x1*x1 + b*x2*x2 + c*x3*x3 + d*x4*x4 = 0 a, b, c, d are integers from the interval [-50,50] ...
分类:其他好文   时间:2014-12-17 12:27:56    阅读次数:175
九度OJ 1177 查找 (模拟)
题目1177:查找 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5659 解决:1667 题目描述:     读入一组字符串(待操作的),再读入一个int n记录记下来有几条命令,总共有2中命令:1、翻转  从下标为i的字符开始到i+len-1之间的字符串倒序;2、替换  命中如果第一位为1,用命令的第四位开始到最后的字符串替...
分类:其他好文   时间:2014-12-17 09:08:14    阅读次数:188
九度OJ 1179 阶乘(模拟)
题目1179:阶乘 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4526 解决:1315 题目描述: 输入n, 求y1=1!+3!+...m!(m是小于等于n的最大奇数) y2=2!+4!+...p!(p是小于等于n的最大偶数)。 输入: 每组输入包括1个整数:n 输出: 可能有多组测试数据...
分类:其他好文   时间:2014-12-17 09:07:46    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!