Submission #9807293


Source Code Expand

Copy
N=int(input())
A=list(map(int, input().split()))
cur=1
for a in A:
  if a==cur:
    cur+=1
if cur==1:
  print(-1)
else:
  print(N-cur+1)

Submission Info

Submission Time
Task D - Brick Break
User jopopyv
Language Python3 (3.4.3)
Score 400
Code Size 145 Byte
Status
Exec Time 95 ms
Memory 24744 KB

Test Cases

Set Name Score / Max Score Test Cases
All 400 / 400 sample_01, sample_02, sample_03, sample_04, testcase_0, testcase_1, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15, testcase_16, testcase_17, testcase_18, testcase_19, testcase_2, testcase_20, testcase_21, testcase_3, testcase_4, testcase_5, testcase_6, testcase_7, testcase_8, testcase_9
Sample 0 / 0 sample_01, sample_02, sample_03, sample_04
Case Name Status Exec Time Memory
sample_01 17 ms 2940 KB
sample_02 17 ms 2940 KB
sample_03 17 ms 2940 KB
sample_04 17 ms 2940 KB
testcase_0 39 ms 10820 KB
testcase_1 64 ms 19992 KB
testcase_10 75 ms 24544 KB
testcase_11 87 ms 24744 KB
testcase_12 85 ms 24744 KB
testcase_13 87 ms 23588 KB
testcase_14 90 ms 24744 KB
testcase_15 89 ms 24616 KB
testcase_16 85 ms 24744 KB
testcase_17 85 ms 24744 KB
testcase_18 86 ms 24744 KB
testcase_19 89 ms 23592 KB
testcase_2 75 ms 24744 KB
testcase_20 84 ms 24456 KB
testcase_21 85 ms 24744 KB
testcase_3 63 ms 20356 KB
testcase_4 59 ms 18708 KB
testcase_5 79 ms 24744 KB
testcase_6 64 ms 18276 KB
testcase_7 25 ms 5708 KB
testcase_8 95 ms 24744 KB
testcase_9 59 ms 7148 KB