QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#734250#4295. Check Markersriad_alarefi#WA 16ms10448kbPython3823b2024-11-11 07:47:342024-11-11 07:47:35

Judging History

你现在查看的是最新测评结果

  • [2024-11-11 07:47:35]
  • 评测
  • 测评结果:WA
  • 用时:16ms
  • 内存:10448kb
  • [2024-11-11 07:47:34]
  • 提交

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))

詳細信息

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