Submission #23099171


Source Code Expand

import sys

input = sys.stdin.readline


def main():
    _, k = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    dist = sum(abs(i - j) for i, j in zip(a, b))
    print('Yes' if dist <= k and dist % 2 == k % 2 else 'No')


if __name__ == "__main__":
    main()

Submission Info

Submission Time
Task 024 - Select +/- One(★2)
User riantkb
Language Python (3.8.2)
Score 2
Code Size 321 Byte
Status AC
Exec Time 27 ms
Memory 9216 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 2 / 2
Status
AC × 3
AC × 23
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 10_hand_01.txt, 10_hand_02.txt, 10_hand_03.txt, 20_a_equal_b_no.txt, 20_a_equal_b_yes.txt, 50_small_gap_01.txt, 50_small_gap_02.txt, 50_small_gap_03.txt, 50_small_gap_04.txt, 50_small_gap_05.txt, 80_random_small_01.txt, 80_random_small_02.txt, 80_random_small_03.txt, 80_random_small_04.txt, 80_random_small_05.txt, 90_random_large_01.txt, 90_random_large_02.txt, 90_random_large_03.txt, 90_random_large_04.txt, 90_random_large_05.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 20 ms 9012 KiB
00_sample_02.txt AC 20 ms 8860 KiB
00_sample_03.txt AC 19 ms 9008 KiB
10_hand_01.txt AC 19 ms 8856 KiB
10_hand_02.txt AC 25 ms 9104 KiB
10_hand_03.txt AC 19 ms 8956 KiB
20_a_equal_b_no.txt AC 21 ms 8852 KiB
20_a_equal_b_yes.txt AC 21 ms 8852 KiB
50_small_gap_01.txt AC 27 ms 9068 KiB
50_small_gap_02.txt AC 21 ms 9216 KiB
50_small_gap_03.txt AC 19 ms 9124 KiB
50_small_gap_04.txt AC 22 ms 9128 KiB
50_small_gap_05.txt AC 22 ms 8960 KiB
80_random_small_01.txt AC 24 ms 8960 KiB
80_random_small_02.txt AC 24 ms 9068 KiB
80_random_small_03.txt AC 19 ms 8960 KiB
80_random_small_04.txt AC 19 ms 8864 KiB
80_random_small_05.txt AC 20 ms 8956 KiB
90_random_large_01.txt AC 19 ms 9152 KiB
90_random_large_02.txt AC 19 ms 8948 KiB
90_random_large_03.txt AC 23 ms 9112 KiB
90_random_large_04.txt AC 18 ms 8916 KiB
90_random_large_05.txt AC 21 ms 8964 KiB