General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
196022463 Contestant:
IanISam
1794C - 31 Java 8 Accepted 358 ms 0 KB 2023-03-04 21:09:43 2023-03-04 22:47:43
→ Source
import java.io.*; import java.util.*;
public class Main
{
    public static StringTokenizer st;
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		int t = Integer.parseInt(br.readLine());
		while(t-->0){
		    int n = Integer.parseInt(br.readLine());
		    PriorityQueue<Integer> u = new PriorityQueue();
		    st = new StringTokenizer(br.readLine());
		    for(int i=0; i<n; i++){
		        u.add(Integer.parseInt(st.nextToken()));
		        while(u.peek()<u.size()){
		            u.poll();
		        }
		        pw.print(u.size()+" ");
		    }
		    pw.println();
		}
		pw.close();
	}
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details