ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1226. esreveR redrO

#11, TLE, Execution time is just 0.14
Posted by min_jie 23 Feb 2013 11:19
I guess that there must be something wrong in the test of system.

Execution time is just 0.14 (even less), and Memory used: 2 008 KB

My solution:

        static void Main(string[] args)
        {
            char[] chs = Console.In.ReadToEnd().TrimEnd().ToCharArray();
            string tmpStr="";
            foreach (char ch in chs)
            {
                if (char.IsLetter(ch))
                {
                    tmpStr = ch + tmpStr;
                }
                else
                {
                    Console.Write(tmpStr+ch);
                    tmpStr = "";
                }
            }
            if (tmpStr != "") Console.Write(tmpStr);
            Console.ReadLine();

        }

Edited by author 26.02.2013 06:18

Edited by author 26.02.2013 06:34