1 条题解

  • 0
    @ 2023-5-29 16:38:04

    赛后补题

    注意这个东西是对称的,因此只有搜到两个才算。

    a=int(input())
    b=input()
    c=input()
    f=0
    p=0
    for i in range(0,a):
        for j in range(0,a):
            if(b[i]==b[j] and c[i]==c[j] and i!=j and b[i]!=c[j] and c[i]!=b[j]):
                p+=1
    if(p==2):
        print("yes")
    else :
        print("no")
    
    • 1

    信息

    ID
    831
    时间
    1000ms
    内存
    256MiB
    难度
    8
    标签
    递交数
    659
    已通过
    88
    上传者