You are given a following process. There is a platform with $$$n$$$ columns. $$$1 \times 1$$$ squares are appearing one after another in some columns on this platform. If there are no squares in the column, a square will occupy the bottom row. Otherwise a square will appear at the top of the highest square of this column. When all of the $$$n$$$ columns have at least one square in them, the bottom row is being removed. You will receive $$$1$$$ point for this, and all the squares left will fall down one row. You task is to calculate the amount of points you will receive.

The first line of input contain 2 integer numbers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 1000$$$) — the length of the platform and the number of the squares. The next line contain $$$m$$$ integer numbers $$$c_1, c_2, \dots, c_m$$$ ($$$1 \le c_i \le n$$$) — column in which $$$i$$$-th square will appear.

NoteIn the sample case the answer will be equal to $$$2$$$ because after the appearing of $$$6$$$-th square will be removed one row (counts of the squares on the platform will look like $$$[2~ 3~ 1]$$$, and after removing one row will be $$$[1~ 2~ 0]$$$).After the appearing of $$$9$$$-th square counts will be $$$[2~ 3~ 1]$$$, and after removing one row it will look like $$$[1~ 2~ 0]$$$.So the answer will be equal to $$$2$$$.

var isNodeJS = false;
// isNodeJS = !isNodeJS;
var doWork = (readline, print) => {
var readInts = () => {
    return readline().split(" ").map(function(x) { return parseInt(x); });
};
/////////////////////////////////////////////////////////////// BEGIN

var nums = readInts();
var n = nums[0];
var m = nums[1];

var a = readInts();
var b = new Array(n).fill(0);
var result = 0;
a.forEach(c => {
    --c;
    b[c]++;
    var allFilled = true;
    b.forEach(v => {
        if (v == 0) allFilled = false;
    });
    if (allFilled) {
        ++result;
        for (var i = 0; i < n; ++i) {
            b[i]--;
        }
    }
});

print(result + "\n");

/////////////////////////////////////////////////////////////// END OF CODE
};

if (isNodeJS) {
    var stdin = process.stdin;
    var stdout = process.stdout;
    var lines, currentLine = 0;
    stdin.resume();
    stdin.once('data', function(data) {
        data = data.toString().trim();
        lines = data.split("\n");
        var readline = () => {
            return lines[currentLine++];
        };
        doWork(readline, stdout.write.bind(stdout));
    });
} else {
    doWork(readline, print);
}

// You are given a following process.

// There is a platform with n columns. 1 × 1 squares are appearing one after another in some columns on this platform. If there are no squares in the column, a square will occupy the bottom row. Otherwise a square will appear at the top of the highest square of this column.

// When all of the n columns have at least one square in them, the bottom row is being removed. You will receive 1 point for this, and all the squares left will fall down one row.

// You task is to calculate the amount of points you will receive.
// Input

// The first line of input contain 2 integer numbers n and m (1 ≤ n, m ≤ 1000) — the length of the platform and the number of the squares.

// The next line contain m integer numbers c1, c2, ..., cm (1 ≤ ci ≤ n) — column in which i-th square will appear.
// Output

// Print one integer — the amount of points you will receive.

var input1 = readline();
var input2 = readline();

input1Arr = input1.split(' ');
squareArray = input2.split(' ');

var nColumn = input1Arr[0];
var totalSquare = squareArray[1];

var countN = [];
var count = 0;

for (var i = 1; i <= nColumn; i++) {
  count = 0;
  for (var j = 0; j < squareArray.length; j++) {
    if (squareArray[j] == i) {
      count += 1;
    }
  }
  countN.push(count);
}

var min = countN.reduce(function(current, acc) {
  return ( current < acc ? current : acc);
});

print(min);

function main() {
  var n = Number(readline().split(' ')[0]);
  var squares = readline()
    .split(' ')
    .map(l => Number(l));
  var stacked = new Array(n).fill(0);

  for (var i = 0; i < squares.length; i++) {
    stacked[squares[i] - 1] += 1;
  }

  print(Math.min(...stacked));
}

main();

var g = readline().split(" ");
var k = readline().split(" ");
var min = 0;
var arr = [];
for(i=1;i<=Number(g[0]);i++){
    arr[i] = 0;
}

for(i=0;i<k.length;i++){
    arr[k[i]]++;
}

var flag = true;
for(b=1;b<=arr.length;b++){
    if(arr[b] == 0){
        flag = false;
        break;
    }
}

if(flag){
    min = arr[1];
    for(b=2;b<=arr.length;b++){
        if(min > arr[b])
            min = arr[b];
    }
}
print(min);

let _inputLines;
let _lineNumber = 0;
let inputReader = _inputReader ();

function _main() {

	_inputLines = _inputData.trim().split('\n').map((string) => {
		return string.trim();
	});;
	let[a,b] = inputReader.readNumberArray();
	let count = 0,x1=0,x2=0,x3=0;
	let arr = inputReader.readNumberArray();
	let res= [];
	for(let i =0;i<a;i++){
		res[i]=0;
	}
	for(let i =0;i<arr.length;i++){
		res[arr[i]-1]++;
	}
	//console.log(res);
	let value =Math.min(...res);
	console.log(value);

}

var _inputData = '';
function cacheInput(data) {
	_inputData += data;
}

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', cacheInput).on('end', _main);

function _inputReader () {
	function readNumberArray(){
		return _inputLines[_lineNumber++].split(' ').map(val => Number(val));
	}

	return {
		readNumberArray,
	}
}


In one little known, but very beautiful country called Waterland, lives a lovely shark Valerie. Like all the sharks, she has several rows of teeth, and feeds on crucians. One of Valerie's distinguishing features is that while eating one crucian she uses only one row of her teeth, the rest of the teeth are "relaxing".For a long time our heroine had been searching the sea for crucians, but a great misfortune happened. Her teeth started to ache, and she had to see the local dentist, lobster Ashot. As a professional, Ashot quickly relieved Valerie from her toothache. Moreover, he managed to determine the cause of Valerie's developing caries (for what he was later nicknamed Cap).It turned that Valerie eats too many crucians. To help Valerie avoid further reoccurrence of toothache, Ashot found for each Valerie's tooth its residual viability. Residual viability of a tooth is a value equal to the amount of crucians that Valerie can eat with this tooth. Every time Valerie eats a crucian, viability of all the teeth used for it will decrease by one. When the viability of at least one tooth becomes negative, the shark will have to see the dentist again. Unhappy, Valerie came back home, where a portion of crucians was waiting for her. For sure, the shark couldn't say no to her favourite meal, but she had no desire to go back to the dentist. That's why she decided to eat the maximum amount of crucians from the portion but so that the viability of no tooth becomes negative. As Valerie is not good at mathematics, she asked you to help her to find out the total amount of crucians that she can consume for dinner.We should remind you that while eating one crucian Valerie uses exactly one row of teeth and the viability of each tooth from this row decreases by one.

The first line contains three integers n, m, k (1 ≤ m ≤ n ≤ 1000, 0 ≤ k ≤ 106) — total amount of Valerie's teeth, amount of tooth rows and amount of crucians in Valerie's portion for dinner. Then follow n lines, each containing two integers: r (1 ≤ r ≤ m) — index of the row, where belongs the corresponding tooth, and c (0 ≤ c ≤ 106) — its residual viability. It's guaranteed that each tooth row has positive amount of teeth.

In the first line output the maximum amount of crucians that Valerie can consume for dinner.

'use strict'

let lll = readline().split(' ').map(v => parseInt(v))
let N = lll[0]
let M = lll[1]
let K = lll[2]

let c = 0
let rs = []

while (lll = readline()) {
  lll = lll.split(' ').map(v => parseInt(v))
  let r = lll[0]
  let l = lll[1]
  if (!rs[r]) rs[r] = []
  rs[r].push(l)
}

for (let i = 1; i < rs.length; i++) {
  c += rs[i].reduce((r, v) => Math.min(r, v), Infinity)
}

print(Math.min(c, K))

const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

var n,m,k,indicator=0,temp=[],dict={};
rl.on('line', (input) => {
     if (indicator==0){
        temp = input.split(' ').map(item=>parseInt(item));// "5 7 8" => |"5"|"7"|"8"| => |5|7|8|
        n = temp[0], m = temp[1], k = temp[2];
        indicator++;
     } else {
        temp = input.split(' ').map(item=>parseInt(item));
        let row=temp[0], viability = temp[1];
        if(row in dict && dict[row]>viability  ||  !(row in dict))
            dict[row]=viability;
     }
  }).on('close',function(){
    let _sum = Object.values(dict).reduce((x,y)=>{
        return x+y;
      });
      console.log(_sum>k ? k : _sum);
  });


Fishingprince is playing with an array $$$[a_1,a_2,\dots,a_n]$$$. He also has a magic number $$$m$$$.He can do the following two operations on it:  Select $$$1\le i\le n$$$ such that $$$a_i$$$ is divisible by $$$m$$$ (that is, there exists an integer $$$t$$$ such that $$$m \cdot t = a_i$$$). Replace $$$a_i$$$ with $$$m$$$ copies of $$$\frac{a_i}{m}$$$. The order of the other elements doesn't change. For example, when $$$m=2$$$ and $$$a=[2,3]$$$ and $$$i=1$$$, $$$a$$$ changes into $$$[1,1,3]$$$.  Select $$$1\le i\le n-m+1$$$ such that $$$a_i=a_{i+1}=\dots=a_{i+m-1}$$$. Replace these $$$m$$$ elements with a single $$$m \cdot a_i$$$. The order of the other elements doesn't change. For example, when $$$m=2$$$ and $$$a=[3,2,2,3]$$$ and $$$i=2$$$, $$$a$$$ changes into $$$[3,4,3]$$$. Note that the array length might change during the process. The value of $$$n$$$ above is defined as the current length of the array (might differ from the $$$n$$$ in the input).Fishingprince has another array $$$[b_1,b_2,\dots,b_k]$$$. Please determine if he can turn $$$a$$$ into $$$b$$$ using any number (possibly zero) of operations.

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 10^4$$$). Description of the test cases follows. The first line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$1\le n\le 5\cdot 10^4$$$, $$$2\le m\le 10^9$$$). The second line of each test case contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$1\le a_i\le 10^9$$$). The third line of each test case contains one integer $$$k$$$ ($$$1\le k\le 5\cdot 10^4$$$). The fourth line of each test case contains $$$k$$$ integers $$$b_1,b_2,\ldots,b_k$$$ ($$$1\le b_i\le 10^9$$$). It is guaranteed that the sum of $$$n+k$$$ over all test cases does not exceed $$$2\cdot 10^5$$$.

For each testcase, print Yes if it is possible to turn $$$a$$$ into $$$b$$$, and No otherwise. You can print each letter in any case (upper or lower).

NoteIn the first test case of the sample, we can do the second operation with $$$i=2$$$: $$$[1,\color{red}{2,2},4,2]\to [1,\color{red}{4},4,2]$$$.In the second testcase of the sample, we can:  do the second operation with $$$i=2$$$: $$$[1,\color{red}{2,2},8,2,2]\to [1,\color{red}{4},8,2,2]$$$.  do the second operation with $$$i=4$$$: $$$[1,4,8,\color{red}{2,2}]\to [1,4,8,\color{red}{4}]$$$.  do the first operation with $$$i=3$$$: $$$[1,4,\color{red}{8},4]\to [1,4,\color{red}{4,4},4]$$$.  do the second operation with $$$i=2$$$: $$$[1,\color{red}{4,4},4,4]\to [1,\color{red}{8},4,4]$$$.  do the second operation with $$$i=3$$$: $$$[1,8,\color{red}{4,4}]\to [1,8,\color{red}{8}]$$$.  do the second operation with $$$i=2$$$: $$$[1,\color{red}{8,8}]\to [1,\color{red}{16}]$$$.

'use strict';

function solve(n, m, k, a, b) {
  const s1 = a.reduce((a, b) => a + b, 0),
        s2 = b.reduce((a, b) => a + b, 0);
  if (s1 !== s2) return 'NO';
  const sa = [],
        sb = [];
  for (let i = 0, j = 0; (i < n || sa.length) && (j < k || sb.length);) {
    if (i < n && !sa.length) sa.push([a[i++], 1]);
    if (j < k && !sb.length) sb.push([b[j++], 1]);
    while (sa.length && sb.length) {
      const la = sa[sa.length - 1],
            lb = sb[sb.length - 1];
      if (la[0] === lb[0]) {
        const min = Math.min(la[1], lb[1]);
        la[1] -= min;
        lb[1] -= min;
        if (!la[1]) sa.pop();
        if (!lb[1]) sb.pop();
      } else if (la[0] > lb[0]) {
        if (la[0] % m !== 0) return 'NO';
        la[0] /= m;
        la[1] *= m;
      } else {
        if (lb[0] % m !== 0) return 'NO';
        lb[0] /= m;
        lb[1] *= m;
      }
    }
  }
  if (sa.length || sb.length) return 'NO';
  return 'YES';
}

async function main(read) {
  try {
    let t = Number(await read());
    let res = new Array(t);
    for (let i = 0; i < t; i++) {
      const [n, m] = (await read()).split(' ').map(Number);
      const a = (await read()).split(' ').map(Number);
      const k = Number(await read());
      const b = (await read()).split(' ').map(Number);
      res[i] = solve(n, m, k, a, b);
    }
    return res.join('\n');
  } catch (error) {
    console.log(error);
  }
}

let inputs,
    str = '';
function read() {
  return inputs.next().value.trim();
}
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', input => str += input);
process.stdin.on('end', async () => {
  inputs = str.split('\n').values();
  const output = await main(read);
  process.stdout.write(output);
});

'use strict';

function solve(n, m, k, a, b) {
  const s1 = a.reduce((a, b) => a + b, 0),
        s2 = b.reduce((a, b) => a + b, 0);
  if (s1 !== s2) return 'NO';
  const sa = [],
        sb = [];
  for (let i = 0, j = 0; i < n && j < k;) {
    if (!sa.length) sa.push([a[i++], 1]);
    if (!sb.length) sb.push([b[j++], 1]);
    while (sa.length && sb.length) {
      const la = sa[sa.length - 1],
            lb = sb[sb.length - 1];
      if (la[0] === lb[0]) {
        const min = Math.min(la[1], lb[1]);
        la[1] -= min;
        lb[1] -= min;
        if (!la[1]) sa.pop();
        if (!lb[1]) sb.pop();
      } else if (la[0] > lb[0]) {
        if (la[0] % m !== 0) return 'NO';
        la[0] /= m;
        la[1] *= m;
      } else {
        if (lb[0] % m !== 0) return 'NO';
        lb[0] /= m;
        lb[1] *= m;
      }
    }
  }
  return 'YES';
}

async function main(read) {
  try {
    let t = Number(await read());
    let res = new Array(t);
    for (let i = 0; i < t; i++) {
      const [n, m] = (await read()).split(' ').map(Number);
      const a = (await read()).split(' ').map(Number);
      const k = Number(await read());
      const b = (await read()).split(' ').map(Number);
      res[i] = solve(n, m, k, a, b);
    }
    return res.join('\n');
  } catch (error) {
    console.log(error);
  }
}

let inputs,
    str = '';
function read() {
  return inputs.next().value.trim();
}
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', input => str += input);
process.stdin.on('end', async () => {
  inputs = str.split('\n').values();
  const output = await main(read);
  process.stdout.write(output);
});


You are given a number $$$n$$$ and an array $$$b_1, b_2, \ldots, b_{n+2}$$$, obtained according to the following algorithm:   some array $$$a_1, a_2, \ldots, a_n$$$ was guessed;  array $$$a$$$ was written to array $$$b$$$, i.e. $$$b_i = a_i$$$ ($$$1 \le i \le n$$$);  The $$$(n+1)$$$-th element of the array $$$b$$$ is the sum of the numbers in the array $$$a$$$, i.e. $$$b_{n+1} = a_1+a_2+\ldots+a_n$$$;  The $$$(n+2)$$$-th element of the array $$$b$$$ was written some number $$$x$$$ ($$$1 \le x \le 10^9$$$), i.e. $$$b_{n+2} = x$$$; The  array $$$b$$$ was shuffled. For example, the array $$$b=[2, 3, 7, 12 ,2]$$$ it could be obtained in the following ways:   $$$a=[2, 2, 3]$$$ and $$$x=12$$$;  $$$a=[3, 2, 7]$$$ and $$$x=2$$$. For the given array $$$b$$$, find any array $$$a$$$ that could have been guessed initially.

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$). Then $$$t$$$ test cases follow. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$). The second row of each test case contains $$$n+2$$$ integers $$$b_1, b_2, \ldots, b_{n+2}$$$ ($$$1 \le b_i \le 10^9$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.

For each test case, output:    "-1", if the array $$$b$$$ could not be obtained from any array $$$a$$$;  $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$, otherwise.  If there are several arrays of $$$a$$$, you can output any.

var num = readline().split(" ").map(x => parseInt(x)); // num will be an array [1,2,3]

var n = num[0];
for (var index = 0; index < n; index++) {
    var m = readline().split(" ").map((x) => parseInt(x));
    var numbers = readline().split(" ").map((x) => parseInt(x));

    // for (var j = 1; j < numbers.length; j++) {
    //     if (max < numbers[j]) {
    //         max = numbers[j];
    //     }
    // }
    numbers.sort((a, b) => a - b);
    var max = numbers[numbers.length - 1];
        // write(max + ' max \n');
    for (var j = 0; j < numbers.length - 1; j++) {
        max -= numbers[j];
        // write(max + ' max \n');
    }

    var result = [];

    var finded = max * -1;
    var findedIndex = numbers.indexOf(finded);
    if (findedIndex != -1 && findedIndex != numbers.length - 1) {
        // write(findedIndex + ' findedIndex \n');
        numbers.splice(findedIndex, 1);
        numbers.splice(-1, 1);
        result = numbers;
    } else {
        max = numbers[numbers.length - 2];
        for (var j = 0; j < numbers.length - 2; j++) {
            // write(max + ' max \n');
            max -= numbers[j];
        }
        if (max == 0) {
            numbers.splice(-2, 2);
            result = numbers;
        } else {
            result = [-1];
        }

    }

    write(result.join(' ') + '\n');

}

var t = parseInt(readline());

for (var test = 0; test < t; test++) {
    var n = parseInt(readline());
    var arr = readline().split(' ');
    var ans = [];

    var iMax1 = parseInt(arr[0]) >= parseInt(arr[1]) ? 0 : 1;
    var iMax2 = parseInt(arr[0]) >= parseInt(arr[1]) ? 1 : 0;

    for (var i = 2; i < n + 2; i++) {
        if (parseInt(arr[i]) > parseInt(arr[iMax1])) {
            iMax2 = iMax1;
            iMax1 = i;
        } else if (parseInt(arr[i]) > parseInt(arr[iMax2])) {
            iMax2 = i;
        }
    }

    var arrSum = arr.reduce((sum, item) => sum += parseInt(item), 0);

    var testMax = iMax => {
        for (var i = 0; i < n + 2; i++) {
            if (i !== iMax && arrSum - arr[i] - arr[iMax] === parseInt(arr[iMax])) {
                for (var j = 0; j < n + 2; j ++) {
                    if (j !== i && j !== iMax) {
                        ans.push(arr[j]);
                    }
                }
                print(ans.join(' '));
                return true;
            }
        }
    }

    if (!testMax(iMax1)) {
        if (!testMax(iMax2)) {
            print('-1');
        }
    }
}

function solution(n,array) {
  var pointer = 0;
  var result = null;
  var noResult = false;
  var sortedArray = array.sort((a, b) => a - b);

  const firstTotal = [...sortedArray]
    .slice(0, n)
    .reduce((total, currentValue) => total + currentValue);

  if (firstTotal === sortedArray[n] || firstTotal === sortedArray[n + 1]) {
    return [...sortedArray].slice(0, n).join(' ');
  } else if (firstTotal > sortedArray[n] && firstTotal > sortedArray[n + 1]) {
    return -1;
  } else {
    const secondTotal = firstTotal + sortedArray[n];
    var i=0;

    while(i <= n-1 && ((secondTotal - sortedArray[i]) !== sortedArray[n + 1])){
        i++;
    }

    if(i===n){
        return -1;
    }
    return [...sortedArray].slice(0, n+1).filter((item,index)=> index !== i).join(' ');
  }
}

var iteration = parseInt(readline());
for(var i=0; i<iteration; i++){
    print(
        solution(
            parseInt(readline()),
            readline().split(' ').map(x => parseInt(x))
            )
        );
}

var dataitr;
var stdin_input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function (input) { stdin_input += input; });
process.stdin.on("end", function () { dataitr = stdin_input.split('\n').values(); main(); });

const rl = () => dataitr.next().value.trim();
const rn = () => Number(rl());
const ra = () => rl().split(' ');
const rna = () => ra().map(x => Number(x));

function main () {
	let t = rn();
	while (t--) {
		let n = rn();
		let b = rna();

		let have = new Map();
		let sm = 0;
		for (x of b) {
			sm += x;
			have.set(x, 1 + (have.has(x) ? have.get(x) : 0));
		}

		let ans;
		for (let i = 0; !ans && i < n + 2; i++) {
			const x = sm - 2 * b[i];
			if (have.has(x)) {
				if (x == b[i] && have.get(x) < 2)
					continue;
				ans = b.slice();
				ans.splice(ans.indexOf(b[i]), 1);
				ans.splice(ans.indexOf(x), 1);
			}
		}

		console.log(ans ? ans.join(' ') : -1);
	}
}

'use strict';

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++];
}

var maxN = 21
var mod = 1000000007

// Make a Snippet for the code above this and then write your logic in main();

function main() {
  const xx = readline();

  Array(Number(xx)).fill(1).map((t, i) => {
    var n = parseInt(readline());
    // var [x, y] = readline().split(' ').map((x, iii) => {
    //   return parseInt(x)
    // });
    var a = readline().split(' ').map((x, iii) => {
      return BigInt(x)
    })
    n = n + 2
    var sum = 0n
    var object = {}
    for (let j = 0; j < n; j++) {
      sum += a[j]
      if (!object[a[j]]) object[a[j]] = 0
      object[a[j]]++
    }
    var ans = []
    var minus1 = false
    var minus2 = false
    for (let j = 0; j < n; j++) {
      var number = sum - a[j]
      if (number / 2n === a[j] && object[number / 2n] === 1) continue
      if (number % 2n === 0n && object[number / 2n]) {
        for (let i = 0; i < n; i++) {
          if (a[i] === a[j] && !minus1) {
            minus1 = true
            continue
          }
          if (a[i] === number / 2n && !minus2) {
            minus2 = true
            continue
          }
          ans.push(a[i])
        }
        console.log(ans.join(' '))
        return
      }
    }
    console.log(-1)

  })
}

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}
function iInpArr() {
  return readline()
    .trim()
    .split(" ")
    .map((cur) => parseInt(cur));
}
function BInpArr() {
  return readline()
    .trim()
    .split(" ")
    .map((cur) => BigInt(cur));
}
function string() {
  return readline().trim();
}
function stringArr() {
  return readline().trim().split("");
}
function getValue() {
  return parseInt(readline());
}
let mod = BigInt(1e9 + 7);
const solve = () => {
  let t = getValue();
  while (t--) {
    let n = getValue();
    let arr = iInpArr();
    arr.sort((a, b) => a - b);
    let narr = [],
      sum = 0;
    for (let i = 0; i < n; i++) {
      narr.push(arr[i]);
      sum += arr[i];
    }
    if (sum === arr[n] || sum === arr[n + 1]) console.log(narr.join(" "));
    else {
      let flag = true,
        s1 = sum;
      for (let i = n - 1; i >= 0; i--) {
        s1 = sum + arr[n];
        s1 -= narr[i];
        if (s1 === arr[n + 1]) {
          narr[i] = arr[n];
          console.log(narr.join(" "));
          flag = false;
          break;
        }
      }
      if (flag) console.log(-1);
    }
  }
};
solve();

'use strict';
const readline = require('readline');
const util = require('util');
const rl = readline.createInterface({
    input: process.stdin,
});
let pos = 0;
const words = [];
rl.on('line', (line) => {
    words.push.apply(words, line.split(' ').filter(s => s != ''));
});
rl.on('close', main);
function check(b) {
    if (!b) {
        process.stderr.write(`${new Error().stack}\n`);
        process.exit(-1);
    }
}
function printf(...args) {
    process.stdout.write(util.format(...args));
}
function nextInt() {
    return Math.trunc(Number(words[pos++]));
}
function nextStr() {
    return words[pos++];
}
function af(l) {
    return Array.from({ length: l });
}
const INIT = -1;
let n;
let b;
function solve() {
    b.sort((x, y) => x - y);
    let mx = b[b.length - 1];
    let sum = 0;
    for (let i = 0; i < b.length; i++) {
        sum += b[i];
    }
    for (let i = 0; i + 1 < b.length; i++) {
        const rem = sum - b[i];
        if (rem % 2 != 0) {
            continue;
        }
        if (mx * 2 == rem) {
            const t = b[b.length - 2];
            b[b.length - 2] = b[i];
            b[i] = t;
            return true;
        }
    }
    let x = b[b.length - 1];
    mx = b[b.length - 2];
    if (mx * 2 + x == sum) {
        return true;
    }
    return false;
}
function main() {
    let tc = nextInt();
    while (tc-- > 0) {
        n = nextInt();
        b = af(n + 2);
        for (let i = 0; i < n + 2; i++) {
            b[i] = nextInt();
        }
        if (solve()) {
            for (let i = 0; i < n; i++) {
                printf("%d ", b[i]);
            }
            printf("\n");
        }
        else {
            printf("%d\n", INIT);
        }
    }
}

var num = readline().split(" ").map(x => parseInt(x)); // num will be an array [1,2,3]

var n = num[0];
for (var index = 0; index < n; index++) {
    var m = readline().split(" ").map((x) => parseInt(x));
    var numbers = readline().split(" ").map((x) => parseInt(x));

    // for (var j = 1; j < numbers.length; j++) {
    //     if (max < numbers[j]) {
    //         max = numbers[j];
    //     }
    // }
    numbers.sort((a, b) => a - b);
    var max = numbers[numbers.length - 1];
        // write(max + ' max \n');
    for (var j = 0; j < numbers.length - 1; j++) {
        max -= numbers[j];
        // write(max + ' max \n');
    }

    var result = [];

    var finded = max * -1;
    var findedIndex = numbers.indexOf(finded);
    if (findedIndex != -1 && findedIndex != numbers.length - 1) {
        // write(findedIndex + ' findedIndex \n');
        numbers.splice(findedIndex, 1);
        numbers.splice(-1, 1);
        result = numbers;
    } else {
        max = numbers[numbers.length - 2];
        for (var j = 0; j < numbers.length - 1; j++) {
            // write(max + ' max \n');
            max -= numbers[j];
        }
        if (max == 0) {
            numbers.splice(-2, 2);
            result = numbers;
        } else {
            result = [-1];
        }

    }

    write(result.join(' ') + '\n');

}

var num = readline().split(" ").map(x => parseInt(x)); // num will be an array [1,2,3]

var n = num[0];
for (var index = 0; index < n; index++) {
    var m = readline().split(" ").map((x) => parseInt(x));
    var numbers = readline().split(" ").map((x) => parseInt(x));

    // for (var j = 1; j < numbers.length; j++) {
    //     if (max < numbers[j]) {
    //         max = numbers[j];
    //     }
    // }
    numbers.sort((a, b) => a - b);
    var max = numbers[numbers.length - 1];
        // write(max + ' max \n');
    for (var j = 0; j < numbers.length - 1; j++) {
        max -= numbers[j];
        // write(max + ' max \n');
    }

    var result = [];

    var finded = max * -1;
    var findedIndex = numbers.indexOf(finded);
    if (findedIndex != -1) {
        // write(findedIndex + ' findedIndex \n');
        numbers.splice(findedIndex, 1);
        numbers.splice(-1, 1);
        result = numbers;
    } else {
        max = numbers[numbers.length - 2];
        for (var j = 0; j < numbers.length - 1; j++) {
            max -= numbers[j];
        }
        if (max == 0) {
            numbers.splice(-2, 2);
            result = numbers;
        } else {
            result = [-1];
        }

    }

    write(result.join(' ') + '\n');

}

var t = parseInt(readline());

for (var test = 0; test < t; test++) {
    var n = parseInt(readline());
    var arr = readline().split(' ');

    var iMax1 = parseInt(arr[0]) >= parseInt(arr[1]) ? 0 : 1;
    var iMax2 = parseInt(arr[0]) >= parseInt(arr[1]) ? 1 : 0;

    for (var i = 2; i < n + 2; i++) {
        if (parseInt(arr[i]) > parseInt(arr[iMax1])) {
            iMax2 = iMax1;
            iMax1 = i;
        } else if (parseInt(arr[i]) > parseInt(arr[iMax2])) {
            iMax2 = i;
        }
    }

    var arrSum = arr.reduce((sum, item) => sum += parseInt(item), 0);

    var testMax = iMax => {
        for (var i = 0; i < n + 2; i++) {
            if (i !== iMax && arrSum - arr[i] - arr[iMax] === parseInt(arr[iMax])) {
                arr.splice(i, 1);
                arr.splice(iMax, 1);
                print(arr.join(' '));
                return true;
            }
        }
    }

    if (!testMax(iMax1)) {
        if (!testMax(iMax2)) {
            print('-1');
        }
    }
}

var dataitr;
var stdin_input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function (input) { stdin_input += input; });
process.stdin.on("end", function () { dataitr = stdin_input.split('\n').values(); main(); });

const rl = () => dataitr.next().value.trim();
const rn = () => Number(rl());
const ra = () => rl().split(' ');
const rna = () => ra().map(x => Number(x));

function main () {
	let t = rn();
	while (t--) {
		let n = rn();
		let b = rna();

		let have = new Map();
		let sm = 0;
		for (x of b) {
			sm += x;
			have.set(x, 1 + (have.has(x) ? have.get(x) : 0));
		}

		let ans;
		for (let i = 0; !ans && i < n + 2; i++) {
			const x = sm - 2 * b[i];
			if (have.has(x)) {
				if (x == b[i] && have.get(x) != 2)
					continue;
				ans = b.slice();
				ans.splice(ans.indexOf(b[i]), 1);
				ans.splice(ans.indexOf(x), 1);
			}
		}

		console.log(ans ? ans.join(' ') : -1);
	}
}

var dataitr;
var stdin_input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function (input) { stdin_input += input; });
process.stdin.on("end", function () { dataitr = stdin_input.split('\n').values(); main(); });

const rl = () => dataitr.next().value.trim();
const rn = () => Number(rl());
const ra = () => rl().split(' ');
const rna = () => ra().map(x => Number(x));

function main () {
	let t = rn();
	while (t--) {
		let n = rn();
		let b = rna();

		let have = new Map();
		let sm = 0;
		for (x of b) {
			sm += x;
			have.set(x, 1 + (have.has(x) ? have.get(x) : 0));
		}

		let ans;
		for (let i = 0; !ans && i < n + 2; i++) {
			const x = sm - 2 * b[i];
			if (have.has(x)) {
				ans = b.slice();
				ans.splice(ans.indexOf(b[i]), 1);
				ans.splice(ans.indexOf(x), 1);
			}
		}

		console.log(ans ? ans.join(' ') : -1);
	}
}

var dataitr;
var stdin_input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function (input) { stdin_input += input; });
process.stdin.on("end", function () { dataitr = stdin_input.split('\n').values(); main(); });

const rl = () => dataitr.next().value.trim();
const rn = () => Number(rl());
const ra = () => rl().split(' ');
const rna = () => ra().map(x => Number(x));

function main () {
	let t = rn();
	while (t--) {
		let n = rn();
		let b = rna();

		let sm = 0;
		for (x of b) sm += x;

		let ans;
		for (let i = 0; !ans && i < n + 2; i++) {
			const x = sm - 2 * b[i];
			for (let j = 0; !ans && j < n + 2; j++)
				if (b[j] == x) {
					ans = b.slice();
					ans.splice(ans.indexOf(b[i]), 1);
					ans.splice(ans.indexOf(b[j]), 1);
				}
		}

		console.log(ans ? ans.join(' ') : -1);
	}
}

'use strict';

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++];
}

var maxN = 21
var mod = 1000000007

// Make a Snippet for the code above this and then write your logic in main();

function main() {
  const xx = readline();

  Array(Number(xx)).fill(1).map((t, i) => {
    var n = parseInt(readline());
    // var [x, y] = readline().split(' ').map((x, iii) => {
    //   return parseInt(x)
    // });
    var a = readline().split(' ').map((x, iii) => {
      return parseInt(x)
    })
    n = n + 2
    var sum = 0
    var object = {}
    for (let j = 0; j < n; j++) {
      sum += a[j]
      object[a[j]] = true
    }
    var ans = []
    var minus1 = false
    var minus2 = false
    for (let j = 0; j < n; j++) {
      var number = sum - a[j]
      if (number % 2 === 0 && object[number / 2]) {
        for (let i = 0; i < n; i++) {
          if (a[i] === a[j] && !minus1) {
            minus1 = true
            continue
          }
          if (a[i] === number / 2 && !minus2) {
            minus2 = true
            continue
          }
          ans.push(a[i])
        }
        console.log(ans.join(' '))
        return
      }
    }
    console.log(-1)

  })
}


There is a river of width $$$n$$$. The left bank of the river is cell $$$0$$$ and the right bank is cell $$$n + 1$$$ (more formally, the river can be represented as a sequence of $$$n + 2$$$ cells numbered from $$$0$$$ to $$$n + 1$$$). There are also $$$m$$$ wooden platforms on a river, the $$$i$$$-th platform has length $$$c_i$$$ (so the $$$i$$$-th platform takes $$$c_i$$$ consecutive cells of the river). It is guaranteed that the sum of lengths of platforms does not exceed $$$n$$$.You are standing at $$$0$$$ and want to reach $$$n+1$$$ somehow. If you are standing at the position $$$x$$$, you can jump to any position in the range $$$[x + 1; x + d]$$$. However you don't really like the water so you can jump only to such cells that belong to some wooden platform. For example, if $$$d=1$$$, you can jump only to the next position (if it belongs to the wooden platform). You can assume that cells $$$0$$$ and $$$n+1$$$ belong to wooden platforms.You want to know if it is possible to reach $$$n+1$$$ from $$$0$$$ if you can move any platform to the left or to the right arbitrary number of times (possibly, zero) as long as they do not intersect each other (but two platforms can touch each other). It also means that you cannot change the relative order of platforms.Note that you should move platforms until you start jumping (in other words, you first move the platforms and then start jumping).For example, if $$$n=7$$$, $$$m=3$$$, $$$d=2$$$ and $$$c = [1, 2, 1]$$$, then one of the ways to reach $$$8$$$ from $$$0$$$ is follow:    The first example: $$$n=7$$$.

The first line of the input contains three integers $$$n$$$, $$$m$$$ and $$$d$$$ ($$$1 \le n, m, d \le 1000, m \le n$$$) — the width of the river, the number of platforms and the maximum distance of your jump, correspondingly. The second line of the input contains $$$m$$$ integers $$$c_1, c_2, \dots, c_m$$$ ($$$1 \le c_i \le n, \sum\limits_{i=1}^{m} c_i \le n$$$), where $$$c_i$$$ is the length of the $$$i$$$-th platform.

If it is impossible to reach $$$n+1$$$ from $$$0$$$, print NO in the first line. Otherwise, print YES in the first line and the array $$$a$$$ of length $$$n$$$ in the second line — the sequence of river cells (excluding cell $$$0$$$ and cell $$$n + 1$$$). If the cell $$$i$$$ does not belong to any platform, $$$a_i$$$ should be $$$0$$$. Otherwise, it should be equal to the index of the platform ($$$1$$$-indexed, platforms are numbered from $$$1$$$ to $$$m$$$ in order of input) to which the cell $$$i$$$ belongs. Note that all $$$a_i$$$ equal to $$$1$$$ should form a contiguous subsegment of the array $$$a$$$ of length $$$c_1$$$, all $$$a_i$$$ equal to $$$2$$$ should form a contiguous subsegment of the array $$$a$$$ of length $$$c_2$$$, ..., all $$$a_i$$$ equal to $$$m$$$ should form a contiguous subsegment of the array $$$a$$$ of length $$$c_m$$$. The leftmost position of $$$2$$$ in $$$a$$$ should be greater than the rightmost position of $$$1$$$, the leftmost position of $$$3$$$ in $$$a$$$ should be greater than the rightmost position of $$$2$$$, ..., the leftmost position of $$$m$$$ in $$$a$$$ should be greater than the rightmost position of $$$m-1$$$. See example outputs for better understanding.

NoteConsider the first example: the answer is $$$[0, 1, 0, 2, 2, 0, 3]$$$. The sequence of jumps you perform is $$$0 \rightarrow 2 \rightarrow 4 \rightarrow 5 \rightarrow 7 \rightarrow 8$$$.Consider the second example: it does not matter how to place the platform because you always can jump from $$$0$$$ to $$$11$$$.Consider the third example: the answer is $$$[0, 0, 0, 0, 1, 1, 0, 0, 0, 0]$$$. The sequence of jumps you perform is $$$0 \rightarrow 5 \rightarrow 6 \rightarrow 11$$$.

process.stdin.resume()
process.stdin.setEncoding('utf-8')

var arr = ''
process.stdin.on('data', (i) => {
  arr += i
})

process.stdin.on('end', () => {
  arr = arr.split('\n')
  const arrq = arr.shift().split(' ').map(a => parseInt(a))
  const c = arr.shift().split(' ').map(a => parseInt(a))//.sort((a,b) => b[0] - a[0])
  const n = arrq[0]
  const m = arrq[1]
  const d = arrq[2]
  let d2 = d
  // console.log(c)

  let ans = new Array(n).fill(0)
  let j = -1
  let float = n - c.reduce((a, b) => a + b, 0)
  for(let i = 0; i < m; i++) {
    if(float > 0) float -= d - 1
    if(float <= 0) d2 = 1
    ans.fill(i + 1, j + d2, j + d2 + c[i])
    j = j + d2 + c[i] - 1
    // console.log(float)
  }
  let last = 0
  for(let i = n - 1; i >= 0; i --) {
    if(ans[i] != 0){
      last = i
      break
    }
  }
  // console.log(ans, last)
  if(last + d >= n) {
    console.log('YES')
    console.log(ans.join(' '))
  }
  else
    console.log('NO')
})

process.stdin.resume()
process.stdin.setEncoding('utf-8')

var arr = ''
process.stdin.on('data', (i) => {
  arr += i
})

process.stdin.on('end', () => {
  arr = arr.split('\n')
  const arrq = arr.shift().split(' ').map(a => parseInt(a))
  const c = arr.shift().split(' ').map((a, i) => [parseInt(a), i]).sort((a,b) => b[0] - a[0])
  const n = arrq[0]
  const m = arrq[1]
  const d = arrq[2]

  let ans = new Array(n).fill(0)
  let j = -1
  for(let i = 0; i < m; i++) {
    ans.fill(c[i][1] + 1, j + d, j + d + c[i][0])
    j = j + d + c[i][0] - 1
  }
  let last = 0
  for(let i = n - 1; i >= 0; i --) {
    if(ans[i] != 0){
      last = i
      break
    }
  }
  // console.log(ans, last)
  if(last + d >= n) {
    console.log('YES')
    console.log(ans.join(' '))
  }
  else
    console.log('NO')
})

process.stdin.resume()
process.stdin.setEncoding('utf-8')

var arr = ''
process.stdin.on('data', (i) => {
  arr += i
})

process.stdin.on('end', () => {
  arr = arr.split('\n')
  const arrq = arr.shift().split(' ').map(a => parseInt(a))
  const c = arr.shift().split(' ').map(a => parseInt(a))//.sort((a,b) => b[0] - a[0])
  const n = arrq[0]
  const m = arrq[1]
  const d = arrq[2]
  // console.log(c)

  let ans = new Array(n).fill(0)
  let j = -1
  for(let i = 0; i < m; i++) {
    ans.fill(i + 1, j + d, j + d + c[i])
    j = j + d + c[i] - 1
  }
  let last = 0
  for(let i = n - 1; i >= 0; i --) {
    if(ans[i] != 0){
      last = i
      break
    }
  }
  // console.log(ans, last)
  if(last + d >= n) {
    console.log('YES')
    console.log(ans.join(' '))
  }
  else
    console.log('NO')
})


There are n piles of pebbles on the table, the i-th pile contains ai pebbles. Your task is to paint each pebble using one of the k given colors so that for each color c and any two piles i and j the difference between the number of pebbles of color c in pile i and number of pebbles of color c in pile j is at most one.In other words, let's say that bi, c is the number of pebbles of color c in the i-th pile. Then for any 1 ≤ c ≤ k, 1 ≤ i, j ≤ n the following condition must be satisfied |bi, c - bj, c| ≤ 1. It isn't necessary to use all k colors: if color c hasn't been used in pile i, then bi, c is considered to be zero.

The first line of the input contains positive integers n and k (1 ≤ n, k ≤ 100), separated by a space — the number of piles and the number of colors respectively. The second line contains n positive integers a1, a2, ..., an (1 ≤ ai ≤ 100) denoting number of pebbles in each of the piles.

If there is no way to paint the pebbles satisfying the given condition, output "NO" (without quotes) . Otherwise in the first line output "YES" (without quotes). Then n lines should follow, the i-th of them should contain ai space-separated integers. j-th (1 ≤ j ≤ ai) of these integers should be equal to the color of the j-th pebble in the i-th pile. If there are several possible answers, you may output any of them.

(function() {
	var line = readline().split(" ").map(function(el) {
		return parseInt(el);
	});
	var n = line[0], k = line[1];
	line = readline().split(" ").map(function(el) {
		return parseInt(el);
	});
	var a = line;
	a.unshift(0);
	var ans = a.map(function() {
		return [];
	});
	for (var i = 1; i <= k; i++) {
		var ok = true;
		while (ok) {
			for (var j = 1; j <= n; j++) {
				if (a[j] == 0) {
					ok = false;
				} else {
					ans[j].push(i);
					a[j]--;
				}
			}
		}
	}
	if (a.every(function(el) {
		return el == 0;
	})) {
		print("YES");
		for (i = 1; i <= n; i++) {
			line = "";
			ans[i].forEach(function(el) {
				line += el + " ";
			});
			print(line);
		}
	} else {
		print("NO");
	}
}());


Little girl Susie accidentally found her elder brother's notebook. She has many things to do, more important than solving problems, but she found this problem too interesting, so she wanted to know its solution and decided to ask you about it. So, the problem statement is as follows.Let's assume that we are given a connected weighted undirected graph G = (V, E) (here V is the set of vertices, E is the set of edges). The shortest-path tree from vertex u is such graph G1 = (V, E1) that is a tree with the set of edges E1 that is the subset of the set of edges of the initial graph E, and the lengths of the shortest paths from u to any vertex to G and to G1 are the same. You are given a connected weighted undirected graph G and vertex u. Your task is to find the shortest-path tree of the given graph from vertex u, the total weight of whose edges is minimum possible.

The first line contains two numbers, n and m (1 ≤ n ≤ 3·105, 0 ≤ m ≤ 3·105) — the number of vertices and edges of the graph, respectively. Next m lines contain three integers each, representing an edge — ui, vi, wi — the numbers of vertices connected by an edge and the weight of the edge (ui ≠ vi, 1 ≤ wi ≤ 109). It is guaranteed that graph is connected and that there is no more than one edge between any pair of vertices. The last line of the input contains integer u (1 ≤ u ≤ n) — the number of the start vertex.

In the first line print the minimum total weight of the edges of the tree. In the next line print the indices of the edges that are included in the tree, separated by spaces. The edges are numbered starting from 1 in the order they follow in the input. You may print the numbers of the edges in any order. If there are multiple answers, print any of them.

NoteIn the first sample there are two possible shortest path trees:  with edges 1 – 3 and 2 – 3 (the total weight is 3);  with edges 1 – 2 and 2 – 3 (the total weight is 2); And, for example, a tree with edges 1 – 2 and 1 – 3 won't be a shortest path tree for vertex 3, because the distance from vertex 3 to vertex 2 in this tree equals 3, and in the original graph it is 1.

function ProblemSolver() {
    this.HAS_TEST_CASES = false;
    this.INPUT_FILE_NAME = "test.in";
    this.OUTPUT_FILE_NAME = "out.txt";
    this.DO_OUTPUT_TO_FILE = false;
    this.CLEAR_ARRAY_PER_CASE = true;

    this.solveCase = function() {
        var res , i , len , u , v , w , sum , temp , que , head , tail , sz , key ;
        res = [] ;
        sum = 0 ;
        for( i = 0 ; i <= this.m ; i++ ) {
        	res.push( 0 ) ;
        }
        head = 0 ;
        tail = 0 ;
        que = [] ;
        que.push( this.source ) ;
        tail++ ;
        this.vis[ this.source ] = 0 ;
        this.brr = {} ;
        while( head < tail ) {
        	u = que[ head ] ;
        	head++ ;
        	sz = this.adj_list[ u ].length ;
        	for( i = 0 ; i < sz ; i++ ) {
        		v = this.adj_list[ u ][ i ].v ;
        		w = this.adj_list[ u ][ i ].w ;
        		key = v ;
        		if( this.vis[ v ] > this.vis[ u ] + w ) {
        			this.vis[ v ] = this.vis[ u ] + w ;
        			if( this.brr[ key ] != null ) {
        				res[ this.brr[ key ] ] = 0 ;
        				sum -= this.crr[ this.brr[ key ] - 1 ].w ;
        			}
        			this.brr[ key ] = this.adj_list[ u ][ i ].idx ;
        			res[ this.brr[ key ] ] = 1 ;
        			sum += this.crr[ this.brr[ key ] - 1 ].w ;
        			que.push( v ) ;
        			tail++ ;
        		}
        		else if( this.vis[ v ] == this.vis[ u ] + w ) {
        			if( this.brr[ key ] != null && this.crr[ this.brr[ key ] - 1 ].w > this.crr[ this.adj_list[ u ][ i ].idx - 1 ].w ) {
        				res[ this.brr[ key ] ] = 0 ;
        				sum -= this.crr[ this.brr[ key ] - 1 ].w ;
        				this.brr[ key ] = this.adj_list[ u ][ i ].idx ;
        				res[ this.brr[ key ] ] = 1 ;
        				sum += this.crr[ this.brr[ key ] - 1 ].w ;
        			}
        		}
        	}
        }
        for( i = 1 ; i <= this.m ; i++ ) {
        	if( res[ i ] == 1 ) {
        		sum += 0 ;
        	}
        }
        print( sum );
        temp = '' ;
        for( i = 1 ; i <= this.m ; i++ ) {
        	if( res[ i ] == 1 ) {
        		if( temp != '' ) {
        			temp += ' ' ;
        		}
        		temp += i ;
        	}
        }
        print( temp );
    };

    this.init = function() {
        this.lim1 = 300010;
        this.lim2 = 110;
        this.cc = 1;
        this.ind = 1;
        this.n = 0;
        this.cn = 0;
        this.declareAndFillArrays();
    };

    this.getInput = function( irObj ) {
        var hasMoreInput , i , obj , u , v , w ;
        hasMoreInput = true;
        try {
            this.n = irObj.nextInt();
            this.m = irObj.nextInt();
            this.crr = [] ;
            for( i = 0 ; i < this.m ; i++ ) {
            	u = irObj.nextInt();
            	v = irObj.nextInt();
            	w = irObj.nextInt();
            	this.crr.push( { u : u , v : v , w : w } ) ;
            	obj = {} ;
             	obj.v = v ;
             	obj.w = w ;
             	obj.idx = i + 1;
                this.adj_list[ u ].push( obj ) ;
                obj = {} ;
             	obj.v = u ;
             	obj.w = w ;
             	obj.idx = i + 1;
                this.adj_list[ v ].push( obj ) ;
            }
            this.source = irObj.nextInt();
        }
        catch( ex ) {
            hasMoreInput = false;
        }
        return hasMoreInput;
    };

    this.clearArraysPerCase = function() {
        var i;
        this.vis = new Array();
        this.brr = new Array() ;
        this.adj_list = new Array();
        for( i = 0 ; i < this.lim1 ; i++ ) {
            this.vis.push( 1e15 ) ;
            this.brr.push( -1 ) ;
            this.adj_list.push( new Array() );
        }
    };

    this.clearPerCase = function() {
        this.cn = 0;
        this.cc++;
        if( this.CLEAR_ARRAY_PER_CASE == true ) {
            this.clearArraysPerCase() ;
        }
    };

    this.declareAndFillArrays = function() {
        var i , j;
        this.srr = new Array();
        this.vis = new Array();
        this.arr = new Array();
        this.pr = new Array() ;
        this.rank = new Array() ;
        this.brr = new Array();
        this.memo = new Array();
        this.done = new Array();
        this.adj_list = new Array();
        for( i = 0 ; i < this.lim1 ; i++ ) {
            this.srr.push( "" );
            this.vis.push( 1e15 ) ;
            this.arr.push( 0 );
            this.brr.push( -1 ) ;
            this.pr.push( i ) ;
            this.rank.push( 0 ) ;
            this.adj_list.push( new Array() );
        }
        for( i = 0 ; i < this.lim2 ; i++ ) {
            this.memo.push( new Array() );
            this.done.push( new Array() );
            for( j = 0 ; j < this.lim2 ; j++ ) {
                this.memo[ i ].push( -1 );
                this.done[ i ].push( 0 );
            }
        }
    };

    this.init();
}

function InputReader() {
    var self = this ;
    this.allLines = new Array();
    this.currrentLineNumber = 0;
    this.currrentCharacterIndex = 0;
    this.callBackFunction = null ;
    this.parentContext = null ;

    this.readAllLines = function() {
        var singleLine;
        while( true ) {
            try {
                singleLine = readline();
                if( singleLine == null ) {
                    break;
                }
            }
            catch( ex ) {
                break;
            }
            this.allLines.push( singleLine );
        }
    };

    this.readAllLinesFromRhino = function() {
        var brObj , line ;
        importPackage( java.io ) ;
        importPackage( java.lang ) ;
        brObj = new BufferedReader( new InputStreamReader( System[ 'in' ] ) ) ;
        this.allLines = [] ;
        while( true ) {
            line = brObj.readLine() ;
            if( line == null ) {
                break;
            }
            this.allLines.push( line ) ;
        }
    };

    this.readSingleLinesFromNodeJsJudgeServer = function( chunk ) {
        self.chunkData += chunk ;
    };

    this.readEndFromNodeJsJudgeServer = function() {
        self.parseRawData( self.chunkData ) ;
        self.parentContext.runCases() ;
    };

    this.readAllLinesFromNodeJsJudgeServer = function( parentContext ) {
        this.parentContext = parentContext ;
        process.stdin.resume() ;
        process.stdin.setEncoding( 'utf8' ) ;
        this.chunkData = '' ;
        process.stdin.on( 'data' , this.readSingleLinesFromNodeJsJudgeServer ) ;
        process.stdin.on( 'end' , this.readEndFromNodeJsJudgeServer ) ;
    };

    this.parseRawData = function( data ) {
        var len , i , currentString;
        len = data.length;
        currentString = "";
        this.allLines = [] ;
        for( i = 0 ; i < len ; i++ ) {
            if( data[ i ] == '\r' ) {
            }
            else if( data[ i ] == '\n' ) {
                this.allLines.push( currentString );
                currentString = "";
            }
            else {
                currentString += data[ i ];
            }
        }
        if( currentString != "" ) {
            this.allLines.push( currentString );
        }
    };

    this.readAllLinesFromFile = function( inputFileName ) {
        var currentDirectory , fsObj , inputFilePath , rawData;
        fsObj = require( 'fs' );
        currentDirectory = __dirname;
        inputFilePath = currentDirectory + "\\" + inputFileName;
        rawData = fsObj.readFileSync( inputFilePath , "utf8" );
        this.parseRawData( rawData );
    };

    this.next = function( flag ) {
        var len , i , startIdx , res , endIdx;
        if( flag == 0 ) {
            if( this.currrentCharacterIndex != 0 ) {
                this.currrentLineNumber++;
                this.currrentCharacterIndex = 0;
            }
            res = "";
            len = this.allLines[ this.currrentLineNumber ].length;
            if( typeof( len ) == 'function' ) {
                len = this.allLines[ this.currrentLineNumber ].length() ;
            }
            for( i = this.currrentCharacterIndex ; i < len ; i++ ) {
                res += '' + this.allLines[ this.currrentLineNumber ].charAt( i ) ;
            }
            this.currrentLineNumber++;
            this.currrentCharacterIndex = 0;
            return res;
        }
        while( true ) {
            if( this.currrentLineNumber >= this.allLines.length ) {
                throw new Error( "No more tokens available!" );
            }
            startIdx = -1;
            len = this.allLines[ this.currrentLineNumber ].length;
            if( typeof( len ) == 'function' ) {
                len = this.allLines[ this.currrentLineNumber ].length() ;
            }
            for( i = this.currrentCharacterIndex ; i < len ; i++ ) {
                if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) != ' '.charCodeAt( 0 ) ) {
                    startIdx = i;
                    break;
                }
            }
            if( startIdx == -1 ) {
                this.currrentLineNumber++;
                this.currrentCharacterIndex = 0;
                continue;
            }
            res = "";
            endIdx = len - 1 ;
            for( i = startIdx ; i < len ; i++ ) {
                if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) == ' '.charCodeAt( 0 ) ) {
                    endIdx = i;
                    break;
                }
                if( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) >= 48 && this.allLines[ this.currrentLineNumber ].charCodeAt( i ) <= 57 ) {
                    res += '' + ( this.allLines[ this.currrentLineNumber ].charCodeAt( i ) - 48 ) ;
                }
                else {
                    res += '' + this.allLines[ this.currrentLineNumber ].charAt( i );
                }
            }
            this.currrentCharacterIndex = endIdx;
            if( endIdx == len - 1 ) {
                this.currrentLineNumber++;
                this.currrentCharacterIndex = 0;
            }
            return res;
        }
    };

    this.nextInt = function() {
        return parseInt( this.next( 1 ) );
    };

    this.nextDouble = function() {
        return parseFloat( this.next( 1 ) );
    };

    this.nextString = function() {
        return this.next( 1 );
    };

    this.nextLine = function() {
        return this.next( 0 );
    };
}

function FileOutputHandler() {
    this.resultantStringArray = new Array();

    this.addNewLine = function( newString ) {
        this.resultantStringArray.push( newString );
    };

    this.clearPercase = function() {
        this.resultantStringArray = new Array();
    };

    this.flushOutOutputToFile = function( outputFileName ) {
        var i , sz , res , currentDirectory , fsObj , outputFilePath;
        res = "";
        sz = this.resultantStringArray.length;
        for( i = 0 ; i < sz ; i++ ) {
            if( i != 0 ) {
                res += "\n";
            }
            res += this.resultantStringArray[ i ];
        }
        fsObj = require( 'fs' );
        currentDirectory = __dirname;
        outputFilePath = currentDirectory + "\\" + outputFileName;
        fsObj.writeFileSync( outputFilePath , res );
        this.clearPercase();
    };
}

function CodeExecutioner() {
    this.irObj = new InputReader();
    this.psObj = new ProblemSolver();
    this.fohObj = new FileOutputHandler();

    this.runCases = function() {
        if( this.psObj.HAS_TEST_CASES == true ) {
            testCases = this.irObj.nextInt();
            for( i = 0 ; i < testCases ; i++ ) {
                this.psObj.clearPerCase();
                this.psObj.getInput( this.irObj );
                this.psObj.solveCase();
            }
        }
        else {
            while( true ) {
                this.psObj.clearPerCase();
                hasMoreTestCases = this.psObj.getInput( this.irObj );
                if( hasMoreTestCases == false ) {
                    break;
                }
                this.psObj.solveCase();
            }
        }
        if( this.psObj.DO_OUTPUT_TO_FILE == true ) {
            this.fohObj.flushOutOutputToFile( this.psObj.OUTPUT_FILE_NAME );
        }
    };

    this.detectEnvironmentType = function() {
        var environmentType = null ;
        try {
            if( importPackage != null ) {
                environmentType = 'rhino' ;
            }
        }
        catch( ex1 ) {
            try {
                //for nodejs local server check
                if( __dirname != null && readline != null && typeof( readline ) != 'function' ) {
                    environmentType = 'local-node-js' ;
                }
            }
            catch( ex2 ) {
                try {
                    if( readline == null || typeof( readline ) != 'function' ) {
                        environmentType = 'server-node-js' ;
                    }
                    else {
                        try {
                            if( Map != null ) {
                                environmentType = 'spider-monkey' ;
                            }
                            else {
                                environmentType = 'javascript-v8' ;
                            }
                        }
                        catch( ex3 ) {
                            environmentType = 'javascript-v8' ;
                        }
                    }
                }
                catch( ex3 ) {
                    environmentType = 'server-node-js' ;
                }
            }
        }
        return environmentType ;
    };

    this.configureStreamsAndReadInput = function() {
        var testCases , i , hasMoreTestCases , isLocal , localContext , isNodeJsJudgeServer , environmentType ;
        isNodeJsJudgeServer = false ;
        environmentType = this.detectEnvironmentType() ;
        if( environmentType == 'local-node-js' ) {
            try {
                if( print == null || typeof( print ) != 'function' ) {
                    print = console.log;
                }
            }
            catch( ex ) {
                print = console.log;
            }
            if( this.psObj.DO_OUTPUT_TO_FILE == true ) {
                localContext = this.fohObj;
                print = function() {
                    localContext.addNewLine.apply( localContext , arguments );
                }
            }
            this.irObj.readAllLinesFromFile( this.psObj.INPUT_FILE_NAME );
            this.runCases() ;
        }
        else if( environmentType == 'server-node-js' ) {
            try {
                if( print == null || typeof( print ) != 'function' ) {
                    print = console.log;
                }
            }
            catch( ex ) {
                print = console.log;
            }
            this.irObj.readAllLinesFromNodeJsJudgeServer( this ) ;
        }
        else if( environmentType == 'javascript-v8' ) {
            this.irObj.readAllLines();
            this.runCases() ;
        }
        else if( environmentType == 'rhino' ) {
            this.irObj.readAllLinesFromRhino();
            this.runCases() ;
        }
        else if( environmentType == 'spider-monkey' ) {
            this.irObj.readAllLines();
            this.runCases() ;
        }
    };

    this.configureStreamsAndReadInput();
}

new CodeExecutioner();


You are given a string $$$s=s_1s_2\dots s_n$$$ of length $$$n$$$, which only contains digits $$$1$$$, $$$2$$$, ..., $$$9$$$.A substring $$$s[l \dots r]$$$ of $$$s$$$ is a string $$$s_l s_{l + 1} s_{l + 2} \ldots s_r$$$. A substring $$$s[l \dots r]$$$ of $$$s$$$ is called even if the number represented by it is even. Find the number of even substrings of $$$s$$$. Note, that even if some substrings are equal as strings, but have different $$$l$$$ and $$$r$$$, they are counted as different substrings.

The first line contains an integer $$$n$$$ ($$$1 \le n \le 65000$$$) — the length of the string $$$s$$$. The second line contains a string $$$s$$$ of length $$$n$$$. The string $$$s$$$ consists only of digits $$$1$$$, $$$2$$$, ..., $$$9$$$.

Print the number of even substrings of $$$s$$$.

NoteIn the first example, the $$$[l, r]$$$ pairs corresponding to even substrings are:   $$$s[1 \dots 2]$$$ $$$s[2 \dots 2]$$$ $$$s[1 \dots 4]$$$ $$$s[2 \dots 4]$$$ $$$s[3 \dots 4]$$$ $$$s[4 \dots 4]$$$ In the second example, all $$$10$$$ substrings of $$$s$$$ are even substrings. Note, that while substrings $$$s[1 \dots 1]$$$ and $$$s[2 \dots 2]$$$ both define the substring "2", they are still counted as different substrings.

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}
	};
}
function myout(s){console.log(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var N = nextInt();
	var list = nextCharArray();
	var output = 0;
	for(var i = 0; i < N; i++){
		if(myconv(list[i], 1) % 2 == 0){
			output += i + 1;
		}
	}
	myout(output);
}

var readline = require('readline');
rl = readline.createInterface({
  input:process.stdin,
  output:process.stdout
})

rl.question('', (answer) => {
  var n = answer,k = 0,count=0
  rl.question('',(line) =>  {
    var str = line;
    for(var i=0;i<str.length;i++){
      if(str[i]%2==0){
        count = i + 1
        k+=count
      }
    }
    console.log(k)
    rl.close()
  })
})

const readline = require('readline');

const rl = readline.createInterface({
	input: process.stdin,
	setEncoding: 'utf8',
	terminal: false
});

const readInput = (function* () {
	const n = Number(yield);
	const s = (yield).trim().split("").map(Number);
	rl.close();
	let x = 0;
	for (let i = n; i > 0; i--) {
		if (s[i - 1] % 2 === 0) x += i;
	}
	console.log(x)
})();

readInput.next();

rl.on('line', (line) => {
	readInput.next(line);
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  let ans = 0;
  const arr = d.split('').map(Number);
  let inc = 0;

  for (let i = arr.length; i >= 0; i--) {
    if (arr[i] % 2 === 0) {
      inc++;
    }

    ans += inc;
  }

  console.log(ans);

  c++;
});

var n = readline();
var a = readline().split('');
var res = 0;
for(var i=0; i<n; i++){
    if(a[i]%2==0){
        res+=i+1;
    }
}
print(res);

// var stats = readline().split(' ').map(function(num) {
//   return parseInt(num);
// })

readline();
var num = readline();
// var num = '1234'
var position = 1;
var global = 0;
for (var i = 0; i < num.length; i++) {
  if (parseInt(num[i]) % 2 === 0) {
    global += position;
  }

  position++;
}

write(global + '');

var readline = require('readline');
rl = readline.createInterface({
  input:process.stdin,
  output:process.stdout
})

rl.question('', (answer) => {
  var n = answer,k = 0,r = 0,i = 0
  rl.question('',(line) =>  {
    var str = line;
    var string='';
      while(string != str[str.length-1]) {
        if(string==str[i]){
          i++;
          r=0
        }
        string = str.substring(i,str.length-r)
        if (+string%2==0) {
          k++
        }
      r++
    }
    if(str[str.length-1]==str[str.length-2]){
      k++
    }
    console.log(k)
    rl.close()
  })
})

var n = readline();
var string = readline().substring(0,n);

if(/[1-9]*/.test(string)){
var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2===0) cnt++;
    }
}
print(cnt);
}

var n = readline();
var string = readline().substring(0,n);

var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2==0) cnt++;
    }
}
print(cnt);

var n = readline();
var string = readline().substring(0,n);

var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2===0) cnt++;
    }
}
print(cnt);

var n = readline();
var string = readline().substring(0,n);
if(!/[1-9]+/.test(string) || n<1 || n>65000) exit();
var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2==0) cnt++;
    }
}
print(cnt);

var n = readline();
var string = readline().substring(0,n);

if(/[0-9]*/.test(string)){
var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2===0) cnt++;
    }
}
print(cnt);
}

var n = readline();
var string = readline().substring(0,n);

var cnt=0;
for(var i=0; i<string.length; i++){
    for(var j=i; j<string.length; j++){
        if(string.substring(i,j)%2==='0') cnt++;
    }
}
print(cnt);

// var stats = readline().split(' ').map(function(num) {
//   return parseInt(num);
// })

readline();
var num = readline();
// var num = '1234'
var position = 1;
var global = 0;
for (var i = 0; i < num.length; i++) {
  if (parseInt(num[i]) % 2 === 0) {
    global += position;
  }

  position++;
}

write(global = '');

// var stats = readline().split(' ').map(function(num) {
//   return parseInt(num);
// })

readline();
var num = readline();
// var num = '1234'
var position = 1;
var global = 0;
for (var i = 0; i < num.length; i++) {
  if (parseInt(num[i]) % 2 === 0) {
    global += position;
  }

  position++;
}

// console.log(global);


Eshag has an array $$$a$$$ consisting of $$$n$$$ integers.Eshag can perform the following operation any number of times: choose some subsequence of $$$a$$$ and delete every element from it which is strictly larger than $$$AVG$$$, where $$$AVG$$$ is the average of the numbers in the chosen subsequence.For example, if $$$a = [1 , 4 , 3 , 2 , 4]$$$ and Eshag applies the operation to the subsequence containing $$$a_1$$$, $$$a_2$$$, $$$a_4$$$ and $$$a_5$$$, then he will delete those of these $$$4$$$ elements which are larger than $$$\frac{a_1+a_2+a_4+a_5}{4} = \frac{11}{4}$$$, so after the operation, the array $$$a$$$ will become $$$a = [1 , 3 , 2]$$$.Your task is to find the maximum number of elements Eshag can delete from the array $$$a$$$ by applying the operation described above some number (maybe, zero) times.A sequence $$$b$$$ is a subsequence of an array $$$c$$$ if $$$b$$$ can be obtained from $$$c$$$ by deletion of several (possibly, zero or all) elements.

The first line contains an integer $$$t$$$ $$$(1\le t\le 100)$$$ — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ $$$(1\le n\le 100)$$$ — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(1\le a_i \le 100)$$$ — the elements of the array $$$a$$$.

For each test case print a single integer — the maximum number of elements Eshag can delete from the array $$$a$$$.

NoteConsider the first test case.Initially $$$a = [1, 1, 1, 2, 2, 3]$$$.In the first operation, Eshag can choose the subsequence containing $$$a_1$$$, $$$a_5$$$ and $$$a_6$$$, their average is equal to $$$\frac{a_1 + a_5 + a_6}{3} = \frac{6}{3} = 2$$$. So $$$a_6$$$ will be deleted.After this $$$a = [1, 1, 1, 2, 2]$$$.In the second operation, Eshag can choose the subsequence containing the whole array $$$a$$$, the average of all its elements is equal to $$$\frac{7}{5}$$$. So $$$a_4$$$ and $$$a_5$$$ will be deleted.After this $$$a = [1, 1, 1]$$$.In the second test case, Eshag can't delete any element.

function main(input) {
  let arr = input.split("\n");
  let testCases = arr[0];

  // Begin Coding

  for ( let i= 2; i < arr.length; i+=2) {

    let eshagArray= arr[i]
    eshagArray = eshagArray.split(" ").map(num => {
    return Number(num)
  })
    let removedElements = applyEshag(eshagArray)
  console.log(removedElements)
  }

}

function applyEshag(eshagArray) {
  let minValue= eshagArray[0];
 let wantedArray = [...eshagArray]
  for (let number of eshagArray) {

    if (number <= minValue) {
      minValue = number
    }
  }
  wantedArray = wantedArray.filter(el => el > minValue)

  return wantedArray.length

}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var os = require('os');

const stdin = process.stdin;
const stdout = process.stdout;
class InputAndOutput {
    constructor() {
        this.lineIndex = 0;
        this.lines = [];
    }
    dried() {
        return this.lineIndex >= this.lines.length;
    }
    readLine() {
        const line = this.lines[this.lineIndex];
        this.lineIndex += 1;
        return line;
    }
    print(content) {
        stdout.write(content);
    }
    async init() {
        const lines = await this.readLines();
        this.lines = lines;
    }
    readLines() {
        const buffers = [];
        return new Promise(resolve => {
            stdin.on('data', (buffer) => buffers.push(buffer));
            stdin.on('end', function () {
                const inputs = buffers.join('');
                const lines = inputs.split(os.EOL);
                resolve(lines);
            });
        });
    }
}
async function __main__(handle) {
    const io = new InputAndOutput();
    await io.init();
    handle(io);
}

function solutionA(nums) {
    nums.sort((x, y) => x - y);
    for (let i = 1; i < nums.length; ++i) {
        if (nums[i] > nums[i - 1])
            return nums.length - i;
    }
    return 0;
}
__main__(function (io) {
    const T = Number(io.readLine());
    for (let kase = 1; kase <= T; ++kase) {
        const countOfNums = Number(io.readLine());
        const nums = io
            .readLine()
            .trim()
            .split(/\s+/g)
            .map(x => Number(x))
            .slice(0, countOfNums);
        const answer = solutionA(nums);
        io.print('' + answer + '\n');
    }
});

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var os = require('os');

const stdin = process.stdin;
const stdout = process.stdout;
class InputAndOutput {
    constructor() {
        this.lineIndex = 0;
        this.lines = [];
    }
    dried() {
        return this.lineIndex >= this.lines.length;
    }
    readLine() {
        const line = this.lines[this.lineIndex];
        this.lineIndex += 1;
        return line;
    }
    print(content) {
        stdout.write(content);
    }
    async init() {
        const lines = await this.readLines();
        this.lines = lines;
    }
    readLines() {
        const buffers = [];
        return new Promise(resolve => {
            stdin.on('data', (buffer) => buffers.push(buffer));
            stdin.on('end', function () {
                const inputs = buffers.join('');
                const lines = inputs.split(os.EOL);
                resolve(lines);
            });
        });
    }
}
async function __main__(handle) {
    const io = new InputAndOutput();
    await io.init();
    handle(io);
}

function solutionA(nums) {
    nums.sort((x, y) => x - y);
    for (let i = 1; i < nums.length; ++i) {
        if (nums[i] > nums[i - 1])
            return nums.length - i;
    }
    return 0;
}
__main__(function (io) {
    const T = Number(io.readLine());
    for (let kase = 1; kase <= T; ++kase) {
        Number(io.readLine());
        const nums = io.readLine().split(/\s+/g).map(x => Number(x));
        const answer = solutionA(nums);
        io.print('' + answer + '\n');
    }
});

let i = '';
process.stdin.on('data', c => i += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = i.split(EOL); /*your input text, split by lines*/
    var n = lines[0], e = 0
    for(j = 1; j <= n*2; j++){
        if(j % 2 === 1){
            e = lines[j], a = new Map()
        }else{
            k = lines[j].split(' ').map(Number).sort(function(a, b){return a - b}),
            small = k[0], s = 0
            for(l = 0; l < e; l++){
                if(a.has(k[l])){
                    tp = a.get(k[l])
                    tp++
                    a.set(k[l], tp)
                }else{
                    a.set(k[l], 1)
                }
            }
            var biggestKey = ''
            var biggestValue = 0
            for(var[key, value] of a){
                if(key != small){
                s+=value
                }
            }
            console.log(s)

        }

    }

});

let data = '';
process.stdin.on('data', c => data += c);

function* nextLine() {
	let lines = data.trim().split(/\n/g);
	for(let l of lines){
		yield l.trim();
	}
}

let nl = nextLine();

nl.elem = function(funParse) {
		return funParse(this.next().value);
	};

nl.array = function(funParse) {
		return this.next().value.split(/\s/g).map(funParse||(x => x));
	};

nl.num = function() {
		return nl.elem(Number);
	};

nl.nums = function() {
		return nl.array(Number);
	};

nl.line = function() {
		return this.next().value;
	};

const sol = () => {
	//your code this
	let t = nl.num();
	let ans = [];
	for(let i = 0 ; i < t; i++){
		let n = nl.num();
		let a = nl.nums();
		let m = a.reduce((ac, e) => e<ac?e:ac, a[0]);
		ans.push(n - a.reduce((ac, e) => e == m?(ac+1):ac, 0));
	}
	console.log(ans.join('\n'));
};

process.stdin.on('end', sol);

let data = '';
process.stdin.on('data', c => data += c);

function* nextLine() {
	let lines = data.trim().split(/\n/g);
	for(let l of lines){
		yield l.trim();
	}
}

let nl = nextLine();

nl.elem = function(funParse) {
		return funParse(this.next().value);
	};

nl.array = function(funParse) {
		return this.next().value.split(/\s/g).map(funParse||(x => x));
	};

nl.num = function() {
		return nl.elem(Number);
	};

nl.nums = function() {
		return nl.array(Number);
	};

nl.line = function() {
		return this.next().value;
	};

const sol = () => {
	//your code this
	let t = nl.num();
	let ans = [];
	for(let i = 0 ; i < t; i++){
		let n = nl.num();
		let a = nl.nums();
		let m = Math.min(...a);
		ans.push(n - a.reduce((ac, e) => e == m?(ac+1):ac, 0));
	}
	console.log(ans.join('\n'));
};

process.stdin.on('end', sol);

const fs = require('fs')

const inputs = fs.readFileSync(0).toString().split('\n');

function deleteElementsFromArr(arr = [], count = 0) {
    if (!arr.length) return count;
    const avg = arr.reduce((sum, cur) => sum + cur, 0) / arr.length;
    const max = Math.max(...arr);
    if (max > avg) {
        const newArr = arr.filter(el => el !== max);
        return deleteElementsFromArr(newArr, (arr.length - newArr.length) + count);
    }
    return count;
}

function main() {
    for (let i = 2; i < inputs.length; i += 2) {
        const arr = inputs[i].split(" ").map(e => +e);
        const count = deleteElementsFromArr(arr);
        console.log(count);

    }
}

main();

let q = '';
process.stdin.on('data', c => q += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = q.split(EOL);
    var t = lines[0];
    var e = 0;
    for(i = 1; i <= t * 2; i++){
        if(i % 2 == 1){
            e = lines[i];
        }else{
            var k = lines[i].split(' ').map(Number).sort(function(a, b){return a - b});
            var ans = 0;
            var a = k[0];
            for(j = 1; j < e; j++){
                if(k[j] > a){
                    ans++;
                }
            }
            console.log(ans);
        }
    }
});

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});
function readLine() {
    return inputString[currentLine++];
};
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });
    main();
    // cmd(not powershell): node cp.js < input.txt
});

function main() {
    let t = parseInt(readLine());
    while (t-- > 0) {
        solve();
    }
}
function solve() {
    let len = readLine();
    let arr = readLine().split(" ").map(i => parseInt(i)).sort((a, b) => a - b);
    let count = 1;
    for (let i = 1; i < len; i++) {
        if (arr[0] == arr[i]) count++;
        else break;
    }
    console.log(arr.length - count);
}

const rl = require("readline").createInterface({
    input: process.stdin,
    output: process.stdout
});

let lines = [];
let lineIdx = 0;

rl.on("line", line => {
    lines.push(line);
});

rl.on("close", () => {
    main();
});

function readLine() {
    return lines[lineIdx++];
}

function main() {
    let t = +readLine();
    while (t--) {
        let n = +readLine();
        let a = readLine().split(' ').map(x => +x).sort((x, y) => x - y);
        let i = 0;
        while (i < n && a[0] == a[i])
            i++;
        console.log(n - i);
    }
}

///////////////////////////////// pre-define ////////////////////////////////////////////////////////////////////////////////
const pr = console.log;
const mi = Math.min;
const mx = Math.max;
const mxll = (...args) => args.reduce((m, e) => e > m ? e : m);
const mill = (...args) => args.reduce((m, e) => e < m ? e : m);
const sqll = (v) => { if (v < 0n) throw 'negative input'; if (v < 2n) return v; const dfs = (n, x0) => { let x1 = ((n / x0) + x0) >> 1n; if (x0 === x1 || x0 === (x1 - 1n)) return x0; return dfs(n, x1); }; return dfs(v, 1n); }; // has >> 0
const abs = Math.abs;
const fl = Math.floor;
const ce = Math.ceil;
const sq = Math.sqrt;
const lge = Math.log;
const lg10 = Math.log10;
const ll = BigInt;
const combination = (m, n) => { return factorial(m, n) / factorial(n, n); };
const factorial = (m, n) => { let num = 1n; let cnt = 0; for (let i = ll(m); i > 0; i--) { if (cnt == n) break; num *= i; cnt++; } return num; };
const gcd = (a, b) => b == 0 ? a : gcd(b, a % b);
const lcm = (a, b) => (a / gcd(a, b)) * b;
const bitCount = (n) => { n = n - ((n >> 1) & 0x55555555); n = (n & 0x33333333) + ((n >> 2) & 0x33333333); return ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 24; };
const powmod = (a, b, mod) => { let r = 1n; while (b > 0n) { if (b % 2n == 1) r = r * a % mod; b >>= 1n; a = a * a % mod; } return r; };
const amax = (a) => mx.apply(Math, a);
const amin = (a) => mi.apply(Math, a);
const sm = (a) => a.reduce(((x, y) => x + y), 0);
const aeq = (a, b) => JSON.stringify(a) == JSON.stringify(b);
const swap = (a, i, j) => [a[i], a[j]] = [a[j], a[i]];
const stin = (a) => a.sort((x, y) => x - y);
const stde = (a) => a.sort((x, y) => y - x);
const sortPart = (a, k) => { let l = a.slice(0, k); l.sort((x, y) => x - y); let r = a.slice(k); return l.concat(r); }; // sort first kth
const initialize2DArrayNew = (m, n) => { let data = []; for (let i = 0; i < m; i++) { let tmp = Array(n).fill(0); data.push(tmp); } return data; };
const stmkey_in = (m) => new Map([...m].sort((x, y) => x[0] - y[0]));
const stmkey_de = (m) => new Map([...m].sort((x, y) => y[0] - x[0]));
const stmvalue_in = (m) => new Map([...m].sort((x, y) => x[1] - y[1]));
const stmvalue_de = (m) => new Map([...m].sort((x, y) => y[1] - x[1]));
const counter = (a_or_s) => { let map = new Map(); for (const i of a_or_s) map.set(i, map.get(i) + 1 || 1); return map; };
const counter_value_in_indexA_in = (a_or_s) => { let m = new Map(); let n = a_or_s.length; for (let i = 0; i < n; i++) { if (!m.has(a_or_s[i])) m.set(a_or_s[i], []); m.get(a_or_s[i]).push(i); } return m; };
const counter_value_in_indexA_de = (a_or_s) => { let m = new Map(); let n = a_or_s.length; for (let i = 0; i < n; i++) { if (!m.has(a_or_s[i])) m.set(a_or_s[i], []); m.get(a_or_s[i]).unshift(i); } return m; };
const reverse2 = (s) => { let res = ""; for (let i = s.length - 1; i >= 0; i--) { res += s[i]; } return res; };
const isPalindrome = (s) => { let n = s.length; let i = 0; let j = n - 1; while (i < j) { if (s[i++] != s[j--]) return false; } return true; };
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 * 05/24/21 morning
 * https://codeforces.com/contest/1529/problem/A
 */
const solve = (n, a) => {
    let min = amin(a);
    let m = counter(a);
    let minC = m.get(min);
    // pr(n, a)
    pr(n - minC);
};

const main = () => {
    const readline = require('readline');
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout
    });
    let input = [];
    rl.on('line', (line) => {
        input.push(line.split(" ").map(x => Number(x)));
    });
    rl.on('close', () => {
        let t = input[0][0];
        let i = 1;
        while (t--) {
            solve(input[i][0], input[i + 1]);
            i += 2;
        }
    });
};

main()

let i = '';
process.stdin.on('data', (c) => (i += c));
process.stdin.on('end', () => {
  const { EOL } = require('os');
  const lines = i.split(EOL);
  const N = parseInt(lines[0]);
  const arrays = [];
  const arrMin = [];
  let min = 999999;
  let result = 0;

  for (let i = 2; i < lines.length; i += 2) {
    arrays.push(lines[i].split(' ').map((n) => parseInt(n)));
  }

  for (let arr of arrays) {
    min = 999999;
    for (let num of arr) {
      min = Math.min(num, min);
    }
    arrMin.push(min);
  }
  for (let j = 0; j < arrays.length; j++) {
    result = 0;
    for (let i = 0; i < arrays[j].length; i++) {
      if (arrays[j][i] > arrMin[j]) {
        result += 1;
      }
    }
    console.log(result);
  }
});

const nextString = (function() {
  const listeners = [], strings = [], ps = process.stdin
  let last = ''
  ps.setEncoding('utf8')
  ps.on('readable', () => {
    let chunk
    while ((chunk = ps.read()) !== null) {
      chunk = (last + chunk).split(/\r\n|\r|\n/)
      last = chunk[chunk.length - 1]
      for (let i = 0; i < chunk.length - 1; ++i) {
        if (chunk[i].length > 0) {
          if (listeners.length > 0) {
            listeners.shift(1)(chunk[i])
          }
          else {
            strings.push(chunk[i])
          }
        }
      }
    }
  })
  const fn = resolve => {
    if (strings.length > 0) {
      resolve(strings.shift(1))
    }
    else {
      listeners.push(resolve)
    }
  }
  return () => new Promise(fn)
})()

async function proc() {
  let n = +await nextString();
  let mas = (await nextString()).split(' ').map(x => +x)
  let min = Math.min(...mas)
  let ans = 0
  for (let i = 0; i < n; ++i) {
    if (mas[i] > min) {
      ++ans
    }
  }
  console.log(ans)
}

async function main() {
  let t = +await nextString()
  for (let i = 0; i < t; ++i) {
    await proc()
  }
}

main()

const solve = (line) => {
	const arr = line.split(' ').map(v => +v);
	const min = Math.min(...arr);

	return arr.filter(item => item !== min).length;
}

let input = '';
process.stdin.on('data', str => input += str)
process.stdin.on('end', () => {
	const [n, ...lines] = input.trim().split('\n')
		.map(l => l.trim());

	for (let i=0; i<n; i++) {
		console.log(solve(lines[(i*2)+1]));
	}
})

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = []; var outputList = [];var retcode = new Set();
read.on('line', function(input){
	var tmp = input.split(' ');
	for(var i = 0; i < tmp.length; i++){
		inLine.push(tmp[i]);
		if(i == tmp.length - 1){
			retcode.add(inLine.length);
		}
	}
});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
	console.log(myconv(outputList, 9));
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextArray(size, code){
	var ret = new Array(size);
	for(var i = 0; i < size; i++){
		if(code == 'int'){
			ret[i] = nextInt();
		}else if(code == 'long'){
			ret[i] = BigInt(next());
		}else{
			ret[i] = next();
		}
	}
	return ret;
}
function nextIntArray(size){return nextArray(size, 'int');} function nextStrArray(size){return nextArray(size, 'str');} function nextLongArray(size){return nextArray(size, 'long');}
function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();} function nextInt(){return myconv(next(),1);} function nextLong(){return BigInt(next());}
function getCountMap(list){
	var map = {};
	for(var i = 0; i < list.length; i++){
		if(map[list[i]] == null){
			map[list[i]] = 0;
		}
		map[list[i]]++;
	}
	return map;
}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}},
		isReturn : function(){return retcode.has(this.index);}
	};
}
function myout(s){outputList.push(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
function isReturn(){return obj.isReturn();}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var t = nextInt();
	while(hasNext()){
		var N = nextInt();
		var list = nextIntArray(N);
		var map = getCountMap(list);
		var keys = Object.keys(map);
		keys.sort(function(a,b){
			return a - b;
		});
		myout(N - map[keys[0]]);
	}
}

function main(input) {
  let arr = input.split("\n");
  let testCases = arr[0];

  // Begin Coding

  for ( let i= 2; i < arr.length; i+=2) {

    let eshagArray= arr[i]
    eshagArray = eshagArray.split(" ").map(num => {
    return Number(num)
  })
    let removedElements = applyEshag(eshagArray)
   console.log(removedElements)
  }

}

function applyEshag(eshagArray) {
  let avg = null;
  for (let number of eshagArray) {
    avg += number
  }
  avg = avg/eshagArray.length
  let subSequenceFiltered = eshagArray.filter(el => el < avg)
  if (subSequenceFiltered.length === 0) {
    return 0;
  } else {
  return eshagArray.length - subSequenceFiltered.length
  }
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

function main(input) {
  let arr = input.split("\n")
  let testCases = arr[0]
  let arrayLength = arr[1]
  let eshagArray = arr[2]
  eshagArray = eshagArray.split(" ").map(num => {
    return Number(num)
  })

  let removedElements = applyEshag(eshagArray)
  // return removedElements
  // process.stdout.write(removedElements)
  console.log(removedElements)

}

function applyEshag(eshagArray) {
  let subSequence = eshagArray.slice(1,4);
  let avg = null;

  for (let number of eshagArray) {
    avg += number
  }
  avg = avg/eshagArray.length
  let subSequenceFiltered = eshagArray.filter(el => el < avg)
  // console.log('average',avg)
  // console.log('new',subSequenceFiltered)
  const test = eshagArray.length - subSequenceFiltered.length
  if (subSequenceFiltered.length === 0) {
    return 0;
  } else {
  return eshagArray.length - subSequenceFiltered.length
  }
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

function main(input) {
  let arr = input.split("\n")
  let testCases = arr[0]
  let arrayLength = arr[1]
  let eshagArray = arr[2]
  eshagArray = eshagArray.split(" ").map(num => {
    return Number(num)
  })

  let removedElements = applyEshag(eshagArray)
  return removedElements
  // console.log('final result',removedElements)

}

function applyEshag(eshagArray) {
  let subSequence = eshagArray.slice(1,4);
  let avg = null;

  for (let number of eshagArray) {
    avg += number
  }
  avg = avg/eshagArray.length
  let subSequenceFiltered = eshagArray.filter(el => el < avg)
  // console.log('average',avg)
  // console.log('new',subSequenceFiltered)
  const test = eshagArray.length - subSequenceFiltered.length
  if (subSequenceFiltered.length === 0) {
    return 0;
  } else {
  return eshagArray.length - subSequenceFiltered.length
  }
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

function main(input) {
  let arr = input.split("\n")
  let testCases = arr[0]
  let arrayLength = arr[1]
  let eshagArray = arr[2]
  eshagArray = eshagArray.split(" ").map(num => {
    return Number(num)
  })

  let removedElements = applyEshag(eshagArray)
  // console.log('final result',removedElements)

}

function applyEshag(eshagArray) {
  let subSequence = eshagArray.slice(1,4);
  let avg = null;

  for (let number of eshagArray) {
    avg += number
  }
  avg = avg/eshagArray.length
  let subSequenceFiltered = eshagArray.filter(el => el < avg)
  // console.log('average',avg)
  // console.log('new',subSequenceFiltered)
  const test = eshagArray.length - subSequenceFiltered.length
  if (subSequenceFiltered.length === 0) {
    return 0;
  } else {
  return eshagArray.length - subSequenceFiltered.length
  }
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;
});

process.stdin.on("end", function () {
   main(stdin_input);
});

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var os = require('os');

const stdin = process.stdin;
const stdout = process.stdout;
class InputAndOutput {
    constructor() {
        this.lineIndex = 0;
        this.lines = [];
    }
    dried() {
        return this.lineIndex >= this.lines.length;
    }
    readLine() {
        const line = this.lines[this.lineIndex];
        this.lineIndex += 1;
        return line;
    }
    print(content) {
        stdout.write(content);
    }
    async init() {
        const lines = await this.readLines();
        this.lines = lines;
    }
    readLines() {
        const buffers = [];
        return new Promise(resolve => {
            stdin.on('data', (buffer) => buffers.push(buffer));
            stdin.on('end', function () {
                const inputs = buffers.join('');
                const lines = inputs.split(os.EOL);
                resolve(lines);
            });
        });
    }
}
async function __main__(handle) {
    const io = new InputAndOutput();
    await io.init();
    handle(io);
}

function solutionA(nums) {
    nums.sort((x, y) => x - y);
    for (let i = 1; i < nums.length; ++i) {
        if (nums[i] > nums[i - 1])
            return nums.length - i;
    }
    return 0;
}
__main__(function (io) {
    const T = Number(io.readLine());
    for (let kase = 1; kase <= T; ++kase) {
        Number(io.readLine());
        const nums = io.readLine().split(/\s*/g).map(x => Number(x));
        const answer = solutionA(nums);
        io.print('' + answer + '\n');
    }
});

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var os = require('os');

const stdin = process.stdin;
const stdout = process.stdout;
class InputAndOutput {
    constructor() {
        this.lineIndex = 0;
        this.lines = [];
    }
    dried() {
        return this.lineIndex >= this.lines.length;
    }
    readLine() {
        const line = this.lines[this.lineIndex];
        this.lineIndex += 1;
        return line;
    }
    print(content) {
        stdout.write(content);
    }
    async init() {
        const lines = await this.readLines();
        this.lines = lines;
    }
    readLines() {
        const buffers = [];
        return new Promise(resolve => {
            stdin.on('data', (buffer) => buffers.push(buffer));
            stdin.on('end', function () {
                const inputs = buffers.join('\n');
                const lines = inputs.split(os.EOL);
                resolve(lines);
            });
        });
    }
}
async function __main__(handle) {
    if (process.env.GUANGHECHEN_LOCAL)
        return;
    const io = new InputAndOutput();
    await io.init();
    handle(io);
}

function solutionA(nums) {
    nums.sort((x, y) => x - y);
    for (let i = 1; i < nums.length; ++i) {
        if (nums[i] > nums[i - 1])
            return nums.length - i;
    }
    return 0;
}
__main__(function (io) {
    const T = Number(io.readLine());
    for (let kase = 1; kase <= T; ++kase) {
        Number(io.readLine());
        const nums = io.readLine().split('').map(x => Number(x));
        const answer = solutionA(nums);
        io.print('' + answer + '\n');
    }
});

exports.default = solutionA;

let i = '';
process.stdin.on('data', c => i += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = i.split(EOL);
    var n = lines[0],e=0, k = 0
    for(j = 1; j <= n *2; j++){
        if(j % 2 == 1){
            e = lines[j],a = new Map()
        }else{
            k = lines[j].split(' ').map(Number)
            for(l = 0; l < e; l++){
                if(a.has(k[l])){
                    ut = a.get(k[l])
                    ut++
                    a.set(k[l], ut)
                }else{
                    a.set(k[l], 1)
                }
            }
            var biggestValue = 0
            for(var[key, value] of a){
                if(value > biggestValue){
                    biggestValue=value
                }
            }
            console.log(Number(e - biggestValue))
        }
    }

});

const fs = require('fs')

const inputs = fs.readFileSync(0).toString().split('\n');

function deleteElementsFromArr(arr = [], count = 0) {
    if (!arr.length) return count;
    const avg = arr.reduce((sum, cur) => sum + cur, 0) / arr.length;
    const newArr = arr.filter(el => el <= avg);
    if (newArr.length !== arr.length) return deleteElementsFromArr(newArr, (arr.length - newArr.length));
    return count;
}

function main() {
    for (let i = 2; i < inputs.length; i += 2) {
        const arr = inputs[i].split(" ").map(e => +e);
        const count = deleteElementsFromArr(arr);
        console.log(count);

    }
}

main();