node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\n/**\n * \n */\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\...
import java.util.Scanner; /** * */ /** * @author kawakami * */ class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub StringBuilder sb = new StringBuilder(); Scanner as = new Scanner(System.in); int n = 0; int minv = 0; int maxv = 0...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 13, 41, 13, 40, 17, 41, 13, 18, 13, 17, 11, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 106, 8 ], [ 106, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = readInt(r);\n\t\tint[] price = new int[n];\n\t\tfor(int i = 0 ; i < n ; ...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); int n = readInt(r); int[] price = new int[n]; for(int i = 0 ; i < n ; i++) price[i] = readInt...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 119, 8 ], [ 119, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport java.util.*;\n\n\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n \n str = br.readLine();\n int x = Integer.parseI...
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; str = br.readLine(); int x = Integer.parseInt(str.trim()); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 2, 13, 13, 0, 13, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint minv = Integer.MAX_VALUE;\n\t\tint maxv = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint j = scanner.nextInt();\n\...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int minv = Integer.MAX_VALUE; int maxv = Integer.MIN_VALUE; for (int i = 0; i < n; i++) { int j = scanner.nextInt(); if (maxv < j - minv) max...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 40, 18, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 266, 14 ], ...
[ "import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\n/**\n * Created by martin-d28jp-love on 15/04/01.\n */\npublic class Main {\n\n public static void main(String[] args) {\n int[] input = input();\n// int[] input = mockuop();\n\n int ...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; /** * Created by martin-d28jp-love on 15/04/01. */ public class Main { public static void main(String[] args) { int[] input = input(); // int[] input = mockuop(); int inputLength = input...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 13, 4, 18, 13, 41, 13, 40, 4, 18, 13, 17, 17, 41, 13, 4, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 92, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nimport static java.lang.Integer.parseInt;\n\n/**\n * Getting Started - Maximum Profit\n */\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedRea...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.Integer.parseInt; /** * Getting Started - Maximum Profit */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamR...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 18, 13, 13, 41, 13, 4, 18, 13, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 8, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int minRate;\n int maxProfit = Integer.MIN_VALUE;\n int r = in.nextInt();\n minRate = r;\n\n for (int i = 1...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int minRate; int maxProfit = Integer.MIN_VALUE; int r = in.nextInt(); minRate = r; for (int i = 1; i < n; i++) { ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.*;\nclass Main{\n\t static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args)throws IOException{\n \t int n = Integer.parseInt(br.readLine());\n \t//final int...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.*; class Main{ static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args)throws IOException{ int n = Integer.parseInt(br.readLine()); //final int MAX =200000; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 41, 13, 2, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 13, 30, 14,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 87, 5 ], [ 87, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\n// ALDS1_1_D\npublic class Main {\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint r, p = 0, max = 1 - 1000000000;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tr = sc.nextInt();\n\t\t\tif (i == 0) {\n\t\t\t\tp = r;\n\t\t\t} else {\n\t\t\t\tif (...
import java.util.Scanner; // ALDS1_1_D public class Main { void run() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int r, p = 0, max = 1 - 1000000000; for (int i = 0; i < n; i++) { r = sc.nextInt(); if (i == 0) { p = r; } else { if (max < r - p) max = r - p; if (r < p) p =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 0, 13, 20, 13, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 5, 13, 30, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 11...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tint MAX = 200000;\n\t\tint n;\n\t\tint[] R;\n\t\t\n\t\tR = new int[MAX];\n\t\t\n\t\tBufferedReader reader = new BufferedReader (new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\...
import java.io.*; public class Main { public static void main(String[] args) { int MAX = 200000; int n; int[] R; R = new int[MAX]; BufferedReader reader = new BufferedReader (new InputStreamReader(System.in)); try{ String line = reader.readLine(); n = Integer.parseInt(line); for(int i =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 2, 18, 13, 17, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t int n = scan.nextInt();\n\t int[] r = new int[n];\n\t for (int i = 0; i < n; i++) {\n\t\t\tr[i] = scan.nextInt();\n\t\t}\n\t \n\t int min = r[0];\n\t\tint ma...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] r = new int[n]; for (int i = 0; i < n; i++) { r[i] = scan.nextInt(); } int min = r[0]; int margin = r[1] - r[0]; for (int i =...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 134, 8 ], [ 134, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint R[] = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tR[i] = scan.nextInt();\n\t\t}\n\n\t\tint an...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int R[] = new int[n]; for (int i = 0; i < n; i++) { R[i] = scan.nextInt(); } int ans = Integer.MIN_VALUE; int max = R[0...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 171, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\t\t\n\t\tint ans = Integer.MIN_VALU...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { private static FastScanner sc = new FastScanner(); public static void main(String[] args) { int n = sc.nextInt(); int ans = Integer.MIN_VALUE; int min = Integ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n\tScanner scan = new Scanner(System.in);\n\tint n = Integer.parseInt(scan.nextLine());\n\tint[] r = new int[n];\n\tfor (int i = 0; i < n; i++) {\n\t r[i] = Integer.parseInt(scan.nextLine());\n\t}\n\tint max = r[1] - r[0]...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = Integer.parseInt(scan.nextLine()); int[] r = new int[n]; for (int i = 0; i < n; i++) { r[i] = Integer.parseInt(scan.nextLine()); } int max = r[1] - r[0]; int min = r[0]; f...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n public static void main (String[] args) {\n final Scanner sc = new Scanner(System.in);\n int length = sc.nextInt();\n int[] numbers = new int[length];\n\n for (int i = 0; i < length; i++) {\n numbers[i] = sc.nextInt();\n }...
import java.util.Scanner; class Main { public static void main (String[] args) { final Scanner sc = new Scanner(System.in); int length = sc.nextInt(); int[] numbers = new int[length]; for (int i = 0; i < length; i++) { numbers[i] = sc.nextInt(); } int m...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 84, 8 ], [ 84, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t//??\\??????????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n //????????????????????°?????????\n ...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { //??\?????????????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //????????????????????°????????? int num =Integer....
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 13, 9, 0,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 80, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint n = scan.nextInt();\n\t\tint maxv = Integer.MIN_VALUE;\n\t\tint minv = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tint r = scan.nextInt...
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = scan.nextInt(); int maxv = Integer.MIN_VALUE; int minv = Integer.MAX_VALUE; for(int i = 0; i < n; i++){ int r = scan.nextInt(); if(i == 0){ minv = r...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 2, 4, 18, 13, 17, 17, 40, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n public static void main (String args[]) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint R[] = new int[n];\n\tint max = (int)Math.pow(10,10)*(-1),min;\n\tfor(int i = 0;i < n;i++){\n\t R[i] = sc.nextInt();\n\t}\n\tmin = R[0];\n\tfor(int j = ...
import java.util.Scanner; class Main { public static void main (String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int R[] = new int[n]; int max = (int)Math.pow(10,10)*(-1),min; for(int i = 0;i < n;i++){ R[i] = sc.nextInt(); } min = R[0]; for(int j = 1;j < n;j++){ ma...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 13, 13, 2, 13, 13, 0, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint minv=sc.nextInt();\n\t\tint maxv=-1000000000;\n\t\tfor(int j=1; j<n; j++){\n\t\t\tint x=sc.nextInt();\n\t\t\tmaxv=max(maxv,x-minv);\n\t\t\tminv=mi...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int minv=sc.nextInt(); int maxv=-1000000000; for(int j=1; j<n; j++){ int x=sc.nextInt(); maxv=max(maxv,x-minv); minv=min(minv,x); } System.out.println(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 4, 18, 13, 23, 13, 12,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * それぞれの購入地点から得られる最大利ざやを求め、 最も利益の大きい値を出力する\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint[] value = new int[num];\n\t\tfor (int i = 0; i < nu...
import java.util.Scanner; public class Main { /** * それぞれの購入地点から得られる最大利ざやを求め、 最も利益の大きい値を出力する * * @param args */ public static void main(String args[]) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int[] value = new int[num]; for (int i = 0; i < num; i++) { value[i] = scan.nex...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 2, 13, 13, 13, 0, 13, 2, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 71, 5 ], [ 71, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\n\npublic class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n long min = sc.nextInt();\n long ret = -1000000001;\n\n for (int i = 1; i<n; i++){\n long r = sc.nextInt();\n ...
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long min = sc.nextInt(); long ret = -1000000001; for (int i = 1; i<n; i++){ long r = sc.nextInt(); if (r - min ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 18, 13, 17, 11, 1, 41, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] R = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tR[i] = sc.nextInt();\n\t\t}\n\n\t\tint maxProfit = -2000000000;\n\t\tint min...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] R = new int[n]; for (int i = 0; i < n; i++) { R[i] = sc.nextInt(); } int maxProfit = -2000000000; int minProfit = R[0]; for (int i = 1; i < n...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 171, 5 ], [ 171, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main{\n \n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int i,j,n,max=0,min=0,dist=0;\n n=scan.nextInt();\n int r[]=new int [n];\n for(i=0;i<n;i++) {\n r[i]=scan.nextInt();\n if...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int i,j,n,max=0,min=0,dist=0; n=scan.nextInt(); int r[]=new int [n]; for(i=0;i<n;i++) { r[i]=scan.nextInt(); if(r[max]<r[i]) { ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 41, 13, 4, 18, 13, 13, 13, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 75, 8 ], [ 75, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.File;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Scanner sc = new Scanner(new File(\"in1.txt\"));\n\t\t// Scanner sc = new Scanner(new File(\"in2.txt\"));\n\t\tsc.nextInt();\n\t\t\n\...
import java.io.File; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); // Scanner sc = new Scanner(new File("in1.txt")); // Scanner sc = new Scanner(new File("in2.txt")); sc.nextInt(); int r0 = sc.nextInt(); int ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 40, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 40, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main\n{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint[] r = new int[200000];\n\t\tint kai = -1000000000;\n\t\t\n\t\tint n = scan.nextInt();\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tr[i] = scan.nextInt();\n\t\t}\n\t\tint min...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int[] r = new int[200000]; int kai = -1000000000; int n = scan.nextInt(); for(int i=0; i<n; i++){ r[i] = scan.nextInt(); } int min = r[0]; int max = -1000000000; for(i...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 41, 13, 40, 17, 41, 13, 12, 13, 30, 4, 13, 4, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 6 ], [ 6, 7 ], [ 6, 8 ], [ 116, 9 ], [ 9, 10 ], [ 116, 11 ], [ 11, 12 ], [ 116, 13 ], [ 13, 1...
[ "import java.util.Scanner;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n static int n;\n static int a[];\n static int answer = -1000000000;\n static int minv;\n\n\n public static void main(String[] args) {\n read();\n solve();\n System.out.println(answ...
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static int n; static int a[]; static int answer = -1000000000; static int minv; public static void main(String[] args) { read(); solve(); System.out.println(answer); } pu...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 41, 13, 11, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 102, 5 ], [ 102, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\n\t\tint[] nAry = new int[n];\n\n\t\tfor(int i = 0; i < n ; i++){\n\t\t\tnAry[i] = scan.nextInt();\n\t\t}\n\n\t\tint maxBenefit = Integer.MIN...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] nAry = new int[n]; for(int i = 0; i < n ; i++){ nAry[i] = scan.nextInt(); } int maxBenefit = Integer.MIN_VALUE; int min = nAry[0]; int tm...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "\n\nimport java.util.Scanner;\n\nclass Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i< n ; i++){\n arr[i] = scanner.nextInt();\n }\n int m...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] arr = new int[n]; for (int i = 0; i< n ; i++){ arr[i] = scanner.nextInt(); } int maxMinus = arr[1] ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 2, 17, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint max = 1 - (int) Math.pow(10, 9);\n\t\tint ri = scanner.nextInt();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint rj = scann...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int max = 1 - (int) Math.pow(10, 9); int ri = scanner.nextInt(); for (int i = 1; i < n; i++) { int rj = scanner.nextInt(); max = Math.max(ma...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 23, 13, 12, 13, 30, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\n/**\n * Created by hwzheng on 2017/3/26.\n */\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] R = new int[n];\n for (int i = 0; i < n; i++){\n R[i]...
import java.util.Scanner; /** * Created by hwzheng on 2017/3/26. */ public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] R = new int[n]; for (int i = 0; i < n; i++){ R[i] = scanner.nextI...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 4, 18, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 97, 8 ], [ 97, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<Integer> nums = new ArrayList<>();\n for(int i=0; i<n; ++i) {\n nums.add(sc.nextInt());\n }...
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> nums = new ArrayList<>(); for(int i=0; i<n; ++i) { nums.add(sc.nextInt()); } int n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 141, 11 ], [ 141, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\t\t...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); try { int lim = Integer.parseInt(in.readLine()); int[] a = new int[lim...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 0, 13, 4, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 74, 5 ], [ 74, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint minv = Integer.MAX_VALUE;\n\t\tint maxv = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint j = scanner.nextInt();\n\...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int minv = Integer.MAX_VALUE; int maxv = Integer.MIN_VALUE; for (int i = 0; i < n; i++) { int j = scanner.nextInt(); if (i > 0) maxv = Math.m...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 2, 13, 13, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tlong dMax = -1000000001;\n\t\tlong min = sc.nextLong();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tlong r = sc.nextLong();\n\t\t\tdMax = Math.max((...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long dMax = -1000000001; long min = sc.nextLong(); for (int i = 1; i < n; i++) { long r = sc.nextLong(); dMax = Math.max((r - min), dMax); min = Math.mi...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 18, 13, 17, 11, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 97, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ]...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic boolean[] prime;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] R = new int[n];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tR[i] = sc.nextInt();\n\t\t}\n\n\t\tint ans = -200000000...
import java.util.Scanner; public class Main { static boolean[] prime; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] R = new int[n]; for (int i=0; i<n; i++) { R[i] = sc.nextInt(); } int ans = -2000000000; int min = R[0]; for (int i=1; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 139, 8 ], [ 139, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint N = Integer.parseInt(br.readLine());\n\n\t\tlong[] arr = new long[N];\n\t\t...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); long[] arr = new long[N]; for (int i = 0; i < N; i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 2, 17, 17, 0, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.io.*;\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n int n = Integer.parseInt( kb.readLine() );\n\t\t\t\n\t\t\tint[] nums = new int[n];\n int num, maxprofit, min...
import java.io.*; class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); try { int n = Integer.parseInt( kb.readLine() ); int[] nums = new int[n]; int num, maxprofit, min; int i,...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 2, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n//import java.util.Math.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int A[] = new int[n];\n int i,j;\n \n for(i = 0; i < n; i++){\n A[i] = sc.nextInt();\n ...
import java.util.*; //import java.util.Math.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int A[] = new int[n]; int i,j; for(i = 0; i < n; i++){ A[i] = sc.nextInt(); // System.out....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] ary =new int[n];\n \tint i,m;\n \tint reg=0;\n \tint min=0;\n \tint max=0;\n \tfor(i=0;i<n;i++){\n \t\tm=sc.nextInt();\n \t\...
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int[] ary =new int[n]; int i,m; int reg=0; int min=0; int max=0; for(i=0;i<n;i++){ m=sc.nextInt(); if(i==0){ min=m; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 14, 13, 30, 0, 13, 4, 18, 13, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 227, 8 ], [ 227, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n // TODO ?????????????????????????????????????????????\n \n try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { St...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nclass Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n i...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] arr = n...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 17, 14, 2, 13, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 346, 8 ], [ 346, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader breader = getReader();\n\t\tint[] ary = getAryMl(breader);\n\t\tint maxdf = ary[1]...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? BufferedReader breader = getReader(); int[] ary = getAryMl(breader); int maxdf = ary[1] - ary[0] ; for( int i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 11, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 102, 5 ], [ 102, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint r[] = new int[n];\n\t\tint maxv = -999999999;\n\t\tfor (int i = 0; i < r.length; i++) {\n\t\t\tr[i] = sc.nextInt();\n\t\t}\n\t\tint minv = r[0];...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int r[] = new int[n]; int maxv = -999999999; for (int i = 0; i < r.length; i++) { r[i] = sc.nextInt(); } int minv = r[0]; for (int i = 1; i < n; i++) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 2, 18, 13, 17, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int[] r = new int[n];\n for(int i = 0; i < n; i++){\n r[i] = stdIn.nextInt();\n }\n\n int min = r[0];\n int maxp = r[1] - r[0];\n f...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int[] r = new int[n]; for(int i = 0; i < n; i++){ r[i] = stdIn.nextInt(); } int min = r[0]; int maxp = r[1] - r[0]; for(int i = 1; i < ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 40, 17, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint j,k;\n\t\tint maxv = -1000000000;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.nextLine());\n\t\tint R[] = new int[n];\n\t\tfor(j=0;j<n;j++)R[j] = Integer.parseInt(sc.next());\n\t\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { int j,k; int maxv = -1000000000; Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); int R[] = new int[n]; for(j=0;j<n;j++)R[j] = Integer.parseInt(sc.next()); int minv = R[0]; for(k=1;k<...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 133, 11 ], [ 133, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main{\n public static void main(String[] args) throws Exception{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try{\n int n = Integer.parseInt(b...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; public class Main{ public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try{ int n = Integer.parseInt(br.readLine())...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n \n public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader br = new Buf...
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(ne...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int rowCount = Integer.parseInt(sc.nextLine());\n\n int minNum = Integer.parseInt(sc.nextLine());\n int maxProfit = Integer.MIN_VALUE;\n\n for...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int rowCount = Integer.parseInt(sc.nextLine()); int minNum = Integer.parseInt(sc.nextLine()); int maxProfit = Integer.MIN_VALUE; for (int i = 1; i <...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint min = scan.nextInt();\n\t\tint ans = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint r = scan.nextInt();\n\t\t\tans = Math.max(ans, r - min);\n\t...
import java.util.Scanner; public class Main { void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int min = scan.nextInt(); int ans = Integer.MIN_VALUE; for (int i = 0; i < n - 1; i++) { int r = scan.nextInt(); ans = Math.max(ans, r - min); min = Math.min(min, r); } Sys...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 84, 11 ], [ 84, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parse...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLin...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\n\nclass Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] price = new int[n];\n int i, j;\n\n for (i = 0; i < n; ...
import java.io.*; class Main { public static void main (String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] price = new int[n]; int i, j; for (i = 0; i < n; i++) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 40, 17, 41, 13, 41, 13, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 13, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [...
[ "import java.util.*;\nclass Main{\n public static void main(String args[]){\n\n int max = -1000000000;\n int rt;\n int min;\n\n Scanner sc = new Scanner(System.in);\n // input\n int n = sc.nextInt();\n //first\n min = sc.nextInt();\n //Comparison\n for(int i = 1; i<n; i++){\n rt ...
import java.util.*; class Main{ public static void main(String args[]){ int max = -1000000000; int rt; int min; Scanner sc = new Scanner(System.in); // input int n = sc.nextInt(); //first min = sc.nextInt(); //Comparison for(int i = 1; i<n; i++){ rt = sc.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 14, 2, 13, 13, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint N=scan.nextInt();\n\t\tint min,t,ans;//minはその時間までの最安値\n\t\tmin=scan.nextInt();\n\t\tt=scan.nextInt();\n\t\tans=t-min;\n\t\tif(t<min) min=t;\n\t\tfor(int i=0;i<N-2;i++){\n\t\t...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan=new Scanner(System.in); int N=scan.nextInt(); int min,t,ans;//minはその時間までの最安値 min=scan.nextInt(); t=scan.nextInt(); ans=t-min; if(t<min) min=t; for(int i=0;i<N-2;i++){ t=scan.nextInt(); if(ans<t-min)...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 109, 11 ], [ 109, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint inputNumTimes = Int...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int inputNumTimes = Integer.parseInt(br.re...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint Ri = sc.nextInt();\n\t\tint Rj = 1;\n\t\tint minv = Ri; \t\t\t\t\t// Rjより前の最小値\n\t\tint maxv = Integer.MIN_VALUE;\t// 差の最大値\n\n\t\tfor (int i ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int Ri = sc.nextInt(); int Rj = 1; int minv = Ri; // Rjより前の最小値 int maxv = Integer.MIN_VALUE; // 差の最大値 for (int i = 1; i < n; i++) { Rj = sc.nextInt(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 40, 18, 13, 13, 11, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 94, 5 ], [ 94, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint []R = new int[n];\n\t\t\n\t\tfor (int i = 0; i<n; i++) {\n\t\t\tR[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint min = R[0];\n\t\tint ans = -...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int []R = new int[n]; for (int i = 0; i<n; i++) { R[i] = sc.nextInt(); } int min = R[0]; int ans = -Integer.MAX_VALUE; for (int i = 1; i < ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 13, 9, 41, 13, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int minR = 0;\n int maxDiff = -1000000000;\n for (int i = 0; i < n; i++) {\n int r = scanner.nextIn...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int minR = 0; int maxDiff = -1000000000; for (int i = 0; i < n; i++) { int r = scanner.nextInt(); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\n\n\npublic class Main {\n public static void main(String[]args){\n InputReader sc = new...
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.LinkedList; import java.util.PriorityQueue; public class Main { public static void main(String[]args){ InputReader sc = new InputReader(Sys...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 120, 5 ], [ 120, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] r = new int[n];\n\n int min = 1000000000;\n\n\n for(int i = 0; i < n; i++) {\n r[i] = sc.nextInt();\n...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] r = new int[n]; int min = 1000000000; for(int i = 0; i < n; i++) { r[i] = sc.nextInt(); } ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 125, 11 ], [ 125, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.lang.Math;\n\n/*Question\n/FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§????????????\n/????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108????...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.Math; /*Question /FX????????§????????°?????????????????¨????????????????????¨??§????????????????????????????????¨?????§???????????? /????????°????????????100???????????? 1000???????????????????????????????????? 1?????? 108???????????£???...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 2, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n int min = sc.nextInt();\n int ans = Integer.MIN_VALUE;\n \n for (int i = 0; i < n - 1; i++) {\n in...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int min = sc.nextInt(); int ans = Integer.MIN_VALUE; for (int i = 0; i < n - 1; i++) { int input = sc.next...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 13, 30...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n\t\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\t\n\t\tint maxDiff = Integer.MIN_VALUE;\n\t\tint minVal = scan.nextInt();\n\t\t\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint val = scan.nextInt();\n\t\t\tint diff = val - min...
import java.util.*; public class Main { void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int maxDiff = Integer.MIN_VALUE; int minVal = scan.nextInt(); for (int i = 1; i < n; i++) { int val = scan.nextInt(); int diff = val - minVal; if (maxDiff < diff) { maxDif...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\nclass Main{\n public static void main(String[] args){\n \t//final int MAX =200000;\n \t\n \n \tScanner sc = new Scanner(System.in);\n \tint n = Integer.parseInt(sc.next());\n \tint[] R=new int[n];\n \t\n \tfor(int i=0;i<n;i++){\n \t\t R[i]=Integer.parseInt(sc.next...
import java.util.*; class Main{ public static void main(String[] args){ //final int MAX =200000; Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int[] R=new int[n]; for(int i=0;i<n;i++){ R[i]=Integer.parseInt(sc.next()); } long max...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\tint n = Integer.parseInt(std.next());\n\t\tint minval = Integer.parseInt(std.next());;\n\t\tint maxpro = (int)-1e+9;\n\t\tint nextval = 0;\n\t\tfor (int i=1; i<n; i++){\n\t\t\...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner std = new Scanner(System.in); int n = Integer.parseInt(std.next()); int minval = Integer.parseInt(std.next());; int maxpro = (int)-1e+9; int nextval = 0; for (int i=1; i<n; i++){ nextval = Integer.parseInt(std...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint count = scanner.nextInt();\n\t\tint price = scanner.nextInt();\n\t\tint changedPrice = scanner.nextInt();\n\t\tint profit = changedPrice - price;\n\n\t\tif (price > change...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); int price = scanner.nextInt(); int changedPrice = scanner.nextInt(); int profit = changedPrice - price; if (price > changedPrice) { price = changedP...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 104, 5 ], [ 104, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint a[]=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i]=s.nextInt();\n\t\t}\n\t\tint max=a[1]-a[0];\n\t\tint min=a[0];\n\t\tfor(int j=2;j<n;j++){\n\t\t\tmi...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); int n=s.nextInt(); int a[]=new int[n]; for(int i=0;i<n;i++){ a[i]=s.nextInt(); } int max=a[1]-a[0]; int min=a[0]; for(int j=2;j<n;j++){ min=Math.min(min,a[j-1]); int sub; s...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 40, 17, 0, 18, 13, 17, 4, 18, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n];\n int maxv = -1000000000;\n a[0] = sc.nextInt();\n int minv = a[0];\n for(int i = 1; i<n; i++){\n a[i] = sc.nextI...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; int maxv = -1000000000; a[0] = sc.nextInt(); int minv = a[0]; for(int i = 1; i<n; i++){ a[i] = sc.nextInt(); max...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 430, 11 ], [ 430, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint[] r = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tr[i] = sc.nextInt();\n\t\t}\n\t\t...
import java.io.IOException; import java.io.InputStream; import java.util.*; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(); int n = sc.nextInt(); int[] r = new int[n]; for (int i = 0; i < n; i++) { r[i] = sc.nextInt(); } int[] max = new int[n]; int[] m...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 17, 0, 13, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n \nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int t = sc.nextInt();\n int[] R = new int[t];\n int i, min, bnf;\n for(i=0; i<t; i++) R[i] = sc.nextInt();\n min = R[0];\n bnf...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); int[] R = new int[t]; int i, min, bnf; for(i=0; i<t; i++) R[i] = sc.nextInt(); min = R[0]; bnf = Integer.MIN_...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\nclass Main {\n static final int MAX_PRICE = 1000000000;\n static final int MIN_PRICE = 1;\n\n public static void main(String[] args) {\n // 標準入力の読み込み開始\n Scanner scanner = new Scanner(System.in);\n\n // ...
import java.util.ArrayList; import java.util.List; import java.util.Scanner; class Main { static final int MAX_PRICE = 1000000000; static final int MIN_PRICE = 1; public static void main(String[] args) { // 標準入力の読み込み開始 Scanner scanner = new Scanner(System.in); // 価格の数 int ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 106, 5 ], [ 106, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n \n \n public static void main(String[] args){\n int n;\n int[] R;\n \n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n R = new int[n];\n \n for( int i = 0; i < n; i++) R[i] = sc.nextInt();\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args){ int n; int[] R; Scanner sc = new Scanner(System.in); n = sc.nextInt(); R = new int[n]; for( int i = 0; i < n; i++) R[i] = sc.nextInt(); int a = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n \n int n;\n int[]R;\n \n Scanner scan = new Scanner(System.in); \n n = scan.nextInt();\n R = new int[n];\n \n for(int i=0 ; i < n;i++) {\n R[i...
import java.util.Scanner; public class Main{ public static void main(String[] args){ int n; int[]R; Scanner scan = new Scanner(System.in); n = scan.nextInt(); R = new int[n]; for(int i=0 ; i < n;i++) { R[i] = scan.nextInt(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 82, 5 ], [ 82, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=Integer.valueOf(sc.next());\n\t\tint min=Integer.valueOf(sc.next());\n\t\tint dmax=Integer.MIN_VALUE;\n\t\t\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint next=Integer.valueOf(sc...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=Integer.valueOf(sc.next()); int min=Integer.valueOf(sc.next()); int dmax=Integer.MIN_VALUE; for(int i=1;i<n;i++){ int next=Integer.valueOf(sc.next()); int d=next-min; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 40, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 91, 8 ], [ 91, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\npublic class Main{\n\tpublic static void main(String args[]) throws Exception{\n\t\tScanner cin= new Scanner(System.in);\n\t\tint N= cin.nextInt();\n\t\t\n\t\tint min= (int)Math.pow(10d,9d);\n\t\tint MaxProfit= -min;\n\t\tint Rate;\n\t\t\n\t\tint i;\n\t\tfor(i=0;i<N;i++){\n\...
import java.io.*; import java.util.*; public class Main{ public static void main(String args[]) throws Exception{ Scanner cin= new Scanner(System.in); int N= cin.nextInt(); int min= (int)Math.pow(10d,9d); int MaxProfit= -min; int Rate; int i; for(i=0;i<N;i++){ Rate= cin.nextInt(); if(i==0){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] arr = new int[N];\n for(int i = 0; i < N; i++)\n {\n arr[i] = sc.nextInt();\n }\n int...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] arr = new int[N]; for(int i = 0; i < N; i++) { arr[i] = sc.nextInt(); } int res = maximumProf...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 2, 13, 13, 0,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 70, 5 ], [ 70, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int min = Integer.MAX_VALUE;\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < n; ++i) {\n int r = sc.nextInt();...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; for (int i = 0; i < n; ++i) { int r = sc.nextInt(); m...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 13, 41, 13, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 106, 5 ], [ 106, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line1 = sc.nextLine();\n\t\tint n = Integer.parseInt(line1);\n\n\t\tString line2 = sc.nextLine();\n\t\tint ...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); String line1 = sc.nextLine(); int n = Integer.parseInt(line1); String line2 = sc.nextLine(); int R0 = Integer.parseInt(line2);...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\n\n \npublic class Main {\n public static void main(String[] args) {\n InputReader sc = new In...
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.LinkedList; import java.util.PriorityQueue; public class Main { public static void main(String[] args) { InputReader sc = new InputReader(System...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 96, 8 ], [ 96, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint maxv = -2000000000;\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tfor(int i =0;i<N;i++){\n\t\t\tn...
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int maxv = -2000000000; ArrayList<Integer> numbers = new ArrayList<Integer>(); for(int i =0;i<N;i++){ numbers.add(sc.nextInt()); }...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n// while (true)\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n int n = in.nextInt();\n int[] ...
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { // while (true) solve(in); } } private static void solve(Scanner in) { int n = in.nextInt(); int[] R = new int[n]; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 123, 8 ], [ 123, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(sc.next());\n\n\t\tArrayList<Integer> r = new ArrayList<Integer>();\n\n\t\tfor(i...
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); ArrayList<Integer> r = new ArrayList<Integer>(); for(int i = 1; i <= n; i++) { r.a...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 2, 13, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint minR=sc.nextInt();\n\t\tint maxR=-1000000000;\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint R=sc.nextInt();\n\t\t\tmaxR=Math.max(maxR,R-minR);\n\t\t\tminR=Ma...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int minR=sc.nextInt(); int maxR=-1000000000; for(int i=1;i<n;i++){ int R=sc.nextInt(); maxR=Math.max(maxR,R-minR); minR=Math.min(minR, R); } System.out.pr...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 0, 13, 2, 13, 13, 0, 13, 4, 18, 13, 13, 13, 11, 1, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int max;\n int min;\n\n int r0 = Integer.parseInt(scanner.next());\n int r1 = Integer....
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.next()); int max; int min; int r0 = Integer.parseInt(scanner.next()); int r1 = Integer.parseInt(scanner...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 40, 17, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] num_list = new int[n];\n for (int i = 0; i < n; i++){\n num_list[i] = sc.nextInt();\n }\n max_value(num_list, n);\n }\n\n public static void ...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] num_list = new int[n]; for (int i = 0; i < n; i++){ num_list[i] = sc.nextInt(); } max_value(num_list, n); } public static void max_value(int[] ls...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 41, 13, 20, 4, 18, 13, 4, 18, 13, 23, 13, 6, 13, 12, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\nimport java.math.BigDecimal;\n\npublic class Main {\n static InputReader in;\n static PrintWriter...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Scanner; import java.util.StringTokenizer; import java.math.BigDecimal; public class Main { static InputReader in; static PrintWriter out; static ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 40, 17, 41, 13, 12, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 4, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], ...
[ "import java.util.*;\nclass Main{ \n\tScanner sc = new Scanner(System.in); \n\tint n; \n\tint m=-2000000000; \n\tint mini;\n\t \n\tvoid mp(){ \n\t\tn=sc.nextInt();\n\t\tmini=sc.nextInt();\n\t\t\n\t\tfor(int i=0; i<n-1; i++){ \n\t\t\tint d=sc.nextInt();\n\t\t \tm=maxv(m,d-mini); \n\t\t\tm...
import java.util.*; class Main{ Scanner sc = new Scanner(System.in); int n; int m=-2000000000; int mini; void mp(){ n=sc.nextInt(); mini=sc.nextInt(); for(int i=0; i<n-1; i++){ int d=sc.nextInt(); m=maxv(m,d-mini); mini=minv(mini,d); } Syste...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\t\n\t//?????????????????????????????????????????????????????§?????¢???????????????\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint smallerNum = sc.nextInt();\n\t\tint maxDef = Integer.MIN_...
import java.util.Scanner; public class Main { //?????????????????????????????????????????????????????§?????¢??????????????? public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int smallerNum = sc.nextInt(); int maxDef = Integer.MIN_VALUE; for (int i = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 119, 5 ], [ 119, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<Integer> arr = new ArrayList<>();\n int min = 0;\n int max = 0;\n for(int i = 0; i < n; i++) {\n arr.add(sc.nextInt());\n if(i == ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> arr = new ArrayList<>(); int min = 0; int max = 0; for(int i = 0; i < n; i++) { arr.add(sc.nextInt()); if(i == 0) { min...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 13, 0, 13, 13, 14, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 100, 5 ], [ 100, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] a) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint loop=input.nextInt();\n\t\tint max=0;\n\t\tint minInput=0;\n\t\t\n\t\t\n\t\tfor(int i=0;i<loop;i++){\n\t\t\tint newNum=input.nextInt();\n\t\t\t\n\t\t\tif(i==0){\n\t\t\t\tminInpu...
import java.util.*; public class Main { public static void main(String[] a) { Scanner input = new Scanner(System.in); int loop=input.nextInt(); int max=0; int minInput=0; for(int i=0;i<loop;i++){ int newNum=input.nextInt(); if(i==0){ minInput=newNum; max=newNum; } else if(i==1)...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Vishal Bur...
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Vishal Burman */ public cl...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 13, 41, 13, 18, 13, 17, 41, 13, 2, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint number[] = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = scanner.nextInt();\n\t\t\tnumber[i] = x;\n\t\t}\n\t\tint min ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int number[] = new int[n]; for (int i = 0; i < n; i++) { int x = scanner.nextInt(); number[i] = x; } int min = number[0]; int max = number[1] ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 18, 13, 13, 0, 18, 13, 17, 4, 18, 13, 41, 13, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.Scanner;\npublic class Main {\n\tstatic String a;\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n = stdIn.nextIn...
import java.io.*; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { static String a; public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int[] list = n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 110, 11 ], [ 110, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tvoid run() throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint N = Integer.parseInt(br.readLine());\n\n\t\tint[] number = new int[N];...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { void run() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); int[] number = new int[N]; for (int i = 0; i < ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 41, 13, 41, 13, 40, 13, 41, 13, 13, 41, 13, 20, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 77, 9 ], [ 9, 10 ], [ 9, 11 ], [ 77, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\n\t\tint N,tmp,maximum = -BIG_NUM,minimum = BIG_NUM;\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tN = scanner...
import java.util.Scanner; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { int N,tmp,maximum = -BIG_NUM,minimum = BIG_NUM; Scanner scanner = new Scanner(System.in); N = scanner.nextInt(); for(int loop...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\n\t\tint min = a[0];\n\t\tint ans = -1001001001;\n\t\...
import java.util.Scanner; public class Main { 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.nextInt(); } int min = a[0]; int ans = -1001001001; for(int i = 1 ; i < n ; i++) { ans...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 96, 11 ], [ 96, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.io.IOException;\nimport java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n Scanner scanner = new Scanner(System.in);\n\n int loopCount = Integer.parseInt(scanner.next());\n Integer cheaper =...
import java.io.IOException; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner scanner = new Scanner(System.in); int loopCount = Integer.parseInt(scanner.next()); Integer cheaper = null; I...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 41, 13, 41, 13, 40, 13, 41, 13, 13, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 103, 11 ], [ 103, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\n\t\tint N,tmp,maximum = -BIG_NUM,minimum = BIG_N...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { int N,tmp,maximum = -BIG_NUM,minimum = BIG_NUM; BufferedReader b...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n long[] a = new long[n];\n for(int i = 0; i < n; i++){\n a[i] = sc.nextLong();\n }\n long ma...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] a = new long[n]; for(int i = 0; i < n; i++){ a[i] = sc.nextLong(); } long max = a[1] - a[0]...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 41, 13, 4, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 2, 18, 13, 17, 18, 13, 17, 41, 13, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 126, 5 ], [ 126, 6 ], [ 6, 7 ], [ 6, 8 ], [ 126, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint t = sc.nextInt();\n\t\tint[] R = inpNum(t);\n\n\t\tint mp = maxProfit(R);\n\t\tSystem.out.println(mp);\n\t\tsc.close();\n\t}\n\n\tprivate static int maxProfit(int[]...
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int t = sc.nextInt(); int[] R = inpNum(t); int mp = maxProfit(R); System.out.println(mp); sc.close(); } private static int maxProfit(int[] R) { int max_p = R[1] - R[0]; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 17, 41, 13, 13, 41, 13, 40, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint size = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint max = b;\n\t\tint out = 0;\n\t\tint min = b;\n\t\tint sec = -1000000000;\n\t\tint thr = -1000000000;\n\t\tfor(int i = 1;i <= siz...
import java.util.*; class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int size = sc.nextInt(); int b = sc.nextInt(); int max = b; int out = 0; int min = b; int sec = -1000000000; int thr = -1000000000; for(int i = 1;i <= size - 1;i++){ int num = sc.nextInt(...