QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#727662#2521. Keystrokevwxyz#AC ✓15ms10700kbPython3278b2024-11-09 13:31:582024-11-09 13:32:00

Judging History

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

  • [2024-11-09 13:32:00]
  • 评测
  • 测评结果:AC
  • 用时:15ms
  • 内存:10700kb
  • [2024-11-09 13:31:58]
  • 提交

answer

T=int(input())
for t in range(T):
    N,M=map(int,input().split())
    A=list(map(int,input().split()))
    B=list(map(int,input().split()))
    if (N,M)==(1,2) or (N,M)==(2,1):
        ans=1
    elif (N,M)==(1,1):
        ans=1
    else:
        ans=7
    print(ans)

詳細信息

Test #1:

score: 100
Accepted
time: 15ms
memory: 10584kb

input:

2
2 1
0 1
0
1 2
1
0 1

output:

1
1

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 15ms
memory: 10700kb

input:

2
2 2
0 1
0 1
1 1
1
1

output:

7
1

result:

ok 2 lines

Test #3:

score: 0
Accepted
time: 9ms
memory: 10600kb

input:

9
1 1
0
0
1 1
0
1
1 1
1
0
1 1
1
1
1 2
0
0 1
1 2
1
0 1
2 1
0 1
0
2 1
0 1
1
2 2
0 1
0 1

output:

1
1
1
1
1
1
1
1
7

result:

ok 9 lines