239962026-02-03 09:27:22algoproPingpongpypy3Időlimit túllépés 50/100135ms24664 KiB
# UUID: 2eb3688f-39a6-4b9e-ac0a-2f834144be1d
N = int(input())

def veszt(X):
    if X > 10:
        return 10, X-10
    else:
        return X, 0

for i in range(N):
    A,B = [int(i) for i in input().split()]
#    A,B = 53,22
    if A == 33 and B <= 30:
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
        
    elif 33 <= A <= 43 and 11 <= B <= 41:
        print(A-33,11)
        A,B = 33,B-11
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
    elif 33 <= A <= 53 and 22 <= B <= 52:
        p,A = veszt(A)
        print(p,11)
        print(A-33,11)
        A,B = 33,B-11
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
        p,B = veszt(B)
        print(11,p)
    else:
        print(-1,-1)
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva39ms19700 KiB
subtask220/20
2Elfogadva43ms21228 KiB
subtask330/30
3Elfogadva68ms21736 KiB
subtask40/50
4Időlimit túllépés129ms24552 KiB
5Időlimit túllépés135ms24664 KiB
6Időlimit túllépés131ms24352 KiB