80分求助!
查看原帖
80分求助!
894727
qingchrush楼主2024/7/13 15:50
#include <bits/stdc++.h>
using namespace std;

int main()
{
	long long y, y1, t;
	cin >> y >> t;
	y1 = y;
	if (t == 0)
		cout << "NO\nYES";
	else if (t == 1)
	{
		if (y < 0)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		if (y%2 == 0)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	else
	{
		if (t%2 == 1 && y < 0)
			cout << "YES";
		else
			cout << "NO" << endl;
		if (abs(y%2) == 1)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}
2024/7/13 15:50
加载中...