help(玄关)
  • 板块灌水区
  • 楼主ycx20120224
  • 当前回复5
  • 已保存回复5
  • 发布时间2024/4/12 20:53
  • 上次更新2024/4/13 06:39:22
查看原帖
help(玄关)
1057768
ycx20120224楼主2024/4/12 20:53

题目:P1401 or B3906
分数:99 and 100 代码(两题一样):

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long a1,a2,b1,b2,g=0,h=0,gao=2147483647,di=-2147483648;
	cin>>a1>>a2>>b1>>b2;
	g=a2*b2;
	h=a1*b1;
	if(g>=gao || h<=di)
	{
		cout<<"long long int";
		return 0;
	}
	g=a2*b1;
	h=a1*b2;
	if(g>=gao || h<=di || h>=gao || g<=di)
	{
		cout<<"long long int";
		return 0;
	}
	cout<<"int";
	return 0;
}
2024/4/12 20:53
加载中...