diff --git a/code_study/Baekjoon/ts/2623.ts b/code_study/Baekjoon/ts/2623.ts new file mode 100644 index 0000000..d811832 --- /dev/null +++ b/code_study/Baekjoon/ts/2623.ts @@ -0,0 +1,34 @@ +export {}; + +const input = require("fs").readFileSync(0).toString().trim().split('\n'); +const [N, M]: number[] = input[0].split(" ").map(Number); + +let graph: number[][] = Array.from({length: N+1}, () => []); +let inDegree: number[] = new Array(N+1).fill(0); +for(let i=1; i<=M; i++) { + const line: number[] = input[i].split(" ").map(Number); + + for(let j=1; j