const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); function minCost() { let input = ""; rl.on("line", (line) => { input += line + " "; }); rl.on("close", () => { const d...