Language: C++

/*******************************************************************************
* Author: Nirushuu
* Date: 2020-04-17
*******************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.IO;
using System.Globalization;
using System.Numerics;

/*******************************************************************************
* IO from Kattio.cs from open.kattis.com/help/csharp                          */
public class NoMoreTokensException : Exception
{
}

public class Tokenizer
{
    string[] tokens = new string[0];
    private int pos;
    StreamReader reader;

    public Tokenizer(Stream inStream)
    {
        var bs = new BufferedStream(inStream);
        reader = new StreamReader(bs);
    }

    public Tokenizer() : this(Console.OpenStandardInput())
    {
        // Nothing more to do
    }

    private string PeekNext()
    {
        if (pos < 0)
            // pos < 0 indicates that there are no more tokens
            return null;
        if (pos < tokens.Length)
        {
            if (tokens[pos].Length == 0)
            {
                ++pos;
                return PeekNext();
            }
            return tokens[pos];
        }
        string line = reader.ReadLine();
        if (line == null)
        {
            // There is no more data to read
            pos = -1;
            return null;
        }
        // Split the line that was read on white space characters
        tokens = line.Split(null);
        pos = 0;
        return PeekNext();
    }

    public bool HasNext()
    {
        return (PeekNext() != null);
    }

    public string Next()
    {
        string next = PeekNext();
        if (next == null)
            throw new NoMoreTokensException();
        ++pos;
        return next;
    }
}

public class Scanner : Tokenizer
{

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public float NextFloat()
    {
        return float.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }
}

public class BufferedStdoutWriter : StreamWriter
{
    public BufferedStdoutWriter() : base(new BufferedStream(Console.OpenStandardOutput()))
    {
    }
}
/******************************************************************************/

/*******************************************************************************
* DisjointSet datastructure                                                   */
public struct DisjointSet {
    public int[] parent;
    public int[] rank;
    public DisjointSet(int n) {
        parent = new int[n];
        for (int i = 0; i < n; ++i) {
            parent[i] = i;
        }
        rank = new int[n];
    }

    public int Find(int i) {
        int idx = i;
        var compress = new List<int>();
        while (idx != parent[idx]) {
            compress.Add(idx);
            idx = parent[idx];
        }

        foreach (var e in compress) {   // path compress 
            parent[e] = idx;
        }
        return idx;
    }

    public void Union(int a, int b) {
        int aPar = this.Find(a);
        int bPar = this.Find(b);

        if (rank[aPar] > rank[bPar]) {  // by rank
            parent[bPar] = aPar;
        } else {
            parent[aPar] = bPar;
        }
        if (rank[aPar] == rank[bPar]) {
            ++rank[bPar];
        }
    }
}

class MaxHeap {
    List<int> data;

    public MaxHeap() {
        data = new List<int>();
    }

    public void Push(int a) {
        data.Add(a);
        int idx = data.Count - 1;
        int parent = (int) Math.Floor((double) (idx - 1) / 2);
        while (idx != 0 && (data[idx] > data[parent])) {
            int tmp = data[parent];
            data[parent] = data[idx];
            data[idx] = tmp;

            idx = parent;
            parent = (int) Math.Floor((double) (idx - 1) / 2);
        }
    }

    public int Pop() {
        int res = data[0];
        data[0] = data[data.Count - 1];
        data.RemoveAt(data.Count - 1);

        int idx = 0;
        while (true) {
            int child1 = (2 * idx) + 1;
            int child2 = (2 * idx) + 2;

            if (child1 >= data.Count) { // no children
                break;
            } else if (child2 >= data.Count) {  // one child
                if (data[idx] < data[child1]) {
                    int tmp = data[idx];
                    data[idx] = data[child1];
                    data[child1] = tmp;
                }
                break;
            } else {    // two children
                int maxChild = data[child1] > data[child2] ? child1 : child2;
                if (data[idx] < data[maxChild]) {
                    int tmp = data[idx];
                    data[idx] = data[maxChild];
                    data[maxChild] = tmp;
                    idx = maxChild;
                    continue;
                } else {    // no swap
                    break;
                }
            }
        } 

        return res;           
    }


}


class Dequeue {
    public Dictionary<int, int> data = new Dictionary<int, int>();
    int firstIdx;
    public int Count;
    public Dequeue() {
        data = new Dictionary<int, int>();
        firstIdx = 1;
        Count = 0;
    }

    public void PushFront(int a) {
        data[firstIdx - 1] = a;
        ++Count;
        --firstIdx;
    }

    public void PushBack(int a) {
        data[firstIdx + Count] = a;
        ++Count;
    }

    public int PopFront() {
        --Count;
        ++firstIdx;
        return data[firstIdx - 1];
    }

    public int PopBack() {
        --Count;
        return data[firstIdx + Count];
    }

    public int Get(int n) {
        return data[firstIdx + n];
    }
}
/******************************************************************************/

class MainClass {

    // Debug functions   
    static void debug<T>(IEnumerable<T> a, string s = "") {
        Console.WriteLine($"name: {s}");
        int i = 0;
        foreach (var e in a) {
            Console.WriteLine($"value {i}: {e}");
            ++i;
        }
    }
    static void dbg<T>(T a, string s = "") {
        Console.WriteLine($"name: {s} value: {a}");
    }
    ////////////////////
    
    static int gcd(int a, int b) {
        while (b != 0) {
            int t = b;
            b = a % b;
            a = t;
        }
        return a;
    }


    public static void Main() {
        
        var sc = new Scanner();
        var wr = new BufferedStdoutWriter();
        var dot = new NumberFormatInfo();
        dot.NumberDecimalSeparator = ".";

        int x = sc.NextInt();
        int y = sc.NextInt();
        int z = sc.NextInt();

        wr.WriteLine($"{z} {x} {y}");
        wr.Flush();

    }
}

Compiler output:
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'System'
    8 | using System.Linq;
      |       ^~~~~~
a.cc:9:7: error: expected nested-name-specifier before 'System'
    9 | using System.Windows;
      |       ^~~~~~
a.cc:10:7: error: expected nested-name-specifier before 'System'
   10 | using System.IO;
      |       ^~~~~~
a.cc:11:7: error: expected nested-name-specifier before 'System'
   11 | using System.Globalization;
      |       ^~~~~~
a.cc:12:7: error: expected nested-name-specifier before 'System'
   12 | using System.Numerics;
      |       ^~~~~~
a.cc:16:1: error: expected unqualified-id before 'public'
   16 | public class NoMoreTokensException : Exception
      | ^~~~~~
a.cc:20:1: error: expected unqualified-id before 'public'
   20 | public class Tokenizer
      | ^~~~~~
a.cc:79:1: error: expected unqualified-id before 'public'
   79 | public class Scanner : Tokenizer
      | ^~~~~~
a.cc:103:1: error: expected unqualified-id before 'public'
  103 | public class BufferedStdoutWriter : StreamWriter
      | ^~~~~~
a.cc:113:1: error: expected unqualified-id before 'public'
  113 | public struct DisjointSet {
      | ^~~~~~
a.cc:154:5: error: 'List' does not name a type
  154 |     List<int> data;
      |     ^~~~
a.cc:156:11: error: expected ':' before 'MaxHeap'
  156 |     public MaxHeap() {
      |           ^~~~~~~~
      |           :
a.cc:160:11: error: expected ':' before 'void'
  160 |     public void Push(int a) {
      |           ^~~~~
      |           :
a.cc:174:11: error: expected ':' before 'int'
  174 |     public int Pop() {
      |           ^~~~
      |           :
a.cc:211:2: error: expected ';' after class definition
  211 | }
      |  ^
      |  ;
a.cc: In constructor 'MaxHeap::MaxHeap()':
a.cc:157:9: error: 'data' was not declared in this scope
  157 |         data = new List<int>();
      |         ^~~~
a.cc:157:20: error: 'List' does not name a type
  157 |         data = new List<int>();
      |                    ^~~~
a.cc:157:25: error: expected primary-expression before 'int'
  157 |         data = new List<int>();
      |                         ^~~
a.cc: In member function 'void MaxHeap::Push(int)':
a.cc:161:9: error: 'data' was not declared in this scope
  161 |         data.Add(a);
      |         ^~~~
a.cc:163:28: error: 'Math' was not declared in this scope
  163 |         int parent = (int) Math.Floor((double) (idx - 1) / 2);
      |                            ^~~~
a.cc: In member function 'int MaxHeap::Pop()':
a.cc:175:19: error: 'data' was not declared in this scope
  175 |         int res = data[0];
      |                   ^~~~
a.cc: At global scope:
a.cc:215:11: error: expected ':' before 'Dictionary'
  215 |     public Dictionary<int, int> data = new Dictionary<int, int>();
      |           ^~~~~~~~~~~
      |           :
a.cc:215:12: error: 'Dictionary' does not name a type
  215 |     public Dictionary<int, int> data = new Dictionary<int, int>();
      |            ^~~~~~~~~~
a.cc:217:11: error: expected ':' before 'int'
  217 |     public int Count;
      |           ^~~~
      |           :
a.cc:218:11: error: expected ':' before 'Dequeue'
  218 |     public Dequeue() {
      |           ^~~~~~~~
      |           :
a.cc:224:11: error: expected ':' before 'void'
  224 |     public void PushFront(int a) {
      |           ^~~~~
      |           :
a.cc:230:11: error: expected ':' before 'void'
  230 |     public void PushBack(int a) {
      |           ^~~~~
      |           :
a.cc:235:11: error: expected ':' before 'int'
  235 |     public int PopFront() {
      |           ^~~~
      |           :
a.cc:241:11: error: expected ':' before 'int'
  241 |     public int PopBack() {
      |           ^~~~
      |           :
a.cc:246:11: error: expected ':' before 'int'
  246 |     public int Get(int n) {
      |           ^~~~
      |           :
a.cc:249:2: error: expected ';' after class definition
  249 | }
      |  ^
      |  ;
a.cc: In constructor 'Dequeue::Dequeue()':
a.cc:219:9: error: 'data' was not declared in this scope
  219 |         data = new Dictionary<int, int>();
      |         ^~~~
a.cc:219:20: error: 'Dictionary' does not name a type
  219 |         data = new Dictionary<int, int>();
      |                    ^~~~~~~~~~
a.cc:219:31: error: expected primary-expression before 'int'
  219 |         data = new Dictionary<int, int>();
      |                               ^~~
a.cc: In member function 'void Dequeue::PushFront(int)':
a.cc:225:9: error: 'data' was not declared in this scope
  225 |         data[firstIdx - 1] = a;
      |         ^~~~
a.cc: In member function 'void Dequeue::PushBack(int)':
a.cc:231:9: error: 'data' was not declared in this scope
  231 |         data[firstIdx + Count] = a;
      |         ^~~~
a.cc: In member function 'int Dequeue::PopFront()':
a.cc:238:16: error: 'data' was not declared in this scope
  238 |         return data[firstIdx - 1];
      |                ^~~~
a.cc: In member function 'int Dequeue::PopBack()':
a.cc:243:16: error: 'data' was not declared in this scope
  243 |         return data[firstIdx + Count];
      |                ^~~~
a.cc: In member function 'int Dequeue::Get(int)':
a.cc:247:16: error: 'data' was not declared in this scope
  247 |         return data[firstIdx + n];
      |                ^~~~
a.cc: At global scope:
a.cc:255:17: error: variable or field 'debug' declared void
  255 |     static void debug<T>(IEnumerable<T> a, string s = "") {
      |                 ^~~~~
a.cc:255:17: error: expected ';' at end of member declaration
  255 |     static void debug<T>(IEnumerable<T> a, string s = "") {
      |                 ^~~~~
      |                      ;
a.cc:255:22: error: expected unqualified-id before '<' token
  255 |     static void debug<T>(IEnumerable<T> a, string s = "") {
      |                      ^
a.cc:263:17: error: variable or field 'dbg' declared void
  263 |     static void dbg<T>(T a, string s = "") {
      |                 ^~~
a.cc:263:17: error: expected ';' at end of member declaration
  263 |     static void dbg<T>(T a, string s = "") {
      |                 ^~~
      |                    ;
a.cc:263:20: error: expected unqualified-id before '<' token
  263 |     static void dbg<T>(T a, string s = "") {
      |                    ^
a.cc:278:11: error: expected ':' before 'static'
  278 |     public static void Main() {
      |           ^~~~~~~
      |           :
a.cc:293:2: error: expected ';' after class definition
  293 | }
      |  ^
      |  ;
a.cc: In static member function 'static void MainClass::Main()':
a.cc:280:9: error: 'var' was not declared in this scope
  280 |         var sc = new Scanner();
      |         ^~~
a.cc:281:13: error: expected ';' before 'wr'
  281 |         var wr = new BufferedStdoutWriter();
      |             ^~
a.cc:282:13: error: expected ';' before 'dot'
  282 |         var dot = new NumberFormatInfo();
      |             ^~~
a.cc:283:9: error: 'dot' was not declared in this scope
  283 |         dot.NumberDecimalSeparator = ".";
      |         ^~~
a.cc:285:17: error: 'sc' was not declared in this scope
  285 |         int x = sc.NextInt();
      |                 ^~
a.cc:289:9: error: 'wr' was not declared in this scope
  289 |         wr.WriteLine($"{z} {x} {y}");
      |         ^~
a.cc:289:22: error: '$' was not declared in this scope
  289 |         wr.WriteLine($"{z} {x} {y}");
      |                      ^