import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int q = in.nextInt(); for(int a0 = 0; a0 < q; a0++){ int len = in.nextInt(); int c = in.nextInt(); Random r=new Random(); int[] nums = new int[1000000000]; for(int i = 0; i < nums.length; i++) { nums[i] = (int)(Math.random() * 1000000000); } System.out.println(lena_sort(nums)); } } public static int lena_sort(int[] nums) { if (nums.length<= 1) { return nums; } int pivot = nums[0]; int less; int more; for (int i = 1; i < nums.size; ++i) { if (nums[i] < pivot) { less.append(nums[i]); } else { more.append(nums[i]); } } sorted_less = lena_sort(less); sorted_more = lena_sort(more); ans = sorted_less + pivot + sorted_more; return ans; } }