Submission #10002355


Source Code Expand

Copy
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

data = np.fromstring(read(), np.int64, sep=' ')

N, K  = data[:2]
P = data[2:] + 1

Pcum = np.zeros(N + 1, np.int32)
Pcum[1:] = P.cumsum()

length_K_sums = Pcum[K:] - Pcum[0:-K]
print(length_K_sums.max() / 2)

Submission Info

Submission Time
Task D - Dice in Line
User maspy
Language Python (3.4.3)
Score 400
Code Size 361 Byte
Status AC
Exec Time 158 ms
Memory 18220 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 14
Set Name Test Cases
Sample 01.txt, 02.txt, 03.txt
All 01.txt, 02.txt, 03.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt
Case Name Status Exec Time Memory
01.txt AC 147 ms 12428 KB
02.txt AC 146 ms 12472 KB
03.txt AC 146 ms 12428 KB
10.txt AC 157 ms 18176 KB
11.txt AC 156 ms 18036 KB
12.txt AC 156 ms 17900 KB
13.txt AC 157 ms 18220 KB
14.txt AC 157 ms 17900 KB
15.txt AC 146 ms 12428 KB
16.txt AC 146 ms 12428 KB
17.txt AC 148 ms 12428 KB
18.txt AC 157 ms 18176 KB
19.txt AC 158 ms 18176 KB
20.txt AC 156 ms 17832 KB