utd bob competition over
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
// General imports
|
||||
|
||||
import java.util.Scanner;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class WeightedDifference {
|
||||
public static void main(String[] args) throws IOException{
|
||||
|
||||
double t = System.currentTimeMillis();
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
||||
|
||||
public class WeightedDifference {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
|
||||
// Write code here
|
||||
|
||||
int a = sc.nextInt();
|
||||
int a = Integer.parseInt(br.readLine());
|
||||
StringTokenizer st = new StringTokenizer(br.readLine());
|
||||
int[] ar = new int[a];
|
||||
for (int i = 0; i < a; i++) {
|
||||
ar[i] = sc.nextInt();
|
||||
ar[i] = Integer.parseInt(st.nextToken());
|
||||
}
|
||||
|
||||
long max = Long.MIN_VALUE;
|
||||
@@ -34,7 +42,8 @@ public class WeightedDifference {
|
||||
}
|
||||
|
||||
System.out.println(max);
|
||||
sc.close();
|
||||
System.out.println(System.currentTimeMillis()-t);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user