/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 21ms 2.871 MiB
#2 Accepted 22ms 2.977 MiB
#3 Wrong Answer 22ms 3.02 MiB
#4 Accepted 21ms 3.121 MiB
#5 Wrong Answer 21ms 3.113 MiB

Code

#Fahmi_Nafi_46

n = int(input())
x = list(map(int, input().split()))
count = 0
odd = 0

for i in range(n):
    if x[i] % 2 == 0:
        count += 1
    else:
        odd += 1
if odd % 2 != 0:
    print(-1)
else:
    print(count+1)

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:49:29
Judged At
2024-11-11 03:38:01
Judged By
Score
20
Total Time
22ms
Peak Memory
3.121 MiB