Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace test
- {
- class MainClass
- {
- public static void Main()
- {
- char[] arrFirst = Console.ReadLine()
- .Split(' ')
- .Select(char.Parse)
- .ToArray();
- char[] arrSecond = Console.ReadLine()
- .Split(' ')
- .Select(char.Parse)
- .ToArray();
- bool isTheFirstArr = false;
- for (int i = 0; i < Math.Min(arrFirst.Length, arrSecond.Length); i++)
- {
- if (arrFirst[i] < arrSecond[i])
- {
- isTheFirstArr = true;
- }
- else if (arrFirst[i] > arrSecond[i])
- {
- isTheFirstArr = false;
- }
- else
- {
- if (arrFirst.Length > arrSecond.Length)
- {
- isTheFirstArr = false;
- }
- else
- {
- isTheFirstArr = true;
- }
- }
- }
- if (isTheFirstArr)
- {
- Console.WriteLine(string.Join("", arrFirst));
- Console.WriteLine(string.Join("", arrSecond));
- }
- else
- {
- Console.WriteLine(string.Join("", arrDown));
- Console.WriteLine(string.Join("", arrUp));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement