Wrong Answer
Code
n = int(input())
x = list(map(int, input().split()))
count = 0
odd = 0
new = []
for i in range(n):
if x[i] % 2 != 0:
odd += 1
if odd % 2 != 0:
print(-1)
else:
z = set(x)
for i in z:
if i % 2 == 0:
count += 1
print(count+(odd//2))
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 17:22:22
- Judged At
- 2024-11-11 03:37:36
- Judged By
- Score
- 50
- Total Time
- 79ms
- Peak Memory
- 16.125 MiB