728x90
학교생활/23-1 '모여서 각자 코딩'
-
[모각코 23-1] 1회차 - 백준 2212번 센서학교생활/23-1 '모여서 각자 코딩' 2023. 3. 20. 09:42
* 그리디 중요한 건 집중국을 둘 센서의 위치를 정확히 알아야하는 것이 아니다. 전체 코드: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int sensors = Integer.parseInt(br.readLine()); int K = Integer.parseInt(br..