Language: Java

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($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:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input! {
        n: usize,
        v: [(String, i64); n],
    }
    let mut list = (0..n)
    .map(|i| (v[i].0.clone(), -v[i].1, i))
    .collect::<Vec<_>>();
    list.sort();
    for (_, _, i) in list.into_iter(){
        puts!("{}\n",i+1);
    }
    // let ans = if x<a {0} else {10};
    // puts!("{}\n", ans);
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


Compiler output:
Main.java:1: error: illegal character: '#'
#[allow(unused_imports)]
^
Main.java:1: error: class, interface, enum, or record expected
#[allow(unused_imports)]
  ^
Main.java:3: error: illegal character: '#'
#[allow(unused_imports)]
^
Main.java:3: error: class, interface, enum, or record expected
#[allow(unused_imports)]
  ^
Main.java:5: error: class, interface, enum, or record expected
use std::io::{Write, BufWriter};
^
Main.java:7: error: class, interface, enum, or record expected
macro_rules! input {
^
Main.java:10: error: class, interface, enum, or record expected
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        ^
Main.java:11: error: class, interface, enum, or record expected
        let mut next = move || -> String{
        ^
Main.java:19: error: class, interface, enum, or record expected
        input_inner!{next, $($r)*}
        ^
Main.java:21: error: class, interface, enum, or record expected
}
^
Main.java:25: error: class, interface, enum, or record expected
    ($next:expr, ) => {};
    ^
Main.java:27: error: class, interface, enum, or record expected
    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
    ^
Main.java:29: error: class, interface, enum, or record expected
        input_inner!{$next $($r)*}
        ^
Main.java:31: error: class, interface, enum, or record expected
}
^
Main.java:38: error: class, interface, enum, or record expected
    ($next:expr, [ $t:tt ; $len:expr ]) => {
    ^
Main.java:38: error: class, interface, enum, or record expected
    ($next:expr, [ $t:tt ; $len:expr ]) => {
                           ^
Main.java:42: error: class, interface, enum, or record expected
    ($next:expr, chars) => {
    ^
Main.java:46: error: class, interface, enum, or record expected
    ($next:expr, usize1) => {
    ^
Main.java:50: error: class, interface, enum, or record expected
    ($next:expr, [ $t:tt ]) => {{
    ^
Main.java:52: error: class, interface, enum, or record expected
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        ^
Main.java:55: error: class, interface, enum, or record expected
    ($next:expr, $t:ty) => {
    ^
Main.java:58: error: class, interface, enum, or record expected
}
^
Main.java:62: error: class, interface, enum, or record expected
    let mut out = BufWriter::new(out.lock());
    ^
Main.java:63: error: class, interface, enum, or record expected
    macro_rules! puts {
    ^
Main.java:65: error: class, interface, enum, or record expected
    }
    ^
Main.java:68: error: class, interface, enum, or record expected
        v: [(String, i64); n],
                           ^
Main.java:73: error: class, interface, enum, or record expected
    list.sort();
    ^
Main.java:74: error: class, interface, enum, or record expected
    for (_, _, i) in list.into_iter(){
    ^
Main.java:76: error: class, interface, enum, or record expected
    }
    ^
Main.java:84: error: unnamed classes are a preview feature and are disabled by default.
    let thd = std::thread::Builder::new().stack_size(stack_size);
    ^
  (use --enable-preview to enable unnamed classes)
Main.java:84: error: ';' expected
    let thd = std::thread::Builder::new().stack_size(stack_size);
                                       ^
Main.java:85: error: class, interface, enum, or record expected
    thd.spawn(|| solve()).unwrap().join().unwrap();
    ^
Main.java:86: error: class, interface, enum, or record expected
}
^
33 errors