{"code":"cppb2p124","name":"Cặp số có tổng nhỏ hơn k","description":"Cho mảng $a$ gồm $n$ phần tử và số nguyên dương $k$. \r\nĐếm số lượng cặp số có tổng nhỏ hơn $k$.\r\n\r\n#### Input\r\n\r\n\r\n- Dòng thứ $1$ là số lượng test case $t$ $(1 \\le t \\le 100)$. \r\n- Mỗi test case gồm $2$ dòng:\r\n\r\n      - Dòng thứ $1$ là số $n, k$ $(1 \\le n, k \\le 10^6)$.\r\n      - Dòng thứ $2$ là $n$ phần tử trong mảng $(0 \\le a_i \\le 10^6)$.\r\n\r\n$\\textbf{Note}$: Đầu vào luôn đảm bảo $\\sum n \\le 10^6$.\r\n#### Output\r\n\r\n- In ra số lượng cặp số có tổng nhỏ hơn $k$ trên mỗi dòng. \r\n\r\n#### Example\r\n\r\n???+ question \"Test 1\"\r\n    ???+ \"Input\"\r\n        ```sample\r\n        2\r\n        4 5\r\n        2 2 2 2\r\n        3 4\r\n        1 2 4\r\n\r\n        ```\r\n        \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        6\r\n        1\r\n\r\n        ```","points":10.0,"partial":true,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}