Submission #73491286


Source Code Expand

N = int(input())
A = list(map(int,input().split()))
dp = {}
ans = 0
for a in A:
    dp[a] = dp.get(a-1,0)+1
    ans = max(ans,dp[a])
print(ans)

Submission Info

Submission Time
Task D - Max Straight
User glaceon1020
Language Python (PyPy 3.11-v7.3.20)
Score 400
Code Size 150 Byte
Status AC
Exec Time 103 ms
Memory 166336 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 26
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, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 45 ms 79608 KiB
00_sample_01.txt AC 44 ms 79396 KiB
00_sample_02.txt AC 43 ms 79516 KiB
01_random_00.txt AC 43 ms 79336 KiB
01_random_01.txt AC 43 ms 79588 KiB
01_random_02.txt AC 43 ms 79388 KiB
01_random_03.txt AC 88 ms 165896 KiB
01_random_04.txt AC 96 ms 166336 KiB
01_random_05.txt AC 80 ms 137712 KiB
01_random_06.txt AC 64 ms 112500 KiB
01_random_07.txt AC 103 ms 166100 KiB
01_random_08.txt AC 62 ms 107668 KiB
01_random_09.txt AC 46 ms 79760 KiB
01_random_10.txt AC 81 ms 140060 KiB
01_random_11.txt AC 81 ms 140460 KiB
01_random_12.txt AC 53 ms 92248 KiB
01_random_13.txt AC 83 ms 140744 KiB
01_random_14.txt AC 50 ms 88036 KiB
01_random_15.txt AC 82 ms 140664 KiB
01_random_16.txt AC 66 ms 115976 KiB
01_random_17.txt AC 96 ms 158496 KiB
01_random_18.txt AC 100 ms 166100 KiB
01_random_19.txt AC 99 ms 163312 KiB
01_random_20.txt AC 82 ms 144884 KiB
01_random_21.txt AC 101 ms 163296 KiB
01_random_22.txt AC 54 ms 93744 KiB