Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Competitive
{
    internal class Solution
    {
        public int V, E;
        public Graph G;
        public void Run()
        {
            {
                var line = Input.ReadIntArray();
                V = line[0];
                E = line[1];
            }

            G = new Graph(V);
            for (int i = 0; i < E; i++)
            {
                var line = Input.ReadIntArray();
                int fr = line[0];
                int to = line[1];
                int cap = line[2];
                var e1 = new Edge(fr, to, cap);
                var e2 = new Edge(to, fr, 0);
                e1.Rev = e2;
                e2.Rev = e1;
                G[fr].Edges.Add(e1);
                G[to].Edges.Add(e2);
            }

            var ff = new FordFulkerson(G);
            int ret = ff.MaxFlow(0, V - 1);
            Console.WriteLine(ret);
        }
    }

    // libs ----------
    // 最大流問題、最悪で計算量はO(F*E)
    class FordFulkerson
    {
        public bool[] Used;
        int N;
        public Graph G;
        private int INF = 1000000;

        public FordFulkerson(Graph G)
        {
            this.G = G;
            N = G.Nodes.Count;
        }

        public int MaxFlow(int s, int t)
        {
            int ret = 0;
            while (true)
            {
                Used = new bool[N];
                int flow = DFS(s, t, INF);
                if (flow == 0) return ret;
                ret += flow;
            }
        }

        public int DFS(int ss, int tt, int flow)
        {
            if (ss == tt) return flow;
            Used[ss] = true;
            foreach (var e in G[ss].Edges)
            {
                if (!Used[e.To] && e.Cap > 0)
                {
                    int f = DFS(e.To, tt, Math.Min(flow, e.Cap));
                    if (f > 0)
                    {
                        e.Cap -= f;
                        e.Rev.Cap += f;
                        return f;
                    }
                }
            }

            return 0;
        }
    }

    internal class Graph
    {
        public List<Node> Nodes;

        public Node this[int i]
        {
            set { Nodes[i] = value; }
            get { return Nodes[i]; }
        }

        public Graph(int N)
        {
            Nodes = new List<Node>();
            for (int i = 0; i < N; i++)
            {
                Nodes.Add(new Node(i));
            }
        }

    }

    internal class Node
    {
        public List<Edge> Edges;
        public int No;

        public Node(int no)
        {
            this.No = no;
            Edges = new List<Edge>();
        }
    }

    internal class Edge
    {
        public int From;
        public int To;
        public int Cap;
        public Edge Rev;

        public Edge(int fr, int to, int cap)
        {
            From = fr;
            To = to;
            Cap = cap;
        }

    }

    // common ----------

    internal static class Input
    {
        public static string ReadString()
        {
            string line = Console.ReadLine();
            return line;
        }

        public static int ReadInt()
        {
            string line = Console.ReadLine();
            return int.Parse(line);
        }

        public static int[] ReadIntArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(int.Parse).ToArray();            
        }

        public static long ReadLong()
        {
            string line = Console.ReadLine();
            return long.Parse(line);
        }

        public static long[] ReadLongArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(long.Parse).ToArray();
        }

        public static double[] ReadDoubleArray()
        {
            string line = Console.ReadLine();
            return line.Split(' ').Select(double.Parse).ToArray();
        }
    }
    
    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = new Solution();
            s.Run();
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Web;
      |       ^~~~~~
a.cc:8:5: error: 'internal' does not name a type
    8 |     internal class Solution
      |     ^~~~~~~~
a.cc:45:15: error: expected ':' before 'bool'
   45 |         public bool[] Used;
      |               ^~~~~
      |               :
a.cc:45:20: error: expected unqualified-id before '[' token
   45 |         public bool[] Used;
      |                    ^
a.cc:47:15: error: expected ':' before 'Graph'
   47 |         public Graph G;
      |               ^~~~~~
      |               :
a.cc:47:16: error: 'Graph' does not name a type
   47 |         public Graph G;
      |                ^~~~~
a.cc:48:16: error: expected ':' before 'int'
   48 |         private int INF = 1000000;
      |                ^~~~
      |                :
a.cc:50:15: error: expected ':' before 'FordFulkerson'
   50 |         public FordFulkerson(Graph G)
      |               ^~~~~~~~~~~~~~
      |               :
a.cc:50:35: error: expected ')' before 'G'
   50 |         public FordFulkerson(Graph G)
      |                             ~     ^~
      |                                   )
a.cc:56:15: error: expected ':' before 'int'
   56 |         public int MaxFlow(int s, int t)
      |               ^~~~
      |               :
a.cc:68:15: error: expected ':' before 'int'
   68 |         public int DFS(int ss, int tt, int flow)
      |               ^~~~
      |               :
a.cc: In member function 'int Competitive::FordFulkerson::MaxFlow(int, int)':
a.cc:61:17: error: 'Used' was not declared in this scope
   61 |                 Used = new bool[N];
      |                 ^~~~
a.cc: In member function 'int Competitive::FordFulkerson::DFS(int, int, int)':
a.cc:71:13: error: 'Used' was not declared in this scope
   71 |             Used[ss] = true;
      |             ^~~~
a.cc:72:22: error: 'var' was not declared in this scope
   72 |             foreach (var e in G[ss].Edges)
      |                      ^~~
a.cc:72:13: error: 'foreach' was not declared in this scope
   72 |             foreach (var e in G[ss].Edges)
      |             ^~~~~~~
a.cc: At global scope:
a.cc:90:14: error: expected initializer before 'class'
   90 |     internal class Graph
      |              ^~~~~
a.cc:111:5: error: 'internal' does not name a type
  111 |     internal class Node
      |     ^~~~~~~~
a.cc:123:5: error: 'internal' does not name a type
  123 |     internal class Edge
      |     ^~~~~~~~
a.cc:141:5: error: 'internal' does not name a type
  141 |     internal static class Input
      |     ^~~~~~~~
a.cc:180:5: error: 'internal' does not name a type
  180 |     internal class Program
      |     ^~~~~~~~