Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace insidebuilding
- {
- class Program
- {
- static void Main(string[] args)
- {
- int size = int.Parse(Console.ReadLine());
- bool[] isInside = new bool[5];
- int[] arr = new int[10];
- for (int i = 0; i < arr.Length / 2; i++)
- {
- arr[i] = int.Parse(Console.ReadLine());
- arr[i + 1] = int.Parse(Console.ReadLine());
- if(arr[i]==0 && arr[i+1]==0 )
- {
- isInside[i] = true;
- }
- if(arr[i]<0 || arr[i+1]<0)
- {
- isInside[i]=false;
- continue;
- }
- if (arr[i] >= size && arr[i] <= 2 * size)
- {
- if (arr[i + 1] <= size * 4)
- {
- isInside[i] = true;
- continue;
- }
- else
- {
- isInside[i] = false;
- continue;
- }
- }
- if (arr[i + 1] <= size && arr[i] <= 3 * size)
- {
- isInside[i] = true;
- continue;
- }
- else
- {
- isInside[i] = false;
- continue;
- }
- }
- for (int i = 0; i < isInside.Length; i++)
- {
- if (isInside[i] == true)
- {
- Console.WriteLine("inside");
- }
- else
- {
- Console.WriteLine("outside");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment