https://www.acmicpc.net/problem/1920 1920번: 수 찾기 첫째 줄에 자연수 N(1 ≤ N ≤ 100,000)이 주어진다. 다음 줄에는 N개의 정수 A[1], A[2], …, A[N]이 주어진다. 다음 줄에는 M(1 ≤ M ≤ 100,000)이 주어진다. 다음 줄에는 M개의 수들이 주어지는데, 이 수들 www.acmicpc.net const fs = require('fs'); const input = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const A = input[1].split(' ').map(v=>+v); const B = input[3].split(' ').map(v=>+v); A.sort((a,..
https://www.acmicpc.net/problem/1780 1780번: 종이의 개수 N×N크기의 행렬로 표현되는 종이가 있다. 종이의 각 칸에는 -1, 0, 1 중 하나가 저장되어 있다. 우리는 이 행렬을 다음과 같은 규칙에 따라 적절한 크기로 자르려고 한다. 만약 종이가 모두 같은 수 www.acmicpc.net 재귀로 풀었음. 앞에 색종이 만들기랑 똑같은 문제인줄 알고 큐로 풀려고 했는데 메모리 초과가 나와서 재귀로 바꿨음. const fs = require('fs'); const [n,...arr] = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const N = +n const board = arr.map(v=>v.split..
https://www.acmicpc.net/problem/1992 1992번: 쿼드트리 첫째 줄에는 영상의 크기를 나타내는 숫자 N 이 주어진다. N 은 언제나 2의 제곱수로 주어지며, 1 ≤ N ≤ 64의 범위를 가진다. 두 번째 줄부터는 길이 N의 문자열이 N개 들어온다. 각 문자열은 0 또 www.acmicpc.net 스택으로 풀었음. const fs = require('fs'); const [n,...arr] = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const N = +n const board = arr.map(v=>v.split('').map(v=>+v)) class Node{ constructor(item){ this.i..
https://www.acmicpc.net/problem/2630 2630번: 색종이 만들기 첫째 줄에는 전체 종이의 한 변의 길이 N이 주어져 있다. N은 2, 4, 8, 16, 32, 64, 128 중 하나이다. 색종이의 각 가로줄의 정사각형칸들의 색이 윗줄부터 차례로 둘째 줄부터 마지막 줄까지 주어진다. www.acmicpc.net 큐로 풀었음 const fs = require('fs'); const [n,...arr] = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const N = +n const board = arr.map(v=>v.split(' ').map(v=>+v)) class Node{ constructor(item){ ..
https://www.acmicpc.net/problem/5430 5430번: AC 각 테스트 케이스에 대해서, 입력으로 주어진 정수 배열에 함수를 수행한 결과를 출력한다. 만약, 에러가 발생한 경우에는 error를 출력한다. www.acmicpc.net const fs = require('fs'); const [n, ...arr] = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); const N = +n; class Node { constructor(item) { this.item = item; this.prev = null; this.next = null; } } class Deque { constructor() { this.head = ..
https://www.acmicpc.net/problem/1021 1021번: 회전하는 큐 첫째 줄에 큐의 크기 N과 뽑아내려고 하는 수의 개수 M이 주어진다. N은 50보다 작거나 같은 자연수이고, M은 N보다 작거나 같은 자연수이다. 둘째 줄에는 지민이가 뽑아내려고 하는 수의 위치가 www.acmicpc.net 어떤 경우에 앞에서 뒤로 보내야되는지, 뒤에서 앞으로 보내야되는지 잘 모르는데 뽀록으로 맞춤. deque.size()+1>=2*position[0] 이부분 예제 테스트케이스 없었으면 못 맞췄을 듯 . 다시 공부 필요함. const fs = require('fs'); const [a,b] = fs.readFileSync("./dev/stdin").toString().trim().split("\n..
class Node{ constructor(item){ this.item = item; this.prev = null; this.next = null; } } class Deque{ constructor(){ this.head = null; this.tail = null; this.length = 0; } push_front(item){ const node = new Node(item); if(this.size()==0){ this.head = node; this.tail = node; }else{ this.head.prev = node; node.next=this.head; this.head = node; } this.length+=1; } push_back(item){ const node = new ..
https://www.acmicpc.net/problem/10866 10866번: 덱 첫째 줄에 주어지는 명령의 수 N (1 ≤ N ≤ 10,000)이 주어진다. 둘째 줄부터 N개의 줄에는 명령이 하나씩 주어진다. 주어지는 정수는 1보다 크거나 같고, 100,000보다 작거나 같다. 문제에 나와있지 www.acmicpc.net const fs = require('fs'); const [n, ...arr] = fs.readFileSync("./dev/stdin").toString().trim().split("\n"); class Node{ constructor(item){ this.item = item; this.prev = null; this.next = null; } } class Deque{ cons..
- Total
- Today
- Yesterday
- 롱베케이션
- 면접질문
- DB 생성
- create databases;
- MySQL
- node.js
- 동적프로그래밍
- 로드나인
- MOD
- 최소공통조상
- create db
- 서버점검
- 개발자면접
- 투포인터
- 서버개발
- 다이나믹프로그래밍
- BFS
- 은둔청년체험
- 면접비
- 그래프
- 투포인터 연습
- 다이나밍프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 |
30 | 31 |