241202026-02-04 13:53:02algoproPingpongpypy3Időlimit túllépés 50/100119ms24296 KiB
# UUID: 0484e55f-50ba-442d-ad84-563469fd8140
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()]
        A, B = map(int, 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
1Elfogadva45ms19436 KiB
subtask220/20
2Elfogadva46ms19944 KiB
subtask330/30
3Elfogadva68ms21992 KiB
subtask40/50
4Időlimit túllépés101ms23980 KiB
5Időlimit túllépés109ms23780 KiB
6Időlimit túllépés119ms24296 KiB