utd bob competition over

This commit is contained in:
2026-04-18 16:02:31 -05:00
parent 3936b37e29
commit ee7b6b1581
3 changed files with 97 additions and 25 deletions

View File

@@ -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);
}
}