116142024-10-31 19:15:45DávidPingpongcpp17Wrong answer 50/10014ms500 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin >> t;

	for(int o = 0; o < t; o++) {
		int a, b;
		cin >> a >> b;

		if(a < 33 || b > 53) {
			cout << "-1 -1" << endl;
			continue;
		}

		vector<pair<int, int>> eredmeny;

		while(b > 30 || a > 33) {
			int ertek1 = min(10, a - 33);
			int ertek2 = 11;
			eredmeny.push_back(pair<int, int>(ertek1, ertek2));
			a -= ertek1;
			b -= ertek2;
		}

		for(int i = 0; i < 3; i++) {
			int ertek2 = min(10, b);
			int ertek1 = 11;
			eredmeny.push_back(pair<int, int>(ertek1, ertek2));
			a -= ertek1;
			b -= ertek2;
		}

		for(pair<int, int> i : eredmeny) {
			cout << i.first << " " << i.second << endl;
		}
	}

	return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms500 KiB
subtask220/20
2Accepted1ms320 KiB
subtask330/30
3Accepted3ms320 KiB
subtask40/50
4Wrong answer10ms320 KiB
5Wrong answer13ms428 KiB
6Wrong answer14ms320 KiB