Wrong Answer
Code
N = int(input())
arr = list(map(int, input().split()))
oddCount = 0
even_count = 0
none=0
for i in range(N):
if arr[i] % 2 != 0:
oddCount += 1
elif arr[i]==0:
none+=1
else:
even_count += 1
if oddCount % 2 != 0:
print(-1)
else:
print(oddCount // 2 + even_count)
Information
- Submit By
- Type
- Submission
- Problem
- P1042 Array partition
- Contest
- TLE_Headquarters - round #1
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-03-27 16:42:32
- Judged At
- 2024-11-11 03:38:14
- Judged By
- Score
- 50
- Total Time
- 62ms
- Peak Memory
- 12.316 MiB