Skip to content

Instantly share code, notes, and snippets.

@ivandashk
Last active November 19, 2022 13:36
Show Gist options
  • Save ivandashk/97274630f6d7d2cddd6a3feb779e8157 to your computer and use it in GitHub Desktop.
Save ivandashk/97274630f6d7d2cddd6a3feb779e8157 to your computer and use it in GitHub Desktop.
'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