CS/Data Structure & algorithm
2024.07.06
문제https://www.acmicpc.net/problem/4992 풀이1. Node.js(fs)const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');let index = 0;while (true) { const [n, r] = input[index++].split(' ').map(Number); if (n === 0 && r === 0) break; let deck = Array.from({length: n}, (_, i) => n - i); for (let i = 0; i 2. Node.js(readLine)const readline = require('..
CS/Data Structure & algorithm
2024.07.03
문제https://www.acmicpc.net/problem/4949풀이1. Node.js(fs)const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');function isBalanced(str) { const stack = []; const openBrackets = ['(', '[']; const closeBrackets = [')', ']']; const pairs = { ')': '(', ']': '[' }; for (let char of str) { if (openBrackets.includes(char)) { sta..
Programming Language/CSS
2024.07.02
최근 토스에서 Frontend Accelerator 1기를 모집하여, 신청하여 객관식 시험을 볼 수 있었는데,모두 골라야한다는 점이 확실히 알고 있어야하는 것인데, 100% 확신하는가라고 생각했던 문제가 거의 없었던 것 같다.그 중 텍스트 줄바꿈 속성에 관한 문제도 있었어서, 적어보려고 한다.텍스트 줄바꿈 방법 1. white-space <div class="text-container"> This is a long text that we want to wrap naturally to the next line without breaking words.</div> .text-container { width: 200px; white-space: normal; /* 기본값 */}..
CS/Data Structure & algorithm
2024.07.02
문제https://www.acmicpc.net/problem/4889 풀이1. Node.js(fs)const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');const numCases = parseInt(input[0]);function evaluateExpression(expr) { const stack = []; for (let i = 0; i 2. Node.js(readLine)const readline = require('readline');const rl = readline.createInterface({ input: process.stdin, output..
닫기
단축키
내 블로그
내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W
블로그 게시글
글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C
모든 영역
이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /
* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.