257482026-03-01 15:45:23algoproPingpongpypy3Hibás válasz 20/100120ms24208 KiB
# UUID: 6288a96c-41bd-441e-8a62-5cdf29deba5c
t = int(input())

eltarol = False
for i in range(t):
    eltarol = False
    a, b = map(int, input().split())
    if a < 33 or a > 53 or (a==b and a==33) or (a==b and 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")
        
        if b > 10:
            b -= 11
            print("0 11")
        print(f"11 {b}")
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva45ms19692 KiB
subtask220/20
2Elfogadva46ms19688 KiB
subtask30/30
3Hibás válasz67ms21980 KiB
subtask40/50
4Időlimit túllépés115ms23616 KiB
5Időlimit túllépés103ms23420 KiB
6Időlimit túllépés120ms24208 KiB