116872024-11-05 11:54:28chucknorrisPingpongcpp17Elfogadva 100/1007ms420 KiB
#include <fstream>
#include <iostream>

using namespace std;

void harom(int A, int B){
    cout << "11 " << min(10, B) << "\n";
    B = B - min(10, B);
    cout << "11 " << min(10, B) << "\n";
    B = B - min(10, B);
    cout << "11 " << min(10, B) << "\n";
    B = B - min(10, B);
}

int main() {

    int T;
    cin >> T;
    while (T--) {
        int A, B;
        cin >> A >> B;

        if(A == 33 and B <= 30) harom(A, B); ///3 jatszma
        else if(A >= 33 and A <= 43 and B >= 11 and B <= 41){
            cout << min(A - 33, 10) << " 11\n";
            A = 33; B = B - 11;
            harom(A, B);
        }
        else if(A >= 33 and A <= 53 and B >= 22 and B <= 52){
            cout << min(A - 33, 10) << " 11\n";
            A = A - min(A - 33, 10); B = B - 11;
            cout << min(A - 33, 10) << " 11\n";
            A = 33; B = B - 11;
            harom(A, B);
        }
        else cout << "-1 -1\n";

    }

    return 0;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Elfogadva1ms320 KiB
subtask220/20
2Elfogadva1ms320 KiB
subtask330/30
3Elfogadva1ms320 KiB
subtask450/50
4Elfogadva4ms320 KiB
5Elfogadva6ms320 KiB
6Elfogadva7ms420 KiB