https://www.acmicpc.net/problem/1926 1926번: 그림 어떤 큰 도화지에 그림이 그려져 있을 때, 그 그림의 개수와, 그 그림 중 넓이가 가장 넓은 것의 넓이를 출력하여라. 단, 그림이라는 것은 1로 연결된 것을 한 그림이라고 정의하자. 가로나 세로 www.acmicpc.net class Node { constructor(item) { this.item = item; this.next = null; } } class Queue { constructor() { this.head = null; this.tail = null; this.length = 0; } push(item) { const node = new Node(item); if (this.head == null) { t..
https://www.acmicpc.net/problem/2493 2493번: 탑 첫째 줄에 탑의 수를 나타내는 정수 N이 주어진다. N은 1 이상 500,000 이하이다. 둘째 줄에는 N개의 탑들의 높이가 직선상에 놓인 순서대로 하나의 빈칸을 사이에 두고 주어진다. 탑들의 높이는 1 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync('./dev/stdin').toString().trim().split('\n'); const top = input[1].split(' ').map(Number); class Node { constructor(item) { this.item = item; this.next = null; } } cl..
https://www.acmicpc.net/problem/2525 2525번: 오븐 시계 첫째 줄에 종료되는 시각의 시와 분을 공백을 사이에 두고 출력한다. (단, 시는 0부터 23까지의 정수, 분은 0부터 59까지의 정수이다. 디지털 시계는 23시 59분에서 1분이 지나면 0시 0분이 된다.) www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync('./dev/stdin').toString().trim().split('\n'); let [h, m] = input[0].split(' ').map(Number); let N = +input[1] + m; while (N > 59) { h += 1; if (h > 23) h = 0; N..
https://www.acmicpc.net/problem/2504 2504번: 괄호의 값 4개의 기호 ‘(’, ‘)’, ‘[’, ‘]’를 이용해서 만들어지는 괄호열 중에서 올바른 괄호열이란 다음과 같이 정의된다. 한 쌍의 괄호로만 이루어진 ‘()’와 ‘[]’는 올바른 괄호열이다. 만일 X www.acmicpc.net 다 처리했는데, 괄호가 남아있으면 올바른 괄호열이 아니니까 0을 출력해야한다. TC [()]] const fs = require('fs'); const input = fs.readFileSync('./dev/stdin').toString().trim(); class Node { constructor(item) { this.item = item; this.next = null; } } clas..
https://www.acmicpc.net/problem/10799 10799번: 쇠막대기 여러 개의 쇠막대기를 레이저로 절단하려고 한다. 효율적인 작업을 위해서 쇠막대기를 아래에서 위로 겹쳐 놓고, 레이저를 위에서 수직으로 발사하여 쇠막대기들을 자른다. 쇠막대기와 레이저 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync('./dev/stdin').toString().trim(); // console.log(input); let stick = 1; let answer = 0; for (let i = 1; i < input.length; i++) { if (input[i] === ')') { if (input[i - 1] ===..
https://www.acmicpc.net/problem/5397 5397번: 키로거 첫째 줄에 테스트 케이스의 개수가 주어진다. 각 테스트 케이스는 한줄로 이루어져 있고, 강산이가 입력한 순서대로 길이가 L인 문자열이 주어진다. (1 ≤ L ≤ 1,000,000) 강산이가 백스페이스를 입 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync('./dev/stdin').toString().trim().split('\n'); input.shift(); class Node { constructor(item) { this.item = item; this.next = null; } } class Stack { constructor() {..
https://www.acmicpc.net/problem/1475 1475번: 방 번호 첫째 줄에 다솜이의 방 번호 N이 주어진다. N은 1,000,000보다 작거나 같은 자연수이다. www.acmicpc.net const fs = require('fs'); let input = +fs.readFileSync('./dev/stdin').toString().trim(); let num = Array(10).fill(0); while (input > 0) { num[input % 10]++; input = Math.floor(input / 10); } num[9] = Math.ceil((num[6] + num[9]) / 2); num[6] = 0; console.log(Math.max(...num));
https://www.acmicpc.net/problem/13300 13300번: 방 배정 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 수학여행에 참가하는 학생 수를 나타내는 정수 N(1 ≤ N ≤ 1,000)과 한 방에 배정할 수 있는 최대 인원 수 K(1 v.split(' ').map(Number)); const [_, N] = input.shift(); let room = Array.from(Array(6), ()..
- Total
- Today
- Yesterday
- create databases;
- 로드나인
- create db
- DB 생성
- 서버개발
- 개발자면접
- 다이나믹프로그래밍
- 그래프
- 롱베케이션
- 은둔청년체험
- MOD
- 면접비
- 면접질문
- 투포인터 연습
- BFS
- MySQL
- node.js
- 서버점검
- 최소공통조상
- 동적프로그래밍
- 투포인터
- 다이나밍프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |