Submission #19526659


Source Code Expand

Copy
import numpy as np
N, K = map(int, input().split())
A = list(map(int, input().split()))
counts = np.bincount(A)
counts = np.minimum(counts, K)
counts = np.minimum.accumulate(counts)
ans = counts.sum()
print(ans)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
import numpy as np

N, K = map(int, input().split())
A = list(map(int, input().split()))

counts = np.bincount(A)
counts = np.minimum(counts, K)
counts = np.minimum.accumulate(counts)
ans = counts.sum()
print(ans)

Submission Info

Submission Time
Task B - Mex Boxes
User yamasaKit
Language Python (3.8.2)
Score 400
Code Size 214 Byte
Status AC
Exec Time 205 ms
Memory 63296 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 55
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, hand_12.txt, hand_13.txt, hand_14.txt, hand_15.txt, hand_16.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt, random_30.txt, random_31.txt, random_32.txt, random_33.txt, random_34.txt, random_35.txt, random_36.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 174 ms 31888 KB
hand_02.txt AC 168 ms 31936 KB
hand_03.txt AC 161 ms 31824 KB
hand_04.txt AC 169 ms 32096 KB
hand_05.txt AC 189 ms 53104 KB
hand_06.txt AC 187 ms 53496 KB
hand_07.txt AC 191 ms 52976 KB
hand_08.txt AC 192 ms 53240 KB
hand_09.txt AC 204 ms 61812 KB
hand_10.txt AC 203 ms 63004 KB
hand_11.txt AC 199 ms 63296 KB
hand_12.txt AC 201 ms 62928 KB
hand_13.txt AC 204 ms 61408 KB
hand_14.txt AC 201 ms 62108 KB
hand_15.txt AC 205 ms 61152 KB
hand_16.txt AC 203 ms 61284 KB
random_01.txt AC 153 ms 41300 KB
random_02.txt AC 147 ms 39300 KB
random_03.txt AC 175 ms 49356 KB
random_04.txt AC 171 ms 46528 KB
random_05.txt AC 151 ms 40408 KB
random_06.txt AC 148 ms 40500 KB
random_07.txt AC 170 ms 47248 KB
random_08.txt AC 165 ms 45676 KB
random_09.txt AC 147 ms 38444 KB
random_10.txt AC 147 ms 38648 KB
random_11.txt AC 167 ms 45664 KB
random_12.txt AC 155 ms 41240 KB
random_13.txt AC 148 ms 38488 KB
random_14.txt AC 179 ms 46832 KB
random_15.txt AC 173 ms 46988 KB
random_16.txt AC 148 ms 38980 KB
random_17.txt AC 167 ms 46616 KB
random_18.txt AC 169 ms 45876 KB
random_19.txt AC 147 ms 38716 KB
random_20.txt AC 139 ms 38748 KB
random_21.txt AC 163 ms 45000 KB
random_22.txt AC 154 ms 42968 KB
random_23.txt AC 144 ms 39232 KB
random_24.txt AC 170 ms 47848 KB
random_25.txt AC 166 ms 44060 KB
random_26.txt AC 149 ms 39212 KB
random_27.txt AC 146 ms 38884 KB
random_28.txt AC 168 ms 45968 KB
random_29.txt AC 150 ms 40408 KB
random_30.txt AC 146 ms 38092 KB
random_31.txt AC 142 ms 38072 KB
random_32.txt AC 174 ms 48288 KB
random_33.txt AC 164 ms 44524 KB
random_34.txt AC 154 ms 41700 KB
random_35.txt AC 147 ms 38260 KB
random_36.txt AC 173 ms 46768 KB
sample_01.txt AC 116 ms 26972 KB
sample_02.txt AC 116 ms 27016 KB
sample_03.txt AC 116 ms 26892 KB


2025-03-14 (Fri)
13:21:43 +00:00