241172026-02-04 13:45:01algoproPingpongpypy3Időlimit túllépés 50/100116ms25572 KiB
# UUID: 21a8771d-9089-4dbf-8cca-c241166c1b1f
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
1Elfogadva39ms19436 KiB
subtask220/20
2Elfogadva48ms19948 KiB
subtask330/30
3Elfogadva68ms21992 KiB
subtask40/50
4Időlimit túllépés107ms25080 KiB
5Időlimit túllépés108ms25252 KiB
6Időlimit túllépés116ms25572 KiB