上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: 题目描述: This time, you are supposed to find A+B where A and B are two matrices, and then count the number of zero rows and columns.输入: The input consist... 阅读全文
posted @ 2015-04-11 18:00 打小孩 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目描述:求整数a,b的和。输入:测试案例有多行,每行为a,b的值。输出:输出多行,对应a+b的结果。样例输入:1 24 56 9样例输出:3915做这题只是想看一下输入是否会符合提交的格式; 1 import java.util.Scanner; 2 3 public class Main{ ... 阅读全文
posted @ 2015-04-11 17:44 打小孩 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 堆栈是一种基本的数据结构。堆栈具有两种基本操作方式,push 和 pop。Push一个值会将其压入栈顶,而 pop 则会将栈顶的值弹出。现在我们就来验证一下堆栈的使用。输入: 对于每组测试数据,第一行是一个正整数 n,0 st=new Stack();11 Str... 阅读全文
posted @ 2015-04-11 17:36 打小孩 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 题目描述:读入两个小于10000的正整数A和B,计算A+B。需要注意的是:如果A和B的末尾K(不超过8)位数字相同,请直接输出-1。输入:测试输入包含若干测试用例,每个测试用例占一行,格式为"A B K",相邻两数字有一个空格间隔。当A和B同时为0时输入结束,相应的结果不要输出。输出:对每个测试用例... 阅读全文
posted @ 2015-04-09 21:45 打小孩 阅读(255) 评论(0) 推荐(0) 编辑
摘要: The string you will received as a parameter has too many characters. Your job is to remove characters from the string in the following order: 1. Find... 阅读全文
posted @ 2015-04-09 19:35 打小孩 阅读(939) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan... 阅读全文
posted @ 2015-04-08 23:07 打小孩 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2015-04-08 22:14 打小孩 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists: A: ... 阅读全文
posted @ 2015-04-08 21:34 打小孩 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 v2[i])16 return 1;17 else... 阅读全文
posted @ 2015-04-08 20:51 打小孩 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the ... 阅读全文
posted @ 2015-04-08 20:05 打小孩 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页