Language: C++

var i,n:longint;
    a,b:array[1..200000] of longint;
    tmp,k:qword;
procedure sort(l,r:longint);
var i,j,x,y: longint;
begin
  i:=l; j:=r; x:=a[(l + r) >> 1];
  repeat
    while a[i] < x do i:=i + 1;
    while x < a[j] do j:=j - 1;
    if not(i > j) then
      begin
        y:=a[i];
        a[i]:=a[j];
        a[j]:=y;
        y:=b[i];
        b[i]:=b[j];
        b[j]:=y;
        i:=i + 1; j:=j - 1;
      end;
 until i > j;
 if l < j then sort(l,j);
 if i < r then sort(i,r);
end;
begin
  readln(n,k);
  for i:=1 to n do readln(a[i],b[i]);
  sort(1,n);
  for i:=1 to n do 
    begin
      tmp+=b[i];
      if tmp >= k then
        begin
          write(a[i]);
          break;
        end;
    end;
end.

Compiler output:
a.cc:2:15: error: too many decimal points in number
    2 |     a,b:array[1..200000] of longint;
      |               ^~~~~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var i,n:longint;
      | ^~~
a.cc:2:5: error: 'a' does not name a type
    2 |     a,b:array[1..200000] of longint;
      |     ^
a.cc:3:5: error: 'tmp' does not name a type
    3 |     tmp,k:qword;
      |     ^~~
a.cc:4:1: error: 'procedure' does not name a type
    4 | procedure sort(l,r:longint);
      | ^~~~~~~~~
a.cc:5:1: error: 'var' does not name a type
    5 | var i,j,x,y: longint;
      | ^~~
a.cc:6:1: error: 'begin' does not name a type
    6 | begin
      | ^~~~~
a.cc:7:9: error: 'j' does not name a type
    7 |   i:=l; j:=r; x:=a[(l + r) >> 1];
      |         ^
a.cc:7:15: error: 'x' does not name a type
    7 |   i:=l; j:=r; x:=a[(l + r) >> 1];
      |               ^
a.cc:8:3: error: 'repeat' does not name a type
    8 |   repeat
      |   ^~~~~~
a.cc:10:5: error: expected unqualified-id before 'while'
   10 |     while x < a[j] do j:=j - 1;
      |     ^~~~~
a.cc:11:5: error: expected unqualified-id before 'if'
   11 |     if not(i > j) then
      |     ^~
a.cc:14:9: error: 'a' does not name a type
   14 |         a[i]:=a[j];
      |         ^
a.cc:15:9: error: 'a' does not name a type
   15 |         a[j]:=y;
      |         ^
a.cc:16:9: error: 'y' does not name a type
   16 |         y:=b[i];
      |         ^
a.cc:17:9: error: 'b' does not name a type
   17 |         b[i]:=b[j];
      |         ^
a.cc:18:9: error: 'b' does not name a type
   18 |         b[j]:=y;
      |         ^
a.cc:19:9: error: 'i' does not name a type
   19 |         i:=i + 1; j:=j - 1;
      |         ^
a.cc:19:19: error: 'j' does not name a type
   19 |         i:=i + 1; j:=j - 1;
      |                   ^
a.cc:20:7: error: 'end' does not name a type
   20 |       end;
      |       ^~~
a.cc:21:2: error: 'until' does not name a type
   21 |  until i > j;
      |  ^~~~~
a.cc:22:2: error: expected unqualified-id before 'if'
   22 |  if l < j then sort(l,j);
      |  ^~
a.cc:23:2: error: expected unqualified-id before 'if'
   23 |  if i < r then sort(i,r);
      |  ^~
a.cc:24:1: error: 'end' does not name a type
   24 | end;
      | ^~~
a.cc:25:1: error: 'begin' does not name a type
   25 | begin
      | ^~~~~
a.cc:27:3: error: expected unqualified-id before 'for'
   27 |   for i:=1 to n do readln(a[i],b[i]);
      |   ^~~
a.cc:28:7: error: expected constructor, destructor, or type conversion before '(' token
   28 |   sort(1,n);
      |       ^
a.cc:29:3: error: expected unqualified-id before 'for'
   29 |   for i:=1 to n do
      |   ^~~
a.cc:32:7: error: expected unqualified-id before 'if'
   32 |       if tmp >= k then
      |       ^~
a.cc:35:11: error: expected unqualified-id before 'break'
   35 |           break;
      |           ^~~~~
a.cc:36:9: error: 'end' does not name a type
   36 |         end;
      |         ^~~
a.cc:37:5: error: 'end' does not name a type
   37 |     end;
      |     ^~~
a.cc:38:1: error: 'end' does not name a type
   38 | end.
      | ^~~