목록Problem Solving (223)
Life Engineering
https://www.acmicpc.net/problem/1744 1744번: 수 묶기 길이가 N인 수열이 주어졌을 때, 그 수열의 합을 구하려고 한다. 하지만, 그냥 그 수열의 합을 모두 더해서 구하는 것이 아니라, 수열의 두 수를 묶으려고 한다. 어떤 수를 묶으려고 할 때, 위치에 www.acmicpc.net import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Collections; import java.util.LinkedList; import java.util.List; public class BOJ_Main_1744 { static int N; stat..
https://www.acmicpc.net/problem/17825 17825번: 주사위 윷놀이 주사위 윷놀이는 다음과 같은 게임판에서 하는 게임이다. 처음에는 시작 칸에 말 4개가 있다. 말은 게임판에 그려진 화살표의 방향대로만 이동할 수 있다. 말이 파란색 칸에서 이동을 시작하면 www.acmicpc.net 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 Pos{ int r,c,d; Pos(int r, int c, int ..
https://programmers.co.kr/learn/courses/30/lessons/77885# 코딩테스트 연습 - 2개 이하로 다른 비트 programmers.co.kr class Solution { public long[] solution(long[] numbers) { long[] answer = new long[numbers.length]; int cnt=0; for (long number: numbers){ long lastOne=-1; long result=number; long i=0; while (true){ if ((number & (1L 1로 result=result|(1L
https://programmers.co.kr/learn/courses/30/lessons/42890# 코딩테스트 연습 - 후보키 [["100","ryan","music","2"],["200","apeach","math","2"],["300","tube","computer","3"],["400","con","computer","4"],["500","muzi","music","3"],["600","apeach","music","2"]] 2 programmers.co.kr import java.util.*; class Solution { static int row, col; static Set ans=new HashSet(); static String[][] r; public int solution(Stri..