pastebin

Paste Search Dynamic
Recent pastes
differentNumbers
  1. const testCases = readline();
  2. for(let i = 0; i < testCases; i++) {
  3.         const firstLine = readline();
  4.         const q = readline().split(" ")[1];
  5.         const numbers = readline().split(" ");
  6.         let differentNumbers = [];
  7.         for(let j = 0; j < q; j++) {
  8.                 const query = readline();
  9.                 if(!differentNumbers.includes(numbers[j])) {
  10.                         differentNumbers.push(numbers[j])
  11.                 }
  12.                 print(differentNumbers);
  13.                 differentNumbers = [];
  14.         }
  15.  
Parsed in 0.005 seconds