Submission #3026511
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; cout<<(s=='a'?-1:"a")<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - 辞書式順序 |
User | udnmega |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 114 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:9: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string<char>}’ and ‘char’) cout<<(s=='a'?-1:"a")<<endl; ^ In file included from /usr/include/c++/5/unordered_set:48:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:116, from ./Main.cpp:1: /usr/include/c++/5/bits/unordered_set.h:1421:5: note: candidate: template<class _Value, class _Hash, class _Pred, class _Alloc> bool std::operator==(const std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>&, const std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>&) operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/5/bits/unordered_set.h:1421:5: note: template argument deduction/substitution failed: ./Main.cpp:7:11: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>’ cout<<(s=='a'?-1:"a")<<endl; ...