Language: C++

#[allow(unused_macros)]
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)*}
    };
}
 
#[allow(unused_macros)]
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)*}
    };
}
 
#[allow(unused_macros)]
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, bytes) => {
        read_value!($next, String).into_bytes()
    };
 
    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };
 
    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

use std::cmp::Ordering;

/// Equivalent to std::lowerbound and std::upperbound in c++
pub trait BinarySearch<T> {
    fn lower_bound(&self, &T) -> usize;
    fn upper_bound(&self, &T) -> usize;
}

impl<T: Ord> BinarySearch<T> for [T] {
    fn lower_bound(&self, x: &T) -> usize {
        let mut low = 0;
        let mut high = self.len();

        while low != high {
            let mid = (low + high) / 2;
            match self[mid].cmp(x) {
                Ordering::Less => {
                    low = mid + 1;
                }
                Ordering::Equal | Ordering::Greater => {
                    high = mid;
                }
            }
        }
        low
    }

    fn upper_bound(&self, x: &T) -> usize {
        let mut low = 0;
        let mut high = self.len();

        while low != high {
            let mid = (low + high) / 2;
            match self[mid].cmp(x) {
                Ordering::Less | Ordering::Equal => {
                    low = mid + 1;
                }
                Ordering::Greater => {
                    high = mid;
                }
            }
        }
        low
    }
}






use std::cmp;
use std::cmp::min;
use std::collections::BTreeMap;
use std::process;
use std::cmp::Ord;
#[derive(PartialEq, Eq)]
pub struct point(i64, i64, i64);
impl Ord for point {
    fn cmp(&self, other: &point) -> Ordering {
        self.0.cmp(&other.0)
    }
}

impl PartialOrd for point {
    fn partial_cmp(&self, other: &point) -> Option<Ordering> {
        Some(self.cmp(other))
    }
}
/*
impl PartialEq for point {
    fn eq(&self, other: &point) -> bool {
        self.0 == other.0
    }
}
impl Eq for point {
    fn eq(&self, other: &point) -> bool {
        self.0 == other.0
    }
}*/
fn main() {
    input!{
        n:i64,
        y:i64,
    }
    let mut yen = Vec::new();
    for i in 0..n{
        for j in 0..n{
            let mut tmp = point(i*1000+j*5000,i,j);
            yen.push(tmp);
        }
    }
    yen.sort();
    let mut flag = 0;
    for i in &yen{
        if i.0+10000*(n - (i.1+i.2)) == y{
            println!("{} {} {}", i.1, i.2, n - (i.1+i.2));
            flag = 1;
            break;
        }
    }
    if flag == 0{
        println!("-1 -1 -1");
    }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_macros)]
      |  ^
a.cc:23:2: error: invalid preprocessing directive #[
   23 | #[allow(unused_macros)]
      |  ^
a.cc:34:2: error: invalid preprocessing directive #[
   34 | #[allow(unused_macros)]
      |  ^
a.cc:41:10: error: too many decimal points in number
   41 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:117:2: error: invalid preprocessing directive #[
  117 | #[derive(PartialEq, Eq)]
      |  ^
a.cc:121:13: error: too many decimal points in number
  121 |         self.0.cmp(&other.0)
      |             ^~~~~~
a.cc:147:14: error: too many decimal points in number
  147 |     for i in 0..n{
      |              ^~~~
a.cc:148:18: error: too many decimal points in number
  148 |         for j in 0..n{
      |                  ^~~~
a.cc:2:1: error: 'macro_rules' does not name a type
    2 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:24:1: error: 'macro_rules' does not name a type
   24 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:35:1: error: 'macro_rules' does not name a type
   35 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:61:1: error: 'use' does not name a type
   61 | use std::cmp::Ordering;
      | ^~~
a.cc:64:1: error: 'pub' does not name a type
   64 | pub trait BinarySearch<T> {
      | ^~~
a.cc:69:1: error: 'impl' does not name a type
   69 | impl<T: Ord> BinarySearch<T> for [T] {
      | ^~~~
a.cc:112:1: error: 'use' does not name a type
  112 | use std::cmp;
      | ^~~
a.cc:113:1: error: 'use' does not name a type
  113 | use std::cmp::min;
      | ^~~
a.cc:114:1: error: 'use' does not name a type
  114 | use std::collections::BTreeMap;
      | ^~~
a.cc:115:1: error: 'use' does not name a type
  115 | use std::process;
      | ^~~
a.cc:116:1: error: 'use' does not name a type
  116 | use std::cmp::Ord;
      | ^~~
a.cc:118:1: error: 'pub' does not name a type
  118 | pub struct point(i64, i64, i64);
      | ^~~
a.cc:119:1: error: 'impl' does not name a type
  119 | impl Ord for point {
      | ^~~~
a.cc:125:1: error: 'impl' does not name a type
  125 | impl PartialOrd for point {
      | ^~~~
a.cc:141:1: error: 'fn' does not name a type
  141 | fn main() {
      | ^~