Language: C++

#include <bits/stdc++.h>
using namespace std;
ll N, K, L, R, M, l, r, m, cnt;
vector<ll> num;
int main()
{
    cin>>N>>K;
    num.clear();
    for(ll i = 0; i<N; ++i)
    {
        ll n;
        cin>>n;
        num.push_back(n);
    }
    sort(num.begin(), num.end());
    L = -2e18;
    R = 2e18;
    //L = -15;
    //R = 15;
    while(R-L>1)
    {
        M = (L+R)/2;
        cnt = 0;
        
        for(ll i = 0; i<N; ++i)
        {
            int l = i, r = N; 
            while(r-l>1)
            {
                int m = (l+r)/2;
                if(num[i]*num[m]<=M) //too small
                    (num[i]>0) ? l = m : r = m;
                else //too big
                    (num[i]>0) ? r = m : l = m;
                //cout<<"(l, r, m, cnt) = ("<<l<<", "<<r<<", "<<m<<", "<<cnt<<")\n";
            }
            if(num[i]>0) cnt+=l-i;//not sure
            else cnt+=N-r;// not sure
        }
        (cnt<K) ? L = M : R = M; //too small
        //cout<<"(L, R, M) = ("<<L<<", "<<R<<", "<<M<<")\n";
    }
    cout<<R<<"\n";
}


Compiler output:
a.cc:3:1: error: 'll' does not name a type
    3 | ll N, K, L, R, M, l, r, m, cnt;
      | ^~
a.cc:4:8: error: 'll' was not declared in this scope
    4 | vector<ll> num;
      |        ^~
a.cc:4:10: error: template argument 1 is invalid
    4 | vector<ll> num;
      |          ^
a.cc:4:10: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:7:10: error: 'N' was not declared in this scope
    7 |     cin>>N>>K;
      |          ^
a.cc:7:13: error: 'K' was not declared in this scope
    7 |     cin>>N>>K;
      |             ^
a.cc:8:9: error: request for member 'clear' in 'num', which is of non-class type 'int'
    8 |     num.clear();
      |         ^~~~~
a.cc:9:9: error: 'll' was not declared in this scope
    9 |     for(ll i = 0; i<N; ++i)
      |         ^~
a.cc:9:19: error: 'i' was not declared in this scope
    9 |     for(ll i = 0; i<N; ++i)
      |                   ^
a.cc:11:11: error: expected ';' before 'n'
   11 |         ll n;
      |           ^~
      |           ;
a.cc:12:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   12 |         cin>>n;
      |              ^
      |              yn
a.cc:13:13: error: request for member 'push_back' in 'num', which is of non-class type 'int'
   13 |         num.push_back(n);
      |             ^~~~~~~~~
a.cc:15:14: error: request for member 'begin' in 'num', which is of non-class type 'int'
   15 |     sort(num.begin(), num.end());
      |              ^~~~~
a.cc:15:27: error: request for member 'end' in 'num', which is of non-class type 'int'
   15 |     sort(num.begin(), num.end());
      |                           ^~~
a.cc:16:5: error: 'L' was not declared in this scope
   16 |     L = -2e18;
      |     ^
a.cc:17:5: error: 'R' was not declared in this scope
   17 |     R = 2e18;
      |     ^
a.cc:22:9: error: 'M' was not declared in this scope
   22 |         M = (L+R)/2;
      |         ^
a.cc:23:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   23 |         cnt = 0;
      |         ^~~
      |         int
a.cc:25:13: error: 'll' was not declared in this scope
   25 |         for(ll i = 0; i<N; ++i)
      |             ^~
a.cc:25:23: error: 'i' was not declared in this scope
   25 |         for(ll i = 0; i<N; ++i)
      |                       ^
a.cc:31:30: error: invalid types 'int[int]' for array subscript
   31 |                 if(num[i]*num[m]<=M) //too small
      |                              ^