Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import java.util.Scanner; /** * Created by entropy on 3/31/2017. */ public class Heavy { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int h = Integer.parseInt(scanner.nextLine()); int x = Integer.parseInt(scanner.nextLine()); int y = Integer.parseInt(scanner.nextLine()); boolean isInsidehorizontal = false; boolean isInsidevertical = false; boolean isBorderHorizontal = false; boolean isBorderVertical = false; boolean isBorder = false; if ((x > 0 && x < 3 * h) && (y < h && y > 0)) { isInsidehorizontal = true; } if (((x >= 0) && (x <= 3 * h) && (y == 0 || y == h)) || ((y >= 0) && (y <= h)) && ((x == 0 || x == 3 * h))) { isBorderHorizontal = true; } if ((x > h) && (x < 2 * h) && (y < 4 * h && y > h)) { isInsidevertical = true; } if (((x >= h) && (x <= 2 * h) && (y == 2 * h || y == 4 * h)) || ((y >= 2 * h) && (y <= 4 * h)) && ((x == h || x == 2 * h))) { isBorderVertical = true; } if (isBorderHorizontal == true || isBorderVertical == true) { isBorder = true; System.out.println("border"); } if (isInsidehorizontal == true || isInsidevertical == true) { System.out.println("Inside"); } else if (isBorder==false){ System.out.println("Outside"); } } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)