241192026-02-04 13:45:46algoproPingpongpypy3Időlimit túllépés 50/100119ms25720 KiB
# UUID: 4d4ab4b7-7057-4c1f-93ea-1f8bc1337a28
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
1Elfogadva37ms19436 KiB
subtask220/20
2Elfogadva48ms19948 KiB
subtask330/30
3Elfogadva68ms21992 KiB
subtask40/50
4Időlimit túllépés115ms25016 KiB
5Időlimit túllépés119ms24936 KiB
6Időlimit túllépés112ms25720 KiB