Submission #3562308
Source Code Expand
# import math N = int(input()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] cnt = [0,0] for ai, bi in zip(a, b): if ai < bi: cnt[0] += (bi - ai) // 2 elif ai > bi: cnt[1] += ai - bi if cnt[0] < cnt[1]: print("No") exit() if sum(b)-sum(a) >= cnt[0]: print("Yes") else: print("No")
Submission Info
Submission Time | |
---|---|
Task | B - Two Arrays |
User | shirosha2 |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 372 Byte |
Status | AC |
Exec Time | 28 ms |
Memory | 4596 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt, 1_027.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 18 ms | 3064 KB |
0_001.txt | AC | 18 ms | 3064 KB |
0_002.txt | AC | 18 ms | 3064 KB |
1_003.txt | AC | 26 ms | 4252 KB |
1_004.txt | AC | 27 ms | 4124 KB |
1_005.txt | AC | 25 ms | 4468 KB |
1_006.txt | AC | 26 ms | 4468 KB |
1_007.txt | AC | 26 ms | 4468 KB |
1_008.txt | AC | 25 ms | 4468 KB |
1_009.txt | AC | 25 ms | 4468 KB |
1_010.txt | AC | 25 ms | 4468 KB |
1_011.txt | AC | 28 ms | 4596 KB |
1_012.txt | AC | 28 ms | 4468 KB |
1_013.txt | AC | 26 ms | 4468 KB |
1_014.txt | AC | 26 ms | 4468 KB |
1_015.txt | AC | 27 ms | 4468 KB |
1_016.txt | AC | 26 ms | 4532 KB |
1_017.txt | AC | 27 ms | 4532 KB |
1_018.txt | AC | 27 ms | 4532 KB |
1_019.txt | AC | 27 ms | 4532 KB |
1_020.txt | AC | 27 ms | 4404 KB |
1_021.txt | AC | 27 ms | 4400 KB |
1_022.txt | AC | 26 ms | 4404 KB |
1_023.txt | AC | 26 ms | 4404 KB |
1_024.txt | AC | 27 ms | 4596 KB |
1_025.txt | AC | 27 ms | 4596 KB |
1_026.txt | AC | 27 ms | 4596 KB |
1_027.txt | AC | 27 ms | 4596 KB |