Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99082 | 杨一诺 | 字符串替换 | C++ | Compile Error | 0 MS | 0 KB | 261 | 2024-11-24 11:55:00 |
#include<bits/stdc++.h> using namespace std; string a,b,d; char c; int main(){ cin>>a>>b; for(int i=0;i<a.size();i++){ c=a[i]; if(c>-'a'&&c<='z'){ cout<<b[c-a]; } if(c>-'A'&&c<='Z'){ cout<<char(b[c-'A']-32); } } return 0; }
Main.cc: In function 'int main()': Main.cc:7:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i}') cout< typename std::reverse_iterator<_Iterator>::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) operator-(const reverse_iterator<_Iterator>& __x, ^ /usr/include/c++/5/bits/stl_iterator.h:328:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'char' cout< decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) operator-(const reverse_iterator<_IteratorL>& __x, ^ /usr/include/c++/5/bits/stl_iterator.h:380:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'char' cout< decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&) operator-(const move_iterator<_IteratorL>& __x, ^ /usr/include/c++/5/bits/stl_iterator.h:1138:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::move_iterator<_Iterator>' and 'char' cout< decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&) operator-(const move_iterator<_Iterator>& __x, ^ /usr/include/c++/5/bits/stl_iterator.h:1145:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::move_iterator<_Iterator>' and 'char' cout< std::complex<_Tp> std::operator-(const std::complex<_Tp>&, const std::complex<_Tp>&) operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) ^ /usr/include/c++/5/complex:356:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::complex<_Tp>' and 'char' cout< std::complex<_Tp> std::operator-(const std::complex<_Tp>&, const _Tp&) operator-(const complex<_Tp>& __x, const _Tp& __y) ^ /usr/include/c++/5/complex:365:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::complex<_Tp>' and 'char' cout< std::complex<_Tp> std::operator-(const _Tp&, const std::complex<_Tp>&) operator-(const _Tp& __x, const complex<_Tp>& __y) ^ /usr/include/c++/5/complex:374:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::complex<_Tp>' cout< std::complex<_Tp> std::operator-(const std::complex<_Tp>&) operator-(const complex<_Tp>& __x) ^ /usr/include/c++/5/complex:451:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::complex<_Tp>' and 'char' cout< typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&) operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, ^ /usr/include/c++/5/bits/stl_deque.h:349:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>' and 'char' cout< typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&) operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, ^ /usr/include/c++/5/bits/stl_deque.h:361:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&) _DEFINE_EXPR_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/bits/valarray_after.h:403:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&) _DEFINE_EXPR_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/bits/valarray_after.h:403:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&) _DEFINE_EXPR_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/bits/valarray_after.h:403:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray&) _DEFINE_EXPR_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/bits/valarray_after.h:403:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::valarray&, const std::_Expr<_Dom1, typename _Dom1::value_type>&) _DEFINE_EXPR_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/bits/valarray_after.h:403:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::valarray<_Tp>&, const std::valarray<_Tp>&) _DEFINE_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/valarray:1168:1: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::valarray<_Tp>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const std::valarray<_Tp>&, const _Tp&) _DEFINE_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/valarray:1168:1: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const std::valarray<_Tp>' and 'char' cout< std::_Expr, typename std::__fun::result_type> std::operator-(const _Tp&, const std::valarray<_Tp>&) _DEFINE_BINARY_OPERATOR(-, __minus) ^ /usr/include/c++/5/valarray:1168:1: note: template argument deduction/substitution failed: Main.cc:10:14: note: 'std::__cxx11::string {aka std::__cxx11::basic_string}' is not derived from 'const std::valarray<_Tp>' cout< typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator-(const __normal_iterator<_Iterator, _Container>& __lhs, ^ /usr/include/c++/5/bits/stl_iterator.h:923:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' and 'char' cout< decltype ((__lhs.base() - __rhs.base())) __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&) operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, ^ /usr/include/c++/5/bits/stl_iterator.h:911:5: note: template argument deduction/substitution failed: Main.cc:10:14: note: mismatched types 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' and 'char' cout<