Submission #69301708
Source Code Expand
N = int(input()) L = list(map(int, input().split())) room = [1] * (N + 1) room[0] = room[N] = 0 for i, l in enumerate(L): if l: break room[i + 1] = 0 for i, l in reversed(list(enumerate(L))): if l: break room[i] = 0 ans = sum(room) print(ans)
Submission Info
Submission Time | |
---|---|
Task | B - Locked Rooms |
User | mo12412 |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 200 |
Code Size | 289 Byte |
Status | AC |
Exec Time | 57 ms |
Memory | 76692 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample00.txt, sample01.txt, sample02.txt |
All | sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt, testcase20.txt, testcase21.txt, testcase22.txt, testcase23.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample00.txt | AC | 54 ms | 76620 KiB |
sample01.txt | AC | 54 ms | 76212 KiB |
sample02.txt | AC | 54 ms | 76604 KiB |
testcase00.txt | AC | 54 ms | 76296 KiB |
testcase01.txt | AC | 54 ms | 76232 KiB |
testcase02.txt | AC | 55 ms | 76428 KiB |
testcase03.txt | AC | 54 ms | 76408 KiB |
testcase04.txt | AC | 55 ms | 76468 KiB |
testcase05.txt | AC | 55 ms | 76420 KiB |
testcase06.txt | AC | 55 ms | 76608 KiB |
testcase07.txt | AC | 55 ms | 76308 KiB |
testcase08.txt | AC | 54 ms | 76404 KiB |
testcase09.txt | AC | 54 ms | 76544 KiB |
testcase10.txt | AC | 55 ms | 76460 KiB |
testcase11.txt | AC | 54 ms | 76344 KiB |
testcase12.txt | AC | 54 ms | 76572 KiB |
testcase13.txt | AC | 53 ms | 76256 KiB |
testcase14.txt | AC | 53 ms | 76692 KiB |
testcase15.txt | AC | 53 ms | 76532 KiB |
testcase16.txt | AC | 53 ms | 76568 KiB |
testcase17.txt | AC | 53 ms | 76504 KiB |
testcase18.txt | AC | 53 ms | 76368 KiB |
testcase19.txt | AC | 57 ms | 76420 KiB |
testcase20.txt | AC | 53 ms | 76316 KiB |
testcase21.txt | AC | 53 ms | 76272 KiB |
testcase22.txt | AC | 53 ms | 76276 KiB |
testcase23.txt | AC | 53 ms | 76580 KiB |