PAT甲级
Zaaztt
这个作者很懒,什么都没留下…
展开
-
PAT A 1101 JAVA
import java.util.*;public class PAT1101 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; for (int i = 0; i < N; i++) { a[i] = sc原创 2021-03-14 19:16:45 · 131 阅读 · 1 评论 -
PAT A 1100 JAVA
import java.util.HashSet;import java.util.Scanner;import java.util.Set;public class PAT1100 { static Set<String> set = new HashSet<>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); in原创 2021-03-14 19:16:11 · 119 阅读 · 0 评论 -
PAT A 1099 JAVA
import sun.reflect.generics.tree.Tree;import java.util.*;public class PAT1099 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Map<Integer, TreeNode> map = new Hash原创 2021-03-14 19:12:26 · 114 阅读 · 0 评论 -
PAT A 1098 JAVA
import java.util.ArrayList;import java.util.Arrays;import java.util.List;import java.util.Scanner;public class PAT1098 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); i原创 2021-03-14 19:11:33 · 99 阅读 · 0 评论 -
PAT A 1097 JAVA
import java.util.*;public class PAT1097 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int start_addr = sc.nextInt(); int N = sc.nextInt(); int[] test = new int[10001]; Map<原创 2021-03-14 19:07:30 · 78 阅读 · 0 评论 -
PAT A 1096 JAVA
import java.util.Scanner;public class PAT1096 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int sum = 0; int temp = 1; int max_start = 0; int max原创 2021-03-14 19:06:17 · 101 阅读 · 0 评论 -
PAT A 1095
import java.util.*;public class PAT1095 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); Map<String, Car> map = new HashMap<>();原创 2021-03-14 19:05:42 · 108 阅读 · 0 评论 -
PAT A 1094 JAVA
import java.util.*;public class PAT1094 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); Map<Integer, TreeNode> map = new HashMap<>原创 2021-03-14 19:05:12 · 91 阅读 · 0 评论 -
PAT1093 JAVA
import java.util.Scanner;public class PAT1093 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int len = s.length(); int[] right_T = new int[len]; int[] lef原创 2021-03-14 19:04:26 · 133 阅读 · 0 评论 -
PAT1092 JAVA
import java.util.Scanner;public class PAT1092 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String ori = sc.next(); String want = sc.next(); int[] oris = new int[128]; int[] w原创 2020-12-03 19:39:19 · 94 阅读 · 0 评论 -
PAT1091 JAVA
import java.util.Scanner;public class PAT1091 { static boolean[][][] visited; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int M = sc.nextInt(); // row int N = sc.nextInt(); // col原创 2020-12-03 19:37:08 · 91 阅读 · 0 评论 -
PAT1090 JAVA
import java.util.*;public class PAT1090 { static int count = 0; static int max_level = 0; static Map<Integer, Retailer> map; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int N = sc.n原创 2020-12-03 19:35:05 · 107 阅读 · 0 评论 -
PAT1089 JAVA
import java.util.Arrays;import java.util.Collections;import java.util.List;import java.util.Scanner;public class PAT1089 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt();原创 2020-12-03 19:34:32 · 75 阅读 · 0 评论 -
PAT1088 JAVA
import java.util.ArrayList;import java.util.List;import java.util.Scanner;public class PAT1088 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); Num[] nums = new Num[2]; for (int i = 0; i <原创 2020-12-03 19:33:25 · 75 阅读 · 0 评论 -
PAT1087 JAVA
import java.util.*;public class PAT1087 { static HashMap<String, City> map; public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] line1 = sc.nextLine().split(" "); int N = Integer.val原创 2020-12-03 19:32:51 · 109 阅读 · 0 评论 -
PAT1086 JAVA
import java.util.ArrayList;import java.util.List;import java.util.Scanner;import java.util.Stack;public class PAT1086 { static List<Integer> preorder; static List<Integer> inorder; static StringBuilder strb = new StringBuilder.原创 2020-12-03 19:32:16 · 108 阅读 · 0 评论 -
PAT1085 JAVA
import java.util.Arrays;import java.util.Scanner;public class PAT1085_2 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int p = sc.nextInt(); int[] a = new int[N]原创 2020-12-03 19:30:44 · 79 阅读 · 0 评论 -
PAT1084 JAVA
import java.util.HashSet;import java.util.Scanner;public class PAT1084 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String line1 = sc.next(); String line2 = sc.next(); char[] c1 = l原创 2020-12-03 19:29:44 · 96 阅读 · 0 评论 -
PAT1083 JAVA
import java.io.IOException;import java.util.*;public class PAT1083 { public static void main (String[] args) throws IOException { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Student[] students = new Student[N];原创 2020-12-03 19:28:59 · 75 阅读 · 0 评论 -
PAT1082 JAVA
import java.util.Scanner;public class PAT1082 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); if (s.charAt(0) == '-') { System.out.print("Fu "); s =原创 2020-12-03 19:28:10 · 59 阅读 · 0 评论 -
PAT1081 JAVA
import java.util.Arrays;import java.util.Scanner;public class PAT1081 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Num[] nums = new Num[N]; for (int i = 0; i &原创 2020-12-03 19:27:15 · 76 阅读 · 0 评论 -
PAT1080 JAVA
import jdk.nashorn.internal.ir.BaseNode;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class PAT1080 { public static void main (String[] args) throws IOException { Buff原创 2020-12-03 19:26:41 · 159 阅读 · 0 评论 -
PAT1079 JAVA
import java.io.IOException;import java.util.*;public class PAT1079_2 { static Map<Integer, Node> map = new HashMap<>(); static double unit_price; static double r; public static void main (String[] args) throws IOException {原创 2020-12-03 19:25:10 · 104 阅读 · 0 评论 -
PAT1078 JAVA
import java.util.Arrays;import java.util.Scanner;public class PAT1078 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int MSize = sc.nextInt(); int N = sc.nextInt(); while (!isPrime(MS原创 2020-12-03 19:24:31 · 88 阅读 · 0 评论 -
PAT1077 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.StringReader;import java.util.HashMap;import java.util.Map;public class PAT1077 { public static void main (String[] args) throws IOException原创 2020-12-03 18:38:13 · 81 阅读 · 0 评论 -
PAT1075 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.Comparator;public class PAT1075 { public static void main (String[] args) throws IOException { BufferedRead原创 2020-12-03 18:37:34 · 94 阅读 · 0 评论 -
PAT1074 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.HashMap;public class PAT1074 { static HashMap<Integer, Node> map; public static void main (String[] args) throws IOException {原创 2020-12-03 18:36:58 · 85 阅读 · 0 评论 -
PAT1073 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class PAT1073 { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(Syste原创 2020-12-03 18:36:24 · 108 阅读 · 0 评论 -
PAT1069 JAVA
import java.util.*;public class PAT1069 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String n = sc.next(); String s = null; while (!n.equals("0000") && !n.equals("6174")) {原创 2020-12-03 18:35:48 · 145 阅读 · 0 评论 -
PAT 甲级 1076 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Set;public class Main { static List<Integer>[] neighbors;原创 2020-10-10 13:34:58 · 79 阅读 · 0 评论 -
PAT 甲级 1068 JAVA
import java.io.IOException;import java.util.ArrayList;import java.util.Arrays;import java.util.List;import java.util.Scanner;public class Main { public static void main (String[] args) throws IOException { Scanner sc = new Scanner(System.原创 2020-10-03 11:42:21 · 118 阅读 · 0 评论 -
PAT 甲级 1067 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.i原创 2020-10-02 18:32:02 · 161 阅读 · 1 评论 -
PAT 甲级 1066 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class PAT1066 { public static class AVLTree { TreeNode root; private class TreeNode { int val; TreeNode left;原创 2020-09-30 19:08:22 · 124 阅读 · 0 评论 -
PAT 甲级 1065 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.List;public class Main { public static void main (String[] args) throws IOException { BufferedReader br原创 2020-09-28 16:14:22 · 125 阅读 · 0 评论 -
PAT 甲级 1064 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.LinkedList;import java.util.Queue;import java.util.Stack;public class Main { private static class TreeNode {原创 2020-09-27 15:09:57 · 106 阅读 · 0 评论 -
PAT 甲级 1063 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Set;public class Main { static List<Set<Integer>> t原创 2020-09-26 14:57:47 · 1187 阅读 · 0 评论 -
PAT 甲级 1060 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.i原创 2020-09-23 14:37:35 · 93 阅读 · 0 评论 -
PAT 甲级 1059 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new Input原创 2020-09-23 13:23:24 · 90 阅读 · 0 评论 -
PAT 甲级 1058 JAVA
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.i原创 2020-09-22 15:11:45 · 95 阅读 · 0 评论 -
PAT 甲级 1056 JAVA
我被这题目转晕了,6, 0 , 8 原来指的是第二行的第6个, 0个,8个,我一开始理解成了第0个 6号出场, 第一个0号出场…所以做出来的总对不上import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { public static void main (String[] args) thr原创 2020-09-20 14:09:16 · 115 阅读 · 0 评论