#include<bits/stdc++.h>
using namespace std;
int main()
{
long long x1,x2,x3,x4;
cin>>x1>>x2>>y1>>y2;
long long t1=x1*y1,t2=x1*y2,t3=x2*y1,t4=x2*y2;
if(t1>INT_MAX || t1<INT_MIN || t2>INT_MAX || t2<INT_MIN || t3>INT_MAX || t3<INT_MIN || t4>INT_MAX || t4<INT_MIN)
cout<<"long long int";
else
cout<<"int";
return 0;
}
报错信息:
/tmp/compiler_xn7x59ll/src: In function ‘int main()’:
/tmp/compiler_xn7x59ll/src:6:20: 错误:no match for ‘operator>>’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘double(double) noexcept’)
6 | cin>>x1>>x2>>y1>>y2;
| ~~~~~~~~~~~^~~~
| | |
| | double(double) noexcept
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/sstream:40,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/complex:45,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/ccomplex:39,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/stdc++.h:127,
from /tmp/compiler_xn7x59ll/src:1:
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:325:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
325 | operator>>(void*& __p)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:325:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘void*’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(void*)y1’绑定到‘void*&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:201:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
201 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:201:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘long long unsigned int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(long long unsigned int)y1’绑定到‘long long unsigned int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:197:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
197 | operator>>(long long& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:197:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘long long int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(long long int)y1’绑定到‘long long int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:192:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:192:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘long unsigned int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(long unsigned int)y1’绑定到‘long unsigned int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:188:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:188:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘long int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(long int)y1’绑定到‘long int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:184:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:184:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘unsigned int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(unsigned int)y1’绑定到‘unsigned int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:181:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:181:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(int)y1’绑定到‘int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:177:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:177:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘short unsigned int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(short unsigned int)y1’绑定到‘short unsigned int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:174:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:174:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 错误:invalid conversion from ‘double (*)(double) noexcept’ to ‘short int’ [-fpermissive]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
| |
| double (*)(double) noexcept
/tmp/compiler_xn7x59ll/src:6:22: 错误:无法将右值‘(short int)y1’绑定到‘short int&’
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:170:7: 附注:candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/istream:170:7: 附注: conversion of argument 1 would be ill-formed:
/tmp/compiler_xn7x59ll/src:6:22: 警告:‘double y1(double)’的地址永远不会为 NULL [-Waddress]
6 | cin>>x1>>x2>>y1>>y2;
| ^~
In file included from /nix/store/x8lqlydsxbrwvf6p7v18gws8kn1xl37f-glibc-2.38-23-dev/include/features.h:503,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:679,
from /nix/store/al0w33yvyzkjm86ndpf42knjfymfisph-luogu-gcc-13.2.0
...
%%%%%%