Submission #5964250


Source Code Expand

Copy
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int width = sc.nextInt();
        int height = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        int  count = 0;
        if (x *2 == width && y * 2 == height){
            count = 1;
        }

        double area = (double)width * (double)height / 2.0;

        System.out.println(String.valueOf(area) + " " + String.valueOf(count));

    }
}

Submission Info

Submission Time
Task C - Rectangle Cutting
User alkwest
Language Java8 (OpenJDK 1.8.0)
Score 300
Code Size 537 Byte
Status
Exec Time 101 ms
Memory 22612 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt
All 300 / 300 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt 92 ms 18644 KB
02.txt 94 ms 19028 KB
03.txt 94 ms 21844 KB
04.txt 101 ms 21204 KB
05.txt 95 ms 20820 KB
06.txt 94 ms 18772 KB
07.txt 94 ms 19924 KB
08.txt 95 ms 21076 KB
09.txt 94 ms 19156 KB
10.txt 94 ms 22612 KB
s1.txt 93 ms 20692 KB
s2.txt 94 ms 20692 KB