241182026-02-04 13:45:34algoproPingpongpypy3Időlimit túllépés 50/100152ms26028 KiB
# UUID: 855c723f-8027-4983-8a43-ef71c6b1d8f8
from sys import stdin
#input = stdin.readline

def main():
    N = int(input())

    for i in range(N):
        A,B = [int(i) for i in input().split()]
        if 33 <= A <= 53 and 22 <= B <= 52:
            A3 = A-33
            print(A3//2,11)
            print(A3-A3//2,11)
            A = 33
            B -= 22 
        elif 33 <= A <= 43 and 11 <= B <= 41:
            print(A-33,11)
            A = 33
            B -= 11
        if A == 33 and B <= 30:
            print(11,B//3)
            B -= B//3
            print(11,B//2)
            B -= B//2
            print(11,B)
        else:
            print(-1,-1)
main()
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva45ms19688 KiB
subtask220/20
2Elfogadva50ms21228 KiB
subtask330/30
3Elfogadva70ms21732 KiB
subtask40/50
4Időlimit túllépés141ms26028 KiB
5Időlimit túllépés152ms23944 KiB
6Időlimit túllépés127ms23668 KiB