Contest Duration: - (local time) (100 minutes) Back to Home

Submission #8967862

Source Code Expand

Copy
```import sys

def solve():
mod = 10 ** 9 + 7
if s[-1] == "1":
print(-1)
else:
now = n
ans = []
while True:
b = False
for j in range(now - m, now):
if 0 <= j < n:
if s[j] != "1":
b = True
ans.append(now - j)
now = j
if j == 0:
ans.reverse()
print(*ans)
exit()
break
if not b:
print(-1)
exit()

if __name__ == '__main__':
solve()
```

#### Submission Info

Submission Time 2019-12-15 20:12:38+0900 F - Sugoroku XXXHOLiC PyPy3 (2.4.0) 600 853 Byte AC 224 ms 49648 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
 AC × 3
 AC × 60
Set Name Test Cases
Sample 00-sample-00, 00-sample-01, 00-sample-02
All 00-sample-00, 00-sample-01, 00-sample-02, 01-handmade-03, 01-handmade-04, 01-handmade-05, 01-handmade-06, 01-handmade-07, 01-handmade-08, 01-handmade-09, 01-handmade-10, 02-random-11, 02-random-12, 02-random-13, 02-random-14, 02-random-15, 02-random-16, 02-random-17, 02-random-18, 02-random-19, 02-random-20, 02-random-21, 02-random-22, 02-random-23, 02-random-24, 02-random-25, 02-random-26, 02-random-27, 02-random-28, 02-random-29, 02-random-30, 02-random-31, 02-random-32, 02-random-33, 02-random-34, 02-random-35, 02-random-36, 02-random-37, 02-random-38, 02-random-39, 02-random-40, 02-random-41, 02-random-42, 02-random-43, 02-random-44, 02-random-45, 02-random-46, 02-random-47, 02-random-48, 02-random-49, 02-random-50, 02-random-51, 02-random-52, 02-random-53, 02-random-54, 02-random-55, 02-random-56, 02-random-57, 02-random-58, 02-random-59
Case Name Status Exec Time Memory
00-sample-00 AC 172 ms 38256 KB
00-sample-01 AC 163 ms 38256 KB
00-sample-02 AC 168 ms 38256 KB
01-handmade-03 AC 172 ms 38384 KB
01-handmade-04 AC 195 ms 41328 KB
01-handmade-05 AC 210 ms 41456 KB
01-handmade-06 AC 206 ms 41968 KB
01-handmade-07 AC 185 ms 39280 KB
01-handmade-08 AC 173 ms 39152 KB
01-handmade-09 AC 224 ms 49648 KB
01-handmade-10 AC 181 ms 41584 KB
02-random-11 AC 168 ms 39280 KB
02-random-12 AC 167 ms 39152 KB
02-random-13 AC 169 ms 39152 KB
02-random-14 AC 169 ms 39280 KB
02-random-15 AC 176 ms 38896 KB
02-random-16 AC 195 ms 41840 KB
02-random-17 AC 178 ms 39152 KB
02-random-18 AC 171 ms 38896 KB
02-random-19 AC 164 ms 39280 KB
02-random-20 AC 181 ms 38768 KB
02-random-21 AC 185 ms 39152 KB
02-random-22 AC 167 ms 39280 KB
02-random-23 AC 171 ms 39280 KB
02-random-24 AC 171 ms 39152 KB
02-random-25 AC 172 ms 39152 KB
02-random-26 AC 178 ms 39280 KB
02-random-27 AC 178 ms 38896 KB
02-random-28 AC 176 ms 38768 KB
02-random-29 AC 169 ms 38768 KB
02-random-30 AC 166 ms 39152 KB
02-random-31 AC 165 ms 39280 KB
02-random-32 AC 179 ms 39280 KB
02-random-33 AC 173 ms 39024 KB
02-random-34 AC 164 ms 39152 KB
02-random-35 AC 173 ms 39280 KB
02-random-36 AC 175 ms 39152 KB
02-random-37 AC 199 ms 41712 KB
02-random-38 AC 179 ms 38896 KB
02-random-39 AC 167 ms 39280 KB
02-random-40 AC 165 ms 39152 KB
02-random-41 AC 170 ms 38768 KB
02-random-42 AC 177 ms 39280 KB
02-random-43 AC 166 ms 39280 KB
02-random-44 AC 166 ms 39152 KB
02-random-45 AC 162 ms 39152 KB
02-random-46 AC 167 ms 39152 KB
02-random-47 AC 181 ms 39280 KB
02-random-48 AC 165 ms 38768 KB
02-random-49 AC 178 ms 39280 KB
02-random-50 AC 178 ms 38896 KB
02-random-51 AC 181 ms 39280 KB
02-random-52 AC 183 ms 39152 KB
02-random-53 AC 182 ms 38896 KB
02-random-54 AC 173 ms 39280 KB
02-random-55 AC 175 ms 39280 KB
02-random-56 AC 168 ms 38768 KB
02-random-57 AC 173 ms 39408 KB
02-random-58 AC 166 ms 38896 KB
02-random-59 AC 185 ms 38896 KB