Language: C++

    #[allow(unused_imports)]
    use std::cmp::{max, min, Ordering};
    #[allow(unused_imports)]
    use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
    #[allow(unused_imports)]
    use std::iter::FromIterator;
    // input macro
    // https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
    macro_rules! input {
        (source = $s:expr, $($r:tt)*) => {
            let mut iter = $s.split_whitespace();
            let mut next = || { iter.next().unwrap() };
            input_inner!{next, $($r)*}
        };
        ($($r:tt)*) => {
            let stdin = std::io::stdin();
            let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
            let mut next = move || -> String{
                bytes
                    .by_ref()
                    .map(|r|r.unwrap() as char)
                    .skip_while(|c|c.is_whitespace())
                    .take_while(|c|!c.is_whitespace())
                    .collect()
            };
            input_inner!{next, $($r)*}
        };
    }
     
    macro_rules! input_inner {
        ($next:expr) => {};
        ($next:expr, ) => {};
     
        ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
            let $var = read_value!($next, $t);
            input_inner!{$next $($r)*}
        };
    }
     
    macro_rules! read_value {
        ($next:expr, ( $($t:tt),* )) => {
            ( $(read_value!($next, $t)),* )
        };
     
        ($next:expr, [ $t:tt ; $len:expr ]) => {
            (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        };
     
        ($next:expr, chars) => {
            read_value!($next, String).chars().collect::<Vec<char>>()
        };
     
        ($next:expr, usize1) => {
            read_value!($next, usize) - 1
        };
     
        ($next:expr, $t:ty) => {
            $next().parse::<$t>().expect("Parse error")
        };
    }
     
    fn main() {
        input!{
            n: usize,
            k: i64,
            ab: [(usize, i64); n],
        }
        let mut v = vec![0; 100010];
        for (a, b) in ab {
            v[a] += b;
        }
        let mut count = 0;
        //let ans:usize;
        for i in (0..100010) {
            count += v[i];
            if count >= k {
                println!("{}", i);
                break;
            }
        }
    }

Compiler output:
a.cc:1:6: error: invalid preprocessing directive #[
    1 |     #[allow(unused_imports)]
      |      ^
a.cc:3:6: error: invalid preprocessing directive #[
    3 |     #[allow(unused_imports)]
      |      ^
a.cc:5:6: error: invalid preprocessing directive #[
    5 |     #[allow(unused_imports)]
      |      ^
a.cc:46:14: error: too many decimal points in number
   46 |             (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |              ^~~~~~~
a.cc:74:19: error: too many decimal points in number
   74 |         for i in (0..100010) {
      |                   ^~~~~~~~~
a.cc:2:5: error: 'use' does not name a type
    2 |     use std::cmp::{max, min, Ordering};
      |     ^~~
a.cc:4:5: error: 'use' does not name a type
    4 |     use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
      |     ^~~
a.cc:6:5: error: 'use' does not name a type
    6 |     use std::iter::FromIterator;
      |     ^~~
a.cc:9:5: error: 'macro_rules' does not name a type
    9 |     macro_rules! input {
      |     ^~~~~~~~~~~
a.cc:30:5: error: 'macro_rules' does not name a type
   30 |     macro_rules! input_inner {
      |     ^~~~~~~~~~~
a.cc:40:5: error: 'macro_rules' does not name a type
   40 |     macro_rules! read_value {
      |     ^~~~~~~~~~~
a.cc:62:5: error: 'fn' does not name a type
   62 |     fn main() {
      |     ^~