QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#727662 | #2521. Keystroke | vwxyz# | AC ✓ | 15ms | 10700kb | Python3 | 278b | 2024-11-09 13:31:58 | 2024-11-09 13:32:00 |
Judging History
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)
Details
Tip: Click on the bar to expand more detailed information
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