전체 글
-
[JAVA] 백준 13460 구슬 탈출 2알고리즘 공부/문제 풀이 2021. 9. 17. 14:46
https://www.acmicpc.net/problem/13460 13460번: 구슬 탈출 2 첫 번째 줄에는 보드의 세로, 가로 크기를 의미하는 두 정수 N, M (3 ≤ N, M ≤ 10)이 주어진다. 다음 N개의 줄에 보드의 모양을 나타내는 길이 M의 문자열이 주어진다. 이 문자열은 '.', '#', 'O', 'R', 'B' www.acmicpc.net 풀이 해결 전략은 문제를 풀며 적은 내용으로 실제 작성한 코드와 상이할 수 있습니다. 변경된 부분은 왜 변경했는지 풀이 후기에 적어 놓았으니 참고 바랍니다! 코드 import java.util.*; public class Main { static int N, M; static char[][] map; static int[][] d = {{-1, 1..
-
[JAVA] 백준 17472 다리 만들기2알고리즘 공부/문제 풀이 2021. 9. 17. 10:59
https://www.acmicpc.net/problem/17472 17472번: 다리 만들기 2 첫째 줄에 지도의 세로 크기 N과 가로 크기 M이 주어진다. 둘째 줄부터 N개의 줄에 지도의 정보가 주어진다. 각 줄은 M개의 수로 이루어져 있으며, 수는 0 또는 1이다. 0은 바다, 1은 땅을 의미한다. www.acmicpc.net 문제의 설명은 링크와 문제 분석을 참고해주세요 풀이 해결 전략은 문제를 풀며 적은 내용으로 실제 작성한 코드와 상이할 수 있습니다. 변경된 부분은 왜 변경했는지 풀이 후기에 적어 놓았으니 참고 바랍니다! 코드 import java.util.*; import java.io.*; public class Main { static int N, M; static int[][] map;..
-
[JAVA] 백준 16235 나무 재테크알고리즘 공부/문제 풀이 2021. 9. 16. 23:06
https://www.acmicpc.net/problem/16235 16235번: 나무 재테크 부동산 투자로 억대의 돈을 번 상도는 최근 N×N 크기의 땅을 구매했다. 상도는 손쉬운 땅 관리를 위해 땅을 1×1 크기의 칸으로 나누어 놓았다. 각각의 칸은 (r, c)로 나타내며, r은 가장 위에서부터 www.acmicpc.net 풀이 노트 풀이 전략은 문제를 풀며 적은 내용으로 실제 작성한 코드와 상이할 수 있습니다. 변경된 부분은 왜 변경했는지 풀이 후기에 적어 놓았으니 참고 바랍니다! 코드 import java.util.*; import java.io.*; public class Main { public static class Tree implements Comparable{ int row, col, ..
-
[JAVA] 백준 9205 맥주 마시면서 걸어가기알고리즘 공부/문제 풀이 2021. 9. 16. 21:42
https://www.acmicpc.net/problem/9205 9205번: 맥주 마시면서 걸어가기 송도에 사는 상근이와 친구들은 송도에서 열리는 펜타포트 락 페스티벌에 가려고 한다. 올해는 맥주를 마시면서 걸어가기로 했다. 출발은 상근이네 집에서 하고, 맥주 한 박스를 들고 출발한다. www.acmicpc.net 풀이 코드 import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class BOJ_9205_맥주마시면서걸어가기 { public static void main(String[] args) throws Exception { Buf..
-
SSAFY 6기 합격 후기일상 2021. 7. 7. 11:44
지원 배경 대학교에 입학한 지 얼마 안 된 것 같은데 어느새 4학년이 되었고 졸업을 하기 위한 23학점이 남았다.. 8학기 이수 후 졸업과 조기 졸업 중 고민이 많이 되었다. 학점을 널널하게 들으면서 취준을 하는 것이 나을까? 그냥 졸업 후에 취준을 하는 것이 좋을까? 몇몇 선배에게 물어보니 딱히 졸업 후의 6개월 정도의 공백 기간이 크게 흠이 되지 않을 거라 생각했다. 따라서 나는 조기 졸업 후에 취준에 몰두하는 것으로 결론을 내렸다. (등록금도 한몫함) 그렇게 24학점을 들은 나는 학기 중에 아무런 취준을 하지 못하고 졸업을 하게 되었고, 막상 취준을 시작하니 아직 많이 모자라다는 것을 느꼈다.. 특히, 기업 코테를 통과할 자신이 없었고 원하는 직무를 대표할 만한 프로젝트가 없었다 (또륵..) 그러던..
-
JAVA 특징 정리프로그래밍 공부/JAVA 2021. 7. 6. 15:22
자바 언어의 특징 1. 자바는 단순하다 - C언어(절차지향 언어)와 C++언어(객체요소 포함)의 복잡한 기능을 제외하여 코드를 단순하게 작성할 수 있다. *제외된 복잡한 기능: C++의 전위처리, 포인터 사용, 다중 상속, 구조체, goto문 사용, 연산자 중복 기능 등등 - 가비지 컬렉터(Garbage Collector)에 의한 자동 메모리 관리로 할당된 메모리 해제를 신경 쓰지 않아도 된다. 2. 자바는 객체지향(Object-Oriented)적이다. -> 언어라는 객체를 사용해서 프로그램을 작성하도록 하는 언어 - 객체지향을 하게 되면 재사용성을 높일 수 있다. 3. 분산 처리(Distributed)에 용이하다. - 분산 환경에서 TCP/IP 등의 프로토콜을 통해 효율적으로 실행할 수 있도록 설계된 ..
-
Servlet Filter프로그래밍 공부/Servlet과 JSP 2021. 5. 31. 15:01
뉴렉처 강사님의 동영상 강의를 정리한 글입니다. 필터 WAS는 사용자로 부터 요청이 들어오게 되면 적절한 소프트웨어를 실행하여 실행 결과를 다시 클라이언트에게 반환한다. 우리는 WAS로 tomcat을 사용하고 있고, tomcat이 실행하는 소프트웨어를 Servlet(서버쪽의 어플리케이션 조각)이라고 부른다. 이러한 Servlet이 실행되고 존재하는 메모리 공간을 Servlet Container라고 한다. WAS는 실행할 Servlet을 Servlet Container에 올려 사용하고 더이상 사용하지 않으면 해당 서블릿을 삭제한다. 한편, 우리는 한글을 사용하고 있기 때문에 인코딩 코드를 해당 서블릿에 모두 작성해주어야 한다. 톰캣의 서블릿 설정 파일에서 인코딩 방식을 설정해 줄 수 있지만, 여러 어플리케..
-
사용자 입력 받기 - POST프로그래밍 공부/Servlet과 JSP 2021. 5. 31. 12:38
뉴렉처 강사님의 동영상 강의를 정리한 글입니다. GET을 이용하여 인자들을 넘겨주는 경우에는 넘겨주는 인자들의 정보가 url에 그대로 드러나게 된다. 이는 보안상 취약하고, 길이가 매우 긴 인자를 넘겨주는 경우에 적합하지 않은 방식이다. 이때 POST를 이용한다. 제목: 내용: form 태그에 method를 설정하지 않으면 기본적으로 get 메서드로 요청한다. method를 post로 설정하고 실행하면 전과 같은 기능을 수행하지만, url에 쿼리 스트링이 없는 것을 확인할 수 있다. 혹시 한글이 깨진다면, 아래 설정을 추가하자. req.setCharacterEncoding("UTF-8");