using System; using System.Linq; using System.Collections.Generic; using System.Text; public class Program { public void Proc() { Reader.IsDebug = false; int[] inpt = Reader.ReadLine().Split(' ').Select(a=>int.Parse(a)).ToArray(); int row = inpt[0]; int col = inpt[1]; List stars = new List(); for(int i=0; i= 2) { break; } } Pos last = new Pos(stars[0].X, stars[0].Y); if(stars[0].X == stars[1].X) { last.X = last.X-1>=0?last.X-1:last.X+1; } else { last.Y = last.Y-1>=0?last.Y-1:last.Y+1; } stars.Add(last); StringBuilder ans = new StringBuilder(); for(int i=0; ia.X == j && a.Y == i)) { ans.Append("*"); } else { ans.Append("-"); } } ans.AppendLine(string.Empty); } Console.Write(ans.ToString()); } public struct Pos { public int X; public int Y; public Pos(int x, int y) { this.X = x; this.Y = y; } } public class Reader { public static bool IsDebug = true; private static System.IO.StringReader SReader; private static string InitText = @" "; public static string ReadLine() { if(IsDebug) { if(SReader == null) { SReader = new System.IO.StringReader(InitText.Trim()); } return SReader.ReadLine(); } else { return Console.ReadLine(); } } } public static void Main(string[] args) { Program prg = new Program(); prg.Proc(); } }