![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
华为oj
huakaiba
这个作者很懒,什么都没留下…
展开
-
he
思路:其实就是利用动态规划从左向右求一个最大长度递增的子序列,再从右向左求一个最大长度递增的子序列。这样合起来就是先增后减的了。代码如下:import java.util.Arrays;import java.util.Scanner;public class HeChang { public static void main(String[] args) { Scanner sc原创 2015-08-14 19:02:46 · 377 阅读 · 0 评论 -
NoRepeatInteger
import java.util.*;public class NoRepeatInteger { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.nextLine(); str= str.trim(); String result =原创 2015-08-17 23:35:33 · 406 阅读 · 0 评论 -
最高分数记录
#include#include#include#include#include#define MaxNum 30010using namespace std;int num[MaxNum];int max(int a, int b) { return a > b ? a : b; }struct SegmentreeNodeTree{ int left; int righ转载 2015-08-17 23:32:59 · 351 阅读 · 0 评论 -
DNASequence
import java.util.*;public class DNASequence {public static void main(String[] args) {Scanner s = new Scanner(System.in);String str = s.nextLine();int len = s.nextInt();St原创 2015-08-17 23:28:24 · 659 阅读 · 0 评论 -
合唱队
import java.util.Arrays;import java.util.Scanner;public class HeChang { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String num = scan.nextLine(); int n原创 2015-08-17 23:31:24 · 1104 阅读 · 0 评论 -
约瑟夫环
import java.util.*;public class YueSeFu { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.nextLine(); String[] ss = str.split(","); int n = Int原创 2015-08-17 23:43:35 · 322 阅读 · 0 评论 -
StringMatch
import java.util.Arrays;import java.util.Scanner;public class StringMatch { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str1 = s.next(); String str2原创 2015-08-17 23:42:57 · 490 阅读 · 0 评论 -
重建二叉树
package huaWei03;import java.util.*;public class Main { static List list = null; public static void main(String[] args) { Main build=new Main(); Scanner in = new Scanner(System.in); while原创 2015-08-17 23:40:34 · 412 阅读 · 0 评论 -
Poker大小
import java.util.Scanner;public class Poker { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String inputStr=sc.nextLine(); String[] str=inputStr.split("-");原创 2015-08-17 23:39:05 · 673 阅读 · 0 评论 -
最大漂亮度
import java.util.*;public class NamePrettyDegree { public static void main(String[] args) { ArrayList listRes = new ArrayList(); Scanner scan = new Scanner(System.in); int num = scan.nextInt原创 2015-08-17 23:35:01 · 385 阅读 · 0 评论 -
ErrorRecord
代码如下:import java.util.HashMap;import java.util.LinkedHashMap;import java.util.Scanner;public class ErrorRecord { public static void main(String[] args) { LinkedHashMap map = new LinkedHa原创 2015-08-17 23:30:01 · 559 阅读 · 0 评论 -
CountCharNum
代码如下:import java.util.*;public class CountCharNum { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); String c = scan.nextLin原创 2015-08-17 23:26:53 · 518 阅读 · 0 评论 -
Average
代码如下:import java.util.*;public class Average { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.nextLine(); str = str.replace('0', ' '); str =原创 2015-08-17 23:25:40 · 524 阅读 · 0 评论 -
最长公共子串(连续)
题目标题:计算两个字符串的最大公共字串的长度,字符不区分大小写代码如下:import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String str = s.nextLine(原创 2015-08-12 17:29:42 · 284 阅读 · 0 评论