Someone please help me, what's wrong with this code ?
import java.util.*;public class Main {public static void main(String[] args){try {Scanner scanner = new Scanner(System.in);int multiset = scanner.nextInt();int query = scanner.nextInt();long[] queryElements = new long[query];PriorityQueue<Long> priorityQueue = new PriorityQueue<>(Collections.reverseOrder());for (int i = 0; i < multiset; i++) {priorityQueue.add(scanner.nextLong());}for (int i = 0; i < query; i++) {queryElements[i] = scanner.nextInt();}HashMap<Long, Long> mapx = new HashMap<>();long k = 1;while (!priorityQueue.isEmpty()) {long x = priorityQueue.poll();mapx.put(k, x);k++;x = x / 2;
Read more… (10 words)