[바미] 카드2
·
하루 알고리즘(JS)
문제https://www.acmicpc.net/problem/2164코드const fs = require('fs');const input = fs.readFileSync('/dev/stdin').toString().trim();const N = parseInt(input, 10);class Queue { constructor() { this.queue = []; this.front = 0; this.back = 0; } push(x) { this.queue[this.back++] = x; } shift() { if (this.front !== this.back) { const value = thi..