Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
Tags
- TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more:
- ์ต์ ๋์ฒด์ด๋
- ๋ฐฑ์ค 1339๋ฒ nodejs
- ๊ตฌ๋ฆํค
- suspense ๋์์๋ฆฌ
- js ์ค์ฝํ
- js
- suspense ๋น๋๊ธฐ
- ์ค์ฝํ
- ๋ฆฌ์กํธ์ฟผ๋ฆฌ suspense
- emotion RSC
- suspense react-query
- ์ฌ์ฉ์ฑ ๊ฐ์
- ์๋ฐ์คํฌ๋ฆฝํธ ์ค์ฝํ
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง
- js ๋ฌธ์์ด ์์ถ
- ๋ฐฑ์ค 1339๋ฒ ์๋ฐ์คํฌ๋ฆฝํธ
- ํ๋ก๊ทธ๋๋จธ์ค ๋ฌธ์์ด ์์ถ
- next13 emotion
- app router emotion
- ์นด์นด์ค ์ฝํ
- ๋ฐฑ์ค 2108 nodejs
- ๋ฐฑ์ค 1339๋ฒ js
- ๋ฐฑ์ค 2108 ์๋ฐ์คํฌ๋ฆฝํธ
- suspense ๋ณ๋ชฉํ์
- ํ๋ก๊ทธ๋๋จธ์ค ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- emtion app router
- ์๋ฐ์คํฌ๋ฆฝํธ ๋ฌธ์์ด ์์ถ
- js ๊ฑฐ๋ฆฌ๋๊ธฐ ํ์ธํ๊ธฐ
- ๊ตฌ๋ฆํค ์ฑ๋ฆฐ์ง ํ๊ณ
Archives
- Today
- Total
Lennon FE
[๋ฐฑ์ค 6603๋ฒ] ๋ก๋ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) ๋ณธ๋ฌธ
๐ฅ Algorithm/Baekjoon
[๋ฐฑ์ค 6603๋ฒ] ๋ก๋ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs)
Lennon 2022. 2. 6. 18:56728x90
๋ฐ์ํ
https://www.acmicpc.net/problem/6603
const fs = require('fs');
let input = fs
.readFileSync('dev/stdin')
.toString()
.trim()
.split('\n')
.map((v) => v.split(' '));
input.pop();
const getCombinations = function (arr, selectNum) {
const results = [];
if (selectNum === 1) return arr.map((value) => [value]);
arr.forEach((fixed, index) => {
const rest = arr.slice(index + 1);
const combinations = getCombinations(rest, selectNum - 1);
const attached = combinations.map((combination) => [fixed, ...combination]);
results.push(...attached);
});
return results;
};
input = input.map((v) => v.slice(1));
for (let i = 0; i < input.length; i++) {
getCombinations(input[i], 6).forEach((v) => {
console.log(v.join(' '));
});
console.log('');
}
์กฐํฉ์ ์ฌ์ฉํด ์ฝ๊ฒ ํ ์ ์๋ค.
728x90
๋ฐ์ํ
'๐ฅ Algorithm > Baekjoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค 1062๋ฒ] ๊ฐ๋ฅด์นจ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) (0) | 2022.02.11 |
---|---|
[๋ฐฑ์ค 3085๋ฒ] ์ฌํ๊ฒ์ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) (0) | 2022.02.06 |
[๋ฐฑ์ค 1920๋ฒ] ์ ์ฐพ๊ธฐ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) (0) | 2022.02.03 |
[๋ฐฑ์ค 10816๋ฒ] ์ซ์ ์นด๋2 - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) (0) | 2022.02.03 |
[๋ฐฑ์ค 14719๋ฒ] ๋น๋ฌผ - ์๋ฐ์คํฌ๋ฆฝํธ(nodejs) (0) | 2022.01.28 |
Comments