Submission #44257504


Source Code Expand

import collections
import heapq
N = int(input())
P = list(map(int, input().split(' ')))
if len(P) == 1:
    print(0)
else:
    print(max(0, max(P[1:]) + 1 - P[0]))

Submission Info

Submission Time
Task A - To Be Saikyo
User cocodrips
Language PyPy3 (7.3.0)
Score 100
Code Size 170 Byte
Status AC
Exec Time 66 ms
Memory 64836 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 66 ms 64800 KiB
00_sample_01.txt AC 54 ms 64456 KiB
00_sample_02.txt AC 55 ms 64556 KiB
01_random_00.txt AC 53 ms 64616 KiB
01_random_01.txt AC 53 ms 64704 KiB
01_random_02.txt AC 53 ms 64440 KiB
01_random_03.txt AC 56 ms 64608 KiB
01_random_04.txt AC 55 ms 64656 KiB
01_random_05.txt AC 52 ms 64524 KiB
01_random_06.txt AC 53 ms 64832 KiB
01_random_07.txt AC 53 ms 64588 KiB
01_random_08.txt AC 54 ms 64696 KiB
02_handmade_00.txt AC 54 ms 64836 KiB
02_handmade_01.txt AC 54 ms 64616 KiB
02_handmade_02.txt AC 56 ms 64524 KiB