B3754 蒟蒻50pts求助
查看原帖
B3754 蒟蒻50pts求助
494956
kkksc03___is_sb楼主2023/10/10 13:57
#include <iostream>
#include <cmath>
using namespace std;
typedef unsigned long long ll ;

int main()
{
	int t;
	cin >> t;
	while(t--)
	{
		ll x, y;
		cin >> x >> y;
		if(x * 3 >= y)
		{
			cout << 0 << " ";
		}
		else
		{
			cout << y - 3 * x << " ";
		}
		ll maxn = 4 * x;
		cout << x - (ceil)(1.0 * (maxn - y) / 2) << endl;
	}
    return 0 ;
}
2023/10/10 13:57
加载中...