题目解析
简单的逻辑模拟题。
JS算法源码
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void (async function () {
const n = parseInt(await readline());
const infos = [];
for (let i = 0; i < n; i++) {
infos.push((await readline()).split(" "));
}
const [m, k] = (await readline()).split(" ");
let queryIdx = 0;
switch (m) {
case "D":
queryIdx = 1;
break;
case "A":
queryIdx = 2;
break;
case "T":
q