Language: C++

#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

// -----------------------------------------------
// Framework <https://github.com/vain0x/procon>
// -----------------------------------------------

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), stderr());
            writeln!(err, "\x1B[33m{}\x1B[0m = {:?}", e, $e).unwrap()
        })*
    };
}

#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim_right().to_owned()
}

// -----------------------------------------------
// Solution
// -----------------------------------------------

fn main() {
    let (N, M) = read!(usize, usize);

    let mut pref = vec![vec![]; N + 1];
    for i in 0..M {
        let (p, y) = read!(usize, i64);

        pref[p].push((y, i));
    }

    for p in 1..N + 1 {
        pref[p].sort();

        let mut numbers = pref[p]
            .iter()
            .enumerate()
            .map(|(x, &(y, i))| (i, format!("{:>06}{:>06}", p, 1 + x)))
            .collect::<Vec<_>>();

        numbers.sort();
        for (_, n) in numbers {
            println!("{}", n)
        }
    }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #![allow(unused_imports)]
      |  ^
a.cc:2:2: error: invalid preprocessing directive #!
    2 | #![allow(non_snake_case)]
      |  ^
a.cc:17:2: error: invalid preprocessing directive #[
   17 | #[allow(unused_macros)]
      |  ^
a.cc:20:10: error: invalid preprocessing directive #[
   20 |         #[cfg(debug_assertions)]
      |          ^
a.cc:28:2: error: invalid preprocessing directive #[
   28 | #[allow(unused_macros)]
      |  ^
a.cc:31:11: error: too many decimal points in number
   31 |         ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
      |           ^~~~~
a.cc:33:11: error: too many decimal points in number
   33 |         ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
      |           ^~~~~
a.cc:43:2: error: invalid preprocessing directive #[
   43 | #[allow(dead_code)]
      |  ^
a.cc:58:14: error: too many decimal points in number
   58 |     for i in 0..M {
      |              ^~~~
a.cc:64:14: error: too many decimal points in number
   64 |     for p in 1..N + 1 {
      |              ^~~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::cell::RefCell;
      | ^~~
a.cc:5:1: error: 'use' does not name a type
    5 | use std::cmp::{max, min, Ordering};
      | ^~~
a.cc:6:1: error: 'use' does not name a type
    6 | use std::collections::*;
      | ^~~
a.cc:7:1: error: 'use' does not name a type
    7 | use std::fmt::{Debug, Formatter, Write as FmtWrite};
      | ^~~
a.cc:8:1: error: 'use' does not name a type
    8 | use std::io::{stderr, stdin, BufRead, Write};
      | ^~~
a.cc:9:1: error: 'use' does not name a type
    9 | use std::mem::{replace, swap};
      | ^~~
a.cc:10:1: error: 'use' does not name a type
   10 | use std::ops::*;
      | ^~~
a.cc:11:1: error: 'use' does not name a type
   11 | use std::rc::Rc;
      | ^~~
a.cc:18:1: error: 'macro_rules' does not name a type
   18 | macro_rules! debug {
      | ^~~~~~~~~~~
a.cc:29:1: error: 'macro_rules' does not name a type
   29 | macro_rules! read {
      | ^~~~~~~~~~~
a.cc:44:1: error: 'fn' does not name a type
   44 | fn rl() -> String {
      | ^~
a.cc:54:1: error: 'fn' does not name a type
   54 | fn main() {
      | ^~