
CS/Data Structure & algorithm
[Algorithm] 백준 2841 - 외계인의 기타 연주 (Node / C#)
문제https://www.acmicpc.net/problem/2841풀이1. Node.js(fs)const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim().split('\n');// 첫 번째 줄에서 음의 수 N과 프렛의 수 P를 파싱const [N, P] = input[0].split(' ').map(Number);// 각 줄별로 프렛을 누르고 있는 상태를 저장할 배열const strings = Array.from({ length: 7 }, () => []);let fingerMoves = 0;// 각 음을 처리for (let i = 1; i 0 && strings[string][strings[string]..