일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 자바스크립트
- 그래프
- BFS
- 타입 챌린지
- HTTP 완벽 가이드
- Nestjs
- 타입스크립트
- ip
- typescript
- Algorithm
- 프로그래머스 레벨 2
- 소켓
- 알고리즘
- HTTP
- 수학
- TCP
- 문자열
- 프로그래머스
- Crawling
- 레벨 1
- dp
- dfs
- 쉬운 문제
- socket
- Node.js
- 가천대
- 크롤링
- type challenge
- javascript
- 백준
- Today
- Total
목록모든 순열 (2)
kakasoo

// 백준 10819번 차이를 최대로를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { if (isNaN(line)) { const permutation = [...permutations(line.split(" ").map(Number))]; const answer = []; for (let i = 0; i < permutation.length; i++) { let sum = 0; for (let j = 0; j < permutation[i].length - 1; j++)..

// 백준 10974번 모든 순열을 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { const elements = new Array(Number(line)).fill(0).map((el, i) => i + 1); const result = [...permutations(elements)].map((el) => el.join(" ")).sort(); for (const a of result) { console.log(a); } }); /** * * @param {number..