전체 글
-
[백준] 1244번 : 스위치 켜고 끄기 - 자바(JAVA)알고리즘/백준 2022. 4. 19. 00:01
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main_1244_스위치켜고끄기 { static class Student { int gender; int switchNumber; public Student(int gender, int switchNumber) { super(); this.gender = gender; this.switchNumber = switchNumber; } @Override public String toString() { return "S..
-
Browser에 www.google.com을 검색하면 벌어지는 일CS/네트워크 2022. 4. 18. 18:20
이 글을 읽기 전에 OSI 7 계층에 대한 글을 읽고 오시면 더욱 좋습니다. https://junuuu.tistory.com/259?category=974977 OSI 7계층이란? OSI 7 계층이란?(What) Open System Interconnection의 약자로 간단하게 "서로 다른 제조사 시스템 간의 호환성 해결"을 위해 ISO 국제표준 국가에 의해 재정되었습니다. 네트워크에서 통신이 일어나는 과정 junuuu.tistory.com 1. www.google.com을 검색합니다.(브라우저의 URL 파싱) 세부사항으로는 "g" 키를 누르면 해당 이벤트가 브라우저에 전달되고 모든 자동완성 기능이 활성화됩니다. 따라서 google.com을 완성하기 전에 브라우저가 이미 google.com을 제안할 수..
-
[백준] 17144번 : 미세먼지 안녕! - 자바(JAVA)알고리즘/백준 2022. 4. 18. 00:01
https://www.acmicpc.net/problem/17144 17144번: 미세먼지 안녕! 미세먼지를 제거하기 위해 구사과는 공기청정기를 설치하려고 한다. 공기청정기의 성능을 테스트하기 위해 구사과는 집을 크기가 R×C인 격자판으로 나타냈고, 1×1 크기의 칸으로 나눴다. 구사 www.acmicpc.net 문제 해석 R x C 크기의 격자판이 존재합니다. 공기청정기는 항상 1번 열에 설치되어 있고 크기는 두 행을 차지합니다. 1초동안 아래 적힌 일이 순서대로 일어납니다. 1. 미세먼지가 확산된다. 확산은 미세먼지가 존재하는 모든 칸에서 동시에 일어납니다. - 미세먼지는 인접한 네 방향으로 확산됩니다. - 인접한 방향에 공기청정기가 있거나, 칸이 존재하지 않으면 그 방향으로는 확산이 일어나지 않습니..
-
OSI 7계층이란?CS/네트워크 2022. 4. 17. 21:08
OSI 7 계층이란?(What) Open System Interconnection의 약자로 간단하게 "서로 다른 제조사 시스템 간의 호환성 해결"을 위해 ISO 국제표준 국가에 의해 재정되었습니다. 네트워크에서 통신이 일어나는 과정을 7단계로 구분한 것을 말합니다. OSI 7 계층의 등장 배경(Why) 정보통신산업 초기에 정보통신업체들이 자신만의 방법으로 자신들의 장비끼리만 통신이 되도록 만들다 보니 비슷한 기기임에도 제조사가 다르다는 이유로 서로 통신이 불가능했습니다. 예를 들어 한국인과 중국인이 만나면 서로 소통이 불가능합니다. 이때 영어라는 언어로 통일한다면 서로 소통이 가능할 것입니다. 따라서 표준을 정했기 때문에 OSI 7 계층을 지키는 통신장비들을 서로 호환이 가능해집니다. 또한 OSI는 7 ..
-
[백준] 13300번 : 방배정 - 자바(JAVA)알고리즘/백준 2022. 4. 17. 00:01
https://www.acmicpc.net/problem/13300 13300번: 방 배정 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 수학여행에 참가하는 학생 수를 나타내는 정수 N(1 ≤ N ≤ 1,000)과 한 방에 배정할 수 있는 최대 인원 수 K(1 < K ≤ 1,000)가 공백으로 분리되어 www.acmicpc.net 문제 해석 남자는 남자끼리, 여자는 여자끼리 방배정을 해야 한다. 방의 최소 개수를 구하자 한방에는 같은 학년끼리 한방에 배정할 수 있는 최대 인원수 K 문제 풀이 전 설계 2차원 배열을 선언하여 거기에 성별 /학 생년의 학생수를 저장합니다. 예를 들어 한방에 2명밖에 못 들어가는데 학생이 3명이면 반이 2개 필요합니다. 학생수 == 0이라면 그냥 넘어가고 학생수가 K ..
-
스프링 부트 - 회원 관리 예제 실습 (H2 데이터베이스 설치)Spring Framework 2022. 4. 16. 00:01
이전에 만든 Repository는 MemoryRepository이기 때문에 서버를 한번 재구동하면 데이터가 모두 사라지게 됩니다. MemoryRepository 대신에 DB 저장소를 사용하기 위해서 H2 데이터베이스를 설치해보겠습니다. 잠깐 MySql, Oracle을 사용하는 대신 H2 데이터 베이스를 사용하는이유? 용량이 적고 가벼워 교육용으로 좋고 웹에 admin 화면도 제공함 1. H2 Database 홈페이지에 접속합니다. https://h2database.com/html/main.html H2 Database Engine H2 Database Engine Welcome to H2, the Java SQL database. The main features of H2 are: Very fast, o..
-
[백준] 24512번 : Bottleneck Travelling Salesman Problem(Small) - 자바(JAVA)알고리즘/백준 2022. 4. 16. 00:01
https://www.acmicpc.net/problem/24512 24512번: Bottleneck Travelling Salesman Problem (Small) 외판원 순회 문제는 영어로 Traveling Salesman Problem (TSP) 라고 불리는 문제로 computer science 분야에서 가장 중요하게 취급되는 문제 중 하나이다. 이 중 변종 문제 중 하나인 Bottleneck Traveling Salesman Probl www.acmicpc.net 문제 풀이 전 설계 from, to, cost를 가지는 Edge 클래스를 생성합니다. 한 정점에서 출발하여 N-1 정점을 모두 한 번씩 방문하고 다시 처음 정점으로 돌아오는 순회이므로 최근에 배웠던 Prim 알고리즘과 Kruskal 알고..
-
5432. 쇠막대기 자르기 - 자바(JAVA)알고리즘/SW Expert Academy 2022. 4. 15. 00:01
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWVl47b6DGMDFAXm SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 문제 해석 여러개의 쇠막대기를 레이저로 절단하려고 한다. () 는 레이저를 의미합니다. 쇠막대기의 왼쪽 끝은 '(' 으로 오른쪽 끝은 ')' 으로 표현합니다. 위와 같은 방식으로 쇠막대기가 잘리게되면 17개로 잘리게 됩니다. 쇠막대기와 레이저의 배치를 나타내는 괄호 표현이 주어졌을 때, 잘려진 쇠막대기 조각의 개수를 구하세요 문제 풀이 전 설계 입력값을 toCharArray로 char형 배열로 바꾸..