turz0ahsan's blog

By turz0ahsan, history, 3 years ago, In English
/*
** <problem_number> - <problem_title>
*/

// Common Template Starts //
//*
process.stdin.resume();
process.stdin.setEncoding("utf-8");

let inputString = "";
let currentLine = 0;

process.stdin.on("data", (inputStdin) => {
    inputString += inputStdin;
});

process.stdin.on("end", (_) => {
    inputString = inputString
        .trim()
        .split("\n")
        .map((string) => {
            return string.trim();
        });

    main();
});

function readline() {
    return inputString[currentLine++];
}
// Common Template Ends //


// LIBRARY START //

const isOdd = (x) => { return x & 1 }
const isEven = (x) => { return !(x & 1) }

const reverseText = (s) => { return s.split('').reverse().join('') }
const hasDuplicates = (str) => (/([a-z])\1/i).test(str)

const hasDuplicateChar = (str, char) => str.indexOf(char) !== str.lastIndexOf(char)

const sort = arr => arr.sort( (a, b) =>  a - b )
const isSorted = arr => arr.every((v, i, a) => !i || a[i - 1] <= v)

const findAllIndicesOfChar = (str, char) => {
    str = str.split('')
    let indices = [];
    for (let i = 0; i < str.length; i++) {
        if (str[i] === char) indices.push(i);
    }
    return indices
}

const splitAt = index => x => [x.slice(0, index), x.slice(index)]

const isUpper = str => !/[a-z]/.test(str) && /[A-Z]/.test(str)

const escapeRegExp = (string) => string.replace(/[.*+\-?^$$${}()|[\]\\]/g, '\\$$$&')

const replaceAll = (str, find, replace) => str.replace(new RegExp(escapeRegExp(find), 'g'), replace)

const findUnique = (str) => {
    return [...str].reduce((acc, curr) => {
        return acc.includes(curr) ? acc : acc + curr;
    }, "")
}

const unique = (str) => {
    const cleanStr = str.replace(/ /gi, '');
    const set = [...new Set(cleanStr)];
    return set;
}

const sortASC = (array) => {
	// var numArray = new Uint32Array(array)
	// var numArray = new Int32Array(array)
	var numArray = new Float64Array(array)
	numArray = numArray.sort()
	return numArray
}

const removeDuplicates = (array) => [...new Set(array)]


// LIBRARY END


function main() {
    let input = readline()
    let inputs = readline().split(' ').map(Number)
    
    let result = 0
    console.log( result  )
}
//*/
  • Vote: I like it
  • +13
  • Vote: I do not like it

| Write comment?