using System using System IO using System Collections Generic public s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.IO;
using System.Collections.Generic;
public struct Coordinates
{
public int X, Y;
public Coordinates (int x, int y)
{
X = x;
Y = y;
}
}
static class Program
{
public static void Main ()
{
StreamReader sr = new StreamReader ("/home/red-agent/input.txt");
List<Coordinates> coords = new List<Coordinates> ();
while (!sr.EndOfStream)
{
string line = sr.ReadLine ();
string[] tokens = line.Split (' ');
coords.Add (new Coordinates (int.Parse(tokens [0]),
int.Parse(tokens [1])));
}
}
}