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