QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#734250 | #4295. Check Markers | riad_alarefi# | WA | 16ms | 10448kb | Python3 | 823b | 2024-11-11 07:47:34 | 2024-11-11 07:47:35 |
Judging History
answer
def solve():
import sys
input = sys.stdin.read
data = input().split()
index = 0
t = int(data[index])
index += 1
results = []
for _ in range(t):
n = int(data[index])
index += 1
a = list(map(int, data[index:index + n]))
index += n
b = list(map(int, data[index:index + n]))
index += n
good_markers = []
for i in range(n):
good_markers.append(b[i])
good_markers.sort(reverse=True)
# We need at least 2 good markers from different colors
if len(good_markers) < 2 or good_markers[0] == 0 or good_markers[1] == 0:
results.append("YES")
else:
results.append("NO")
print('\n'.join(results))
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 16ms
memory: 10448kb
input:
3 3 1 2 1 2 1 1 2 1 1 2 2 4 1 1 1 1 2 1 2 1
output:
result:
wrong answer Answer contains longer sequence [length = 3], but output contains 0 elements