| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 145147 | 姜景文 | 比较三个数大小II | C++ | Compile Error | 0 MS | 0 KB | 428 | 2026-01-25 09:06:34 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b && b>c){ cout<<c<<b<<a; } if(a>c && c>b){ cout<<b<<c<<a; } if(b>a && a>c){ cout<<c<<a<<b; } if(b>c && c>a){ cout<<a<c<<b; } if(c>a && a>b){ cout<<b<<a<<c; } if(c>b && b>a){ cout<<a<<b<<c; } return 0; }
Main.cc: In function 'int main()':
Main.cc:16:16: error: no match for 'operator<' (operand types are 'std::basic_ostream' and 'int')
cout<
Main.cc:16:16: note: no known conversion for argument 1 from 'std::basic_ostream' to 'int'
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/sstream:38,
from /usr/include/c++/5/complex:45,
from /usr/include/c++/5/ccomplex:38,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
from Main.cc:1:
/usr/include/c++/5/bits/stl_pair.h:220:5: note: candidate: template constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/5/bits/stl_pair.h:220:5: note: template argument deduction/substitution failed:
Main.cc:16:20: note: 'std::basic_ostream' is not derived from 'const std::pair<_T1, _T2>'
cout<