Submission #1168150


Source Code Expand

Copy
using System;
using System.Collections.Generic;
public class Aprob {
    public static void Main() {
        string[] readSome = new string[3];
        readSome = Console.ReadLine().Split(' ');
        int W = int.Parse(readSome[0]);
        int a = int.Parse(readSome[1]);
        int b = int.Parse(readSome[2]);
        int c1 = b - (a + W);
        int c2 = a - (b + W);
        if (c1 <= 0 & c2 <= 0) {
            Console.WriteLine(0);
        } else {
            Console.WriteLine(Math.Max(c1,c2));
        }
    }
}

Submission Info

Submission Time
Task B - NarrowRectanglesEasy
User shomu36
Language C# (Mono 4.6.2.0)
Score 200
Code Size 540 Byte
Status
Exec Time 22 ms
Memory 13140 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt
All 200 / 200 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt
Case Name Status Exec Time Memory
0_000.txt 22 ms 11220 KB
0_001.txt 21 ms 9044 KB
0_002.txt 22 ms 11092 KB
0_003.txt 21 ms 11092 KB
1_004.txt 22 ms 13140 KB
1_005.txt 22 ms 11092 KB
1_006.txt 21 ms 13140 KB
1_007.txt 21 ms 9044 KB
1_008.txt 20 ms 11092 KB
1_009.txt 21 ms 11092 KB