示例#1
0
        void Solve(StreamScanner ss, StreamWriter sw)
        {
            //---------------------------------
            var A = ss.Next(int.Parse);
            var B = ss.Next(int.Parse);

            var h = 50;
            var w = 100;

            var ret = new char[h, w];

            for (var i = 0; i < h; i++)
            {
                for (var j = 0; j < h; j++)
                {
                    ret[i, j]     = '#';
                    ret[i, j + h] = '.';
                }
            }

            for (var i = 1; i < h - 1; i += 2)
            {
                for (var j = 1; j < h - 1; j += 2)
                {
                    A--;
                    B--;
                    if (A > 0)
                    {
                        ret[i, j] = '.';
                    }
                    if (B > 0)
                    {
                        ret[i, j + h] = '#';
                    }
                }
            }

            sw.WriteLine($"{h} {w}");
            for (var i = 0; i < h; i++)
            {
                for (var j = 0; j < w; j++)
                {
                    sw.Write(ret[i, j]);
                }
                sw.WriteLine();
            }
            //---------------------------------
        }