- 离开中山路
吃掉后人!!(进食后人)————(警示后人)
- @ 2025-3-2 15:04:31
注意!!
狡猾的y1函数会伪装成变量诱导你
实在可恶!!!
6 comments
-
XLFChhh LV 1 @ 2025-7-7 21:56:06
j0,j1,jn,y0,y1,yn都不行
-
@ 2025-5-10 11:09:46foo.cc:3:25: error: ‘long long int y1’ redeclared as different kind of entity 3 | long long T,a,b,c,x1,x2,y1,y2,x,y; | ^~ In file included from /nix/glibc-2.40-66-dev/include/features.h:511, from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/x86_64-unknown-linux-gnu/bits/os_defines.h:39, from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/x86_64-unknown-linux-gnu/bits/c++config.h:683, from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/cassert:43, from stdc++.h:33: /nix/glibc-2.40-66-dev/include/bits/mathcalls.h:239:1: note: previous declaration ‘double y1(double)’ 239 | __MATHCALL (y1,, (_Mdouble_)); | ^~~~~~~~~~ foo.cc: In function ‘int main()’: foo.cc:14:37: error: no match for ‘operator>>’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘double(double) throw ()’ {aka ‘double(double)’}) 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ~~~~~~~~~~~~~~~~~~~~^~~~ | | | | | double(double) throw () {aka double(double)} | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/sstream:40, from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/complex:45, from stdc++.h:138: /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:170:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:170:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: cannot bind non-const lvalue reference of type ‘bool&’ to a value of type ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:174:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:174:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘short int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(short int)y1’ to ‘short int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:177:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:177:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘short unsigned int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(short unsigned int)y1’ to ‘short unsigned int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:181:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:181:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(int)y1’ to ‘int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:184:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:184:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘unsigned int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(unsigned int)y1’ to ‘unsigned int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:188:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:188:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘long int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(long int)y1’ to ‘long int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:192:7: note: 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/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:192:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘long unsigned int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(long unsigned int)y1’ to ‘long unsigned int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:199:7: note: 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) 199 | operator>>(long long& __n) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:199:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘long long int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(long long int)y1’ to ‘long long int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:203:7: note: 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) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:203:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘long long unsigned int’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(long long unsigned int)y1’ to ‘long long unsigned int&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:328:7: note: 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) 328 | operator>>(void*& __p) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:328:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘void*’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} foo.cc:14:39: error: cannot bind rvalue ‘(void*)y1’ to ‘void*&’ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:122:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:122:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)’ {aka ‘std::basic_istream<char>& (*)(std::basic_istream<char>&)’} [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:126:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]’ (near match) 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:126:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’} [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:133:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ (near match) 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:133:7: note: conversion of argument 1 would be ill-formed: foo.cc:14:39: error: invalid conversion from ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} to ‘std::ios_base& (*)(std::ios_base&)’ [-fpermissive] 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ | | | double (*)(double) throw () {aka double (*)(double)} /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:219:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ 219 | operator>>(float& __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:219:25: note: no known conversion for argument 1 from ‘double(double) throw ()’ {aka ‘double(double)’} to ‘float&’ 219 | operator>>(float& __f) | ~~~~~~~^~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:223:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ 223 | operator>>(double& __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:223:26: note: no known conversion for argument 1 from ‘double(double) throw ()’ {aka ‘double(double)’} to ‘double&’ 223 | operator>>(double& __f) | ~~~~~~~~^~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:227:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]’ 227 | operator>>(long double& __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:227:31: note: no known conversion for argument 1 from ‘double(double) throw ()’ {aka ‘double(double)’} to ‘long double&’ 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:352:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]’ 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:352:36: note: no known conversion for argument 1 from ‘double(double) throw ()’ {aka ‘double(double)’} to ‘std::basic_istream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/string:55, from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bitset:52, from stdc++.h:52: /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.tcc:835:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bitset:1597:5: note: candidate: ‘template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)’ 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bitset:1597:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘std::bitset<_Nb>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:1109: /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/istream.tcc:978:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)’ 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘double(double) throw ()’ {aka ‘double(double)’}) 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:849:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)’ 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:849:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘unsigned char&’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:854:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)’ 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:854:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘signed char&’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:896:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)’ 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:896:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘double(double) throw ()’ {aka ‘double(double)’}) 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:939:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)’ 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:939:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘unsigned char*’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:945:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)’ 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:945:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘signed char*’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/complex:509:5: note: candidate: ‘template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)’ 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/complex:509:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘std::complex<_Tp>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ In file included from stdc++.h:143: /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:76:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)’ 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:76:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘std::_Resetiosflags’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:106:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)’ 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:106:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘std::_Setiosflags’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:137:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)’ 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:137:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘std::_Setbase’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:177:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)’ 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:177:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘std::_Setfill<_CharT>’ and ‘double (*)(double) throw ()’ {aka ‘double (*)(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:207:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)’ 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:207:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘std::_Setprecision’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:237:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)’ 237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) | ^~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iomanip:237:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: cannot convert ‘y1’ (type ‘double(double) throw ()’ {aka ‘double(double)’}) to type ‘std::_Setw’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:605, from stdc++.h:166: /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__shift_right, typename _Dom1::value_type>::result_type> std::operator>>(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)’ 414 | _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__shift_right, typename _Dom1::value_type>::result_type> std::operator>>(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’ 414 | _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__shift_right, typename _Dom1::value_type>::result_type> std::operator>>(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)’ 414 | _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__shift_right, typename _Dom1::value_type>::result_type> std::operator>>(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)’ 414 | _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__shift_right, typename _Dom1::value_type>::result_type> std::operator>>(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)’ 414 | _DEFINE_EXPR_BINARY_OPERATOR(>>, struct std::__shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/valarray_after.h:414:5: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__shift_right, _Tp>::result_type> std::operator>>(const valarray<_Tp>&, const valarray<_Tp>&)’ 1205 | _DEFINE_BINARY_OPERATOR(>>, __shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: template argument deduction/substitution failed: foo.cc:14:39: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::valarray<_Tp>’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__shift_right, _Tp>::result_type> std::operator>>(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)’ 1205 | _DEFINE_BINARY_OPERATOR(>>, __shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: template argument deduction/substitution failed: foo.cc:14:39: note: ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} is not derived from ‘const std::valarray<_Tp>’ 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__shift_right, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__shift_right, _Tp>::result_type> std::operator>>(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)’ 1205 | _DEFINE_BINARY_OPERATOR(>>, __shift_right) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/valarray:1205:1: note: template argument deduction/substitution failed: foo.cc:14:39: note: mismatched types ‘const std::valarray<_Tp>’ and ‘double(double) throw ()’ {aka ‘double(double)’} 14 | cin>>a>>b>>c>>x1>>x2>>y1>>y2; | ^~ foo.cc:15:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | if(x2<x1||y2<y1){cout<<"0\n";continue;} | ~~^~~ foo.cc:22:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 22 | while(x1<=x&&x<=x2&&y1<=y&&y<=y2) | ~~^~~ foo.cc:26:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 26 | while(x1<=x&&x<=x2&&y1<=y&&y<=y2)报错信息比代码还长
-
@ 2025-5-10 10:20:41
👀 2 -
@ 2025-4-8 9:51:08
我之前也被这玩意儿坑过。
-
@ 2025-3-16 17:16:4966
-
@ 2025-3-12 13:37:12
往年有很多选手联赛因为这个翻车
- 1
Information
- ID
- 5804
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 23
- Accepted
- 9
- Uploaded By