116862024-11-05 11:52:04chucknorrisPingpongcpp17Hibás válasz 50/1006ms412 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
subtask40/50
4Hibás válasz4ms320 KiB
5Hibás válasz6ms320 KiB
6Hibás válasz6ms412 KiB