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

// 백준 1182번 부분 수열의 합을 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const combinations = function* (elements, selectNumber) { for (let i = 0; i < elements.length; i++) { if (selectNumber === 1) { yield [elements[i]]; } else { const fixed = elements[i]; const rest = elements.slice(i + 1); for (const a of combin..

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 #include using namespace std; int n, s, sum, counted; int arr[21]; bool visited[21]; void dfs (int start) { visited[start] = true; int cur = start; sum += arr[start]; if (sum == s) { counted++; } for (int i = start + 1; i > n >> s; for (int i = 0; i > arr[i]; for (i..