提出 #75627236


ソースコード 拡げる

import sys
input = sys.stdin.readline

n,k = map(int,input().split())
k -= 1
L = []
for _ in range(n):
  x,*A = map(int,input().split())
  L.append(A)

A = list(map(int,input().split()))
c = 0
for i in range(n):
  c += A[i]*len(L[i])
  if c > k:
    c -= A[i]*len(L[i])
    idx = i
    break

x = k-c
l = len(L[idx])
print(L[idx][x%l])

提出情報

提出日時
問題 C - Long Sequence
ユーザ Cenix820
言語 Python (PyPy 3.11-v7.3.20)
得点 300
コード長 356 Byte
結果 AC
実行時間 165 ms
メモリ 158328 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 23
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 52 ms 79436 KiB
00_sample_01.txt AC 52 ms 79764 KiB
00_sample_02.txt AC 52 ms 79740 KiB
01_random_00.txt AC 101 ms 118016 KiB
01_random_01.txt AC 132 ms 134956 KiB
01_random_02.txt AC 89 ms 110944 KiB
01_random_03.txt AC 126 ms 130268 KiB
01_random_04.txt AC 127 ms 130916 KiB
01_random_05.txt AC 112 ms 124072 KiB
01_random_06.txt AC 93 ms 114064 KiB
01_random_07.txt AC 165 ms 155340 KiB
01_random_08.txt AC 83 ms 109220 KiB
01_random_09.txt AC 154 ms 142196 KiB
01_random_10.txt AC 88 ms 140152 KiB
01_random_11.txt AC 87 ms 140296 KiB
01_random_12.txt AC 87 ms 140056 KiB
01_random_13.txt AC 163 ms 158200 KiB
01_random_14.txt AC 164 ms 158296 KiB
01_random_15.txt AC 158 ms 158328 KiB
01_random_16.txt AC 155 ms 146328 KiB
01_random_17.txt AC 136 ms 134716 KiB
01_random_18.txt AC 118 ms 128260 KiB
01_random_19.txt AC 81 ms 108968 KiB