257472026-03-01 15:33:12algoproPingpongpypy3Wrong answer 20/100123ms23864 KiB
# UUID: 322a4f82-cdd2-4d1f-940c-f022ef1003b7
t = int(input())

eltarol = False
for i in range(t):
    eltarol = False
    a, b = map(int, input().split())
    if a < 33 or a > 53:
        print("-1 -1")
    else:
        a -= 33
        if a > 10:
            a -= 10
            b -= 11
            if b >= 0:
                eltarol = True
            else:
                print("-1 -1")
                continue

        if a > 0:
            b -= 11
            if b >= 0:
                print(f"{a} 11")
            else:
                print("-1 -1")
                continue
        
        if b > 9:
            b -= 10
            print("11 10")

            if b > 9:
                b -= 10
                print("11 10")
            else:
                print("11 0")
        else:
            print("11 0")
            print("11 0")
        if eltarol:
            print("10 11")
        print(f"11 {b}")
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted45ms19436 KiB
subtask220/20
2Accepted39ms19692 KiB
subtask30/30
3Wrong answer59ms21992 KiB
subtask40/50
4Time limit exceeded107ms23656 KiB
5Time limit exceeded119ms23864 KiB
6Time limit exceeded123ms23636 KiB