Last active
November 19, 2022 13:36
-
-
Save ivandashk/97274630f6d7d2cddd6a3feb779e8157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function solve() { | |
} | |
function main() { | |
const numOfCases = rlsn(); | |
for (let testCase = 0; testCase < numOfCases; testCase++) { | |
const l1 = rlsn(); | |
const l2 = rlarrn(); | |
const l3 = rlarrstr(); | |
solve(l1, l2, l3); | |
} | |
} | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf-8'); | |
let inStr = ''; | |
let curLine = 0; | |
const cl = console.log; | |
process.stdin.on('data', function(inStdin) {inStr += inStdin;}); | |
process.stdin.on('end', function() {inStr = inStr.split('\n');main();}); | |
function readline() {return inStr[curLine++].replace(/\s+$/g, '');} | |
function rlsn() {return Number(readline());} | |
function rlarrstr() {return readline().split(' ');} | |
function rlarrn() {return rlarrstr().map(Number);} | |
function makeFreqMap(str) {const m={};for (let char of str) m[char]=m[char]+1||1;return m;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment