Submission #2123658
Source Code Expand
def operation(c0,c1,n): for i in range(n): if(c0[i]<c1[i]): c0[i] += 2 break for i in range(n): if(c0[i]>c1[i]): c1[i] += 1 break if(i==n-1): c1[i] += 1 if __name__=='__main__': n = int(raw_input()) c0 = map(int, raw_input().split()) c1 = map(int, raw_input().split()) nop = sum(c1) - sum(c0) #print c0 #print c1 if(nop>0): for i in range(nop): if(c0==c1): break operation(c0,c1,n) #print c0 #print c1 if (c0==c1): print 'Yes' else: print 'No'
Submission Info
Submission Time | |
---|---|
Task | B - Two Arrays |
User | takuya4880 |
Language | Python (2.7.6) |
Score | 0 |
Code Size | 597 Byte |
Status | RE |
Exec Time | 2104 ms |
Memory | 3916 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | 11 ms | 2568 KB |
0_001.txt | AC | 11 ms | 2568 KB |
0_002.txt | AC | 11 ms | 2692 KB |
1_003.txt | RE | 18 ms | 3460 KB |
1_004.txt | AC | 18 ms | 3460 KB |
1_005.txt | AC | 19 ms | 3816 KB |
1_006.txt | TLE | 2104 ms | 3916 KB |
1_007.txt | AC | 20 ms | 3816 KB |
1_008.txt | AC | 18 ms | 3688 KB |
1_009.txt | AC | 19 ms | 3688 KB |
1_010.txt | AC | 19 ms | 3816 KB |
1_011.txt | AC | 20 ms | 3688 KB |
1_012.txt | RE | 19 ms | 3816 KB |
1_013.txt | AC | 18 ms | 3688 KB |
1_014.txt | RE | 20 ms | 3816 KB |
1_015.txt | AC | 19 ms | 3816 KB |
1_016.txt | RE | 18 ms | 3688 KB |
1_017.txt | AC | 18 ms | 3816 KB |
1_018.txt | RE | 19 ms | 3816 KB |
1_019.txt | AC | 19 ms | 3688 KB |
1_020.txt | RE | 18 ms | 3688 KB |
1_021.txt | RE | 18 ms | 3688 KB |
1_022.txt | RE | 19 ms | 3688 KB |
1_023.txt | RE | 18 ms | 3688 KB |
1_024.txt | RE | 20 ms | 3688 KB |
1_025.txt | RE | 21 ms | 3816 KB |
1_026.txt | RE | 19 ms | 3688 KB |
1_027.txt | RE | 18 ms | 3816 KB |