목록Problem Solving (223)
Life Engineering
https://school.programmers.co.kr/learn/courses/30/lessons/154538 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr import java.util.*; class Solution { int[] cost = new int[3000001]; static class Item implements Comparable{ int number; int dist; Item(int number, int dist){ this.number = number; this.dist = dist; } @Override public int ..
https://www.acmicpc.net/problem/13702 13702번: 이상한 술집 프로그래밍 대회 전날, 은상과 친구들은 이상한 술집에 모였다. 이 술집에서 막걸리를 시키면 주전자의 용량은 똑같았으나 안에 들어 있는 막걸리 용량은 랜덤이다. 즉 한 번 주문에 막걸리 용 www.acmicpc.net import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main_BOJ_13702 { static int max_val=Integer.MAX_VALUE; static int N, K; static int[]..
https://programmers.co.kr/learn/courses/30/lessons/42627?language=java# 코딩테스트 연습 - 디스크 컨트롤러 하드디스크는 한 번에 하나의 작업만 수행할 수 있습니다. 디스크 컨트롤러를 구현하는 방법은 여러 가지가 있습니다. 가장 일반적인 방법은 요청이 들어온 순서대로 처리하는 것입니다. 예를 programmers.co.kr import java.util.*; class Solution { public int solution(int[][] jobs) { int answer = 0, time=0; PriorityQueue req=new PriorityQueue(new Comparator(){ //요청시간 빠른순으로, 같을 때에는 소요시간 적은 순으로 p..
https://programmers.co.kr/learn/courses/30/lessons/60062 코딩테스트 연습 - 외벽 점검 레스토랑을 운영하고 있는 "스카피"는 레스토랑 내부가 너무 낡아 친구들과 함께 직접 리모델링 하기로 했습니다. 레스토랑이 있는 곳은 스노우타운으로 매우 추운 지역이어서 내부 공사를 하 programmers.co.kr import java.util.*; class Solution { static int answer=Integer.MAX_VALUE; static ArrayList perms=new ArrayList(); public int solution(int n, int[] weak, int[] dist) { int[] w=new int[weak.length+weak.len..