Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Disclaimer: The creator of 'C# Shell (C# Offline Compiler)' is in no way responsible for the code posted by any user.
- Disclaimer: The creator of 'C# Shell (C# Offline Compiler)' is in no way responsible for the code posted by any user.
- using System;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
- namespace CSharp_Shell
- {
- public static class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int[] arrA = new int[n];
- int[] arrB = new int[n];
- int[] arr = new int[2];
- for(int i=0; i<n;i++)
- {
- arr = Console.ReadLine()
- .Split()
- .Select(int.Parse)
- .ToArray();
- if(i%2!=0)
- {
- arrA[i] = arr[i];
- arrB[i] = arr[i+1];
- }
- else
- {
- arrA[i] =arr[i+1];
- arrB[i] = arr[i];
- }
- }
- Console.WriteLine(string.Join(" ", arrA));
- Console.WriteLine(string.Join(" ", arrB));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement