import java.io.*;import java.util.*;public class Main { static int arr[], parent[]; public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st = new StringTokenizer(bf.readLine()); int N = Integ..
import java.util.*;import java.io.*; public class Main { static int n, k, d[]; public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int tc = Integer.parseInt(bf.readLine()); for(int t=0; t> list = new ArrayList>(); for(int i=0; i()); ..
#define _CRT_SECURE_NO_WARNINGS#include #include #include using namespace std;typedef pair p; int n, answer;int highest, lowest;int qcnt[1001];vector qual; void init() { int input; cin >> n; for (int i = 0; i > input; if (qcnt[input] == 0) qual.push_back(input); qcnt[input]++; } sort(qual.begin(), qual.end()); lowest = 0; highest = qual.size() - 1;} int mai..
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class Main { static class Meeting implements Comparable { int start, end, people; Meeting(int start, int end, int people) { this.start = start; this.end = end; this.people = people; } ..
문제 캡처 소스 코드import java.io.*;import java.util.*;import java.util.Map.Entry;public class Main { static Comparator comparator(Map map) { return (key1, key2) -> { int value1 = map.get(key1), value2 = map.get(key2); if(value1 == value2) { return key1 - key2; } return value1 - value2; }; }; public static void main(String..