Submission #76387286


Source Code Expand

N,M = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = 0
for i in range(M):
  C += A[B[i]-1]
print(C)

Submission Info

Submission Time
Task A - Contest Result
User ihira
Language Python (PyPy 3.11-v7.3.20)
Score 100
Code Size 157 Byte
Status AC
Exec Time 55 ms
Memory 79952 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
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, 02_max_00.txt, 03_min_00.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 52 ms 79580 KiB
00_sample_01.txt AC 53 ms 79764 KiB
00_sample_02.txt AC 53 ms 79752 KiB
01_random_00.txt AC 55 ms 79660 KiB
01_random_01.txt AC 55 ms 79952 KiB
01_random_02.txt AC 52 ms 79764 KiB
01_random_03.txt AC 52 ms 79800 KiB
01_random_04.txt AC 52 ms 79856 KiB
01_random_05.txt AC 52 ms 79800 KiB
01_random_06.txt AC 52 ms 79628 KiB
01_random_07.txt AC 53 ms 79928 KiB
01_random_08.txt AC 53 ms 79888 KiB
01_random_09.txt AC 52 ms 79824 KiB
02_max_00.txt AC 51 ms 79908 KiB
03_min_00.txt AC 50 ms 79628 KiB