using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace geo { class Program { static void Main(string[] args) { string inFile = System.IO.File.ReadAllText("geo.in"); string[] rows = inFile.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); int squaresCount = int.Parse(rows[0]); Square[] squares = new Square[squaresCount]; for (int i = 0; i < squaresCount; i++) { double sX = double.Parse(rows[i+1].Split(' ')[0]); double sY = double.Parse(rows[i+1].Split(' ')[1]); squares[i] = new Square(sX, sY); } int commandsCount = int.Parse(rows[squaresCount + 1]); for (int i = squaresCount + 2; i < squaresCount + 2 + commandsCount; i++) { string[] commands = rows[i].Split(' '); string cN = commands[0]; if (cN == "1") { DoSomething(squares); } else { int sqrIndx = int.Parse(commands[1]); squares[sqrIndx].Rotate(double.Parse(commands[2])); } } } private static void DoSomething(Square[] squares) { for (int i = 0; i < squares.Length; i++) { for (int j = 0; j < squares.Length; j++) { if (i != j) { DoSomething2(squares[i], squares[j].Ax, squares[j].Bx); } } } } private static void DoSomething2(Square square, double ax, double ay) { // int a = square } private static double Dist(double Ax, double Ay, double Bx, double By) { double d = Math.Sqrt(((Bx - Ax) * (Bx - Ax)) + ((By - Ay) * (By - Ay))); return d; } } }