Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Point
- {
- class Program
- {
- static void Main(string[] args)
- {
- int h = int.Parse(Console.ReadLine());
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- var outRect1 = (x < 0 || x > 3 * h) || (y < 0 || y > h);
- var outRect2 = (x < h || x > 2 * h) || (y < h || y > 4 * h);
- var inRect1 = (x > 0 && x < 3 * h) && (y > 0 && y < h);
- var inRect2 = (x > h && x < 2 * h) && (y > h && y < 4 * h);
- var border = (x > h && x < 2 * h) && y == h;
- if (outRect1 && outRect2)
- {
- Console.WriteLine("outside");
- }
- else if (inRect1 || inRect2 || border)
- {
- Console.WriteLine("inside");
- }
- else
- {
- Console.WriteLine("border");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement