QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#376395 | #2526. Imprecise Computer | FOY# | WA | 155ms | 26624kb | Python3 | 185b | 2024-04-04 09:18:21 | 2024-04-04 09:18:21 |
Judging History
answer
n = int(input())
a = [int(i) for i in input().split()]
good = True
for i in a:
if i > 2: good = False
if sum(a)%2 == 1: good = False
if good: print('YES')
else: print('NO')
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 9ms
memory: 9332kb
input:
10 1 2 3 3 3 3 2 1 2 2
output:
NO
result:
ok single line: 'NO'
Test #2:
score: 0
Accepted
time: 9ms
memory: 9324kb
input:
10 0 0 0 0 0 0 0 0 0 1
output:
NO
result:
ok single line: 'NO'
Test #3:
score: 0
Accepted
time: 6ms
memory: 9432kb
input:
10 0 1 0 1 0 1 0 1 0 1
output:
NO
result:
ok single line: 'NO'
Test #4:
score: 0
Accepted
time: 10ms
memory: 9456kb
input:
10 1 0 1 0 1 0 1 0 1 0
output:
NO
result:
ok single line: 'NO'
Test #5:
score: 0
Accepted
time: 2ms
memory: 9464kb
input:
10 1 2 2 2 2 2 2 2 0 1
output:
YES
result:
ok single line: 'YES'
Test #6:
score: 0
Accepted
time: 9ms
memory: 9340kb
input:
10 1 2 2 2 2 2 2 2 0 0
output:
NO
result:
ok single line: 'NO'
Test #7:
score: 0
Accepted
time: 134ms
memory: 26512kb
input:
1000000 0 1 2 1 0 1 2 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 1 2 0 0 1 1 2 2 0 2 0 2 1 1 0 2 2 0 0 2 1 0 0 0 1 0 2 1 1 1 0 1 0 1 1 1 0 1 1 1 2 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 0 2 2 1 1 0 2 0 2 2 1 1 1 0 1 2 1 0 1 0 1 0 0 1 1 0 0 1 2 0 2 1 1 1 0 1 0 1 0 0 0 0 0 1 2 1 1 0 0 1 0 1 ...
output:
NO
result:
ok single line: 'NO'
Test #8:
score: 0
Accepted
time: 155ms
memory: 26496kb
input:
1000000 1 0 0 0 2 0 2 2 1 1 0 2 0 0 0 1 0 1 1 1 2 2 2 2 1 0 0 1 2 1 1 0 0 0 2 0 0 0 2 2 2 1 1 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 0 2 1 1 1 0 0 0 1 2 2 0 0 0 0 2 2 2 1 1 0 0 1 0 1 1 1 0 2 1 1 0 2 1 1 1 1 1 0 0 0 1 2 1 1 1 1 1 0 1 2 2 0 2 1 1 0 2 0 0 1 1 2 2 2 0 1 1 2 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 2 ...
output:
NO
result:
ok single line: 'NO'
Test #9:
score: 0
Accepted
time: 127ms
memory: 26488kb
input:
1000000 1 2 0 0 0 1 1 1 0 1 2 2 2 0 0 1 0 1 2 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 2 0 1 0 1 1 1 0 2 2 2 1 0 1 1 1 2 2 0 0 0 0 0 0 2 0 0 1 0 0 1 2 0 2 0 1 0 0 1 1 0 1 1 0 1 0 2 2 0 1 0 0 0 0 0 1 1 1 0 2 0 2 2 0 1 1 0 1 0 1 1 0 0 1 0 0 0 2 2 2 1 0 1 2 1 1 0 0 2 0 1 1 2 2 2 1 1 0 2 1 0 1 1 0 1 1 0 0 1 0 2 0 ...
output:
YES
result:
ok single line: 'YES'
Test #10:
score: 0
Accepted
time: 134ms
memory: 26576kb
input:
1000000 0 0 0 0 0 1 2 2 2 1 1 1 0 1 0 2 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 2 0 2 2 2 0 0 0 0 0 2 0 1 0 1 0 2 0 0 2 2 2 0 1 0 1 0 0 0 2 0 0 1 0 0 1 1 1 0 1 1 0 2 1 1 2 1 1 1 1 2 1 1 0 0 1 0 1 2 2 1 0 0 0 0 1 0 1 1 0 2 1 1 2 1 1 1 0 0 1 2 2 1 1 1 1 0 2 2 2 2 1 1 2 1 0 0 1 1 1 2 1 1 2 1 0 0 0 0 0 0 0 1 ...
output:
NO
result:
ok single line: 'NO'
Test #11:
score: 0
Accepted
time: 130ms
memory: 26488kb
input:
1000000 1 1 1 0 2 2 2 0 0 1 0 0 0 1 0 1 0 1 0 1 1 2 0 2 2 0 0 1 1 0 2 1 0 1 0 1 0 1 0 2 2 0 1 0 1 0 2 1 0 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 2 0 1 0 0 1 0 1 1 1 1 0 1 0 1 2 0 2 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 0 2 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 1 2 2 2 2 1 1 2 0 ...
output:
YES
result:
ok single line: 'YES'
Test #12:
score: 0
Accepted
time: 10ms
memory: 9320kb
input:
10 2 1 1 1 1 1 1 1 1 1
output:
NO
result:
ok single line: 'NO'
Test #13:
score: 0
Accepted
time: 117ms
memory: 26548kb
input:
1000000 1 2 0 0 1 1 1 0 1 2 1 0 0 1 0 1 0 1 2 2 0 0 1 1 0 1 1 2 0 1 0 1 0 2 2 2 2 0 2 0 2 1 1 0 1 1 1 0 1 0 0 2 1 0 0 1 1 0 1 0 1 1 2 0 1 1 0 1 0 0 1 1 0 1 2 0 0 1 0 0 1 1 0 0 1 2 1 0 0 0 0 1 1 1 0 1 1 1 1 0 0 2 0 0 2 1 0 1 1 0 0 1 1 1 0 0 1 1 2 1 1 1 1 0 2 0 1 1 1 0 0 0 0 0 0 1 2 1 1 0 2 1 0 0 1 0 ...
output:
YES
result:
ok single line: 'YES'
Test #14:
score: 0
Accepted
time: 118ms
memory: 26444kb
input:
1000000 1 0 0 0 2 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 2 0 1 0 0 0 1 2 0 1 1 2 1 1 0 1 1 2 2 1 1 2 2 1 0 1 1 1 0 0 2 2 2 1 0 1 2 2 0 0 0 1 1 1 0 0 0 0 1 0 0 0 2 1 1 1 1 0 1 1 2 0 1 1 0 1 1 2 2 2 0 2 1 1 1 1 2 1 0 1 1 0 1 0 1 1 0 0 2 0 0 0 2 2 0 2 1 1 0 0 2 1 1 2 1 0 1 1 1 1 0 1 0 0 0 ...
output:
NO
result:
ok single line: 'NO'
Test #15:
score: -100
Wrong Answer
time: 140ms
memory: 26624kb
input:
1000000 1 2 2 0 0 1 0 1 2 1 1 0 2 1 0 1 1 1 1 0 1 1 0 0 1 0 2 1 1 1 1 1 0 1 1 1 0 1 0 0 0 1 2 0 1 0 1 2 1 1 0 0 0 1 1 2 0 1 1 2 1 0 1 0 0 2 1 0 1 1 1 1 1 2 0 0 2 1 1 2 1 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 2 0 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 2 0 1 0 0 0 1 1 1 0 0 2 1 0 0 1 0 0 ...
output:
YES
result:
wrong answer 1st lines differ - expected: 'NO', found: 'YES'