submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s076563268 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a+b < 10) {
cout << a+b << endl;
} else {
"error"
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
10 | "error"
| ^
| ;
11 | }
| ~
|
s975525878 | p03697 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
int main() {
int a,b ;
cin << a << b ;
if(a+b >= 10)cout << "error" << endl;
else cout << a+b << endl;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a << b ;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:5: note: candidate: 'operator<<(int, int)' (built-in)
7 | cin << a << b ;
| ~~~~^~~~
a.cc:7:5: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:7:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
7 | cin << a << b ;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b ;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed |
s801734659 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int a, b;
cin>>a>>b;
if(a+b>9){
cout<<"error<<endl;
}
else{
cout<<a+b<<endl;
}
} | a.cc:8:13: warning: missing terminating " character
8 | cout<<"error<<endl;
| ^
a.cc:8:13: error: missing terminating " character
8 | cout<<"error<<endl;
| ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: expected primary-expression before '}' token
9 | }
| ^
|
s321655580 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int a, b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout<<(a+b>9?"error":a+b)<<endl;
| ~~~~~^~~~~~~~~~~~
|
s492591584 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
signed int a, b;
cin >> a >> b;
signed int outNumber = a + b;
if(outNumber >= 10){
cout >> "error" >> endl;
}
else{
cout >> outNumber >> endl;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
9 | cout >> "error" >> endl;
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/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, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> "error" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[6]]':
a.cc:9:13: required from here
9 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
12 | cout >> outNumber >> endl;
| ~~~~ ^~ ~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:12:10: note: candidate: 'operator>>(int, int)' (built-in)
12 | cout >> outNumber >> endl;
| ~~~~~^~~~~~~~~~~~
a.cc:12:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/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, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> outNumber >> endl;
| ^~~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> outNumber >> endl;
| ^~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> outNumber >> endl;
| ^~~~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> outNumber >> endl;
| ^~~~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> outNumber >> endl;
| ^~~~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:12:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> outNumber >> endl;
| ^~~~~~~~~
/usr/include/c++/14/istream:939:5 |
s016687182 | p03697 | C++ | #include <iostream>
int main(void){
int x,y;
cin >> x >> y;
if (x + y < 10){
std::cout << "x + y" << std::endl;
}
else{
std::cout << "error" << std::endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> x >> y;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s365308469 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a+b >= 10) cout << "error" << endl;
else cout >> a + b >> endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | else cout >> a + b >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:13: note: candidate: 'operator>>(int, int)' (built-in)
8 | else cout >> a + b >> endl;
| ~~~~~^~~~~~~~
a.cc:8:13: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:8:8: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
8 | else cout >> a + b >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/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, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:8:20: required from here
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/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)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | else cout >> a + b >> endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | |
s478594050 | p03697 | C++ | import java.io.PrintWriter
import java.util.*
import java.math.*
import java.lang.*
import kotlin.comparisons.*
val pw = PrintWriter(System.out)
val MOD: Long = (1e+9 + 7).toLong()
fun main(args: Array<String>) {
val (a, b) = readListOfInt()
println(if(a+b >= 10) "error" else a+b)
pw.flush()
}
/****** Declared Functions and Data Structures ******/
// IO
fun read() = readLine()!!
fun readInt() = read().toInt()
fun readLong() = read().toLong()
fun readDouble() = read().toDouble()
fun readListOfString() = read().split(" ")
fun readListOfInt() = readListOfString().map { it.toInt() }
fun readListOfLong() = readListOfString().map { it.toLong() }
fun readListOfDouble() = readListOfString().map { it.toDouble() }
fun Double.format(digits: Int) = String.format("%.${digits}f", this)
fun Float.format(digits: Int) = String.format("%.${digits}f", this)
fun print(value: Any) { pw.print(value) }
fun println(value : Any) { pw.println(value) }
// Extensions
fun<T> List<T>.toBuckets(bucketKeys: List<T>): Map<T, Int> {
val buckets = bucketKeys.associate { t -> Pair(t, 0) }.toMutableMap()
this.forEach { t ->
buckets[t] = buckets[t]!! + 1
}
return buckets
}
fun <K, V> Map<K, V>.toMutableMap(): MutableMap<K, V> = HashMap(this)
// Util Functions
fun<T> permutations(src: List<T>): List<List<T>> {
if(src.size == 1) return listOf(src)
val perms = mutableListOf<List<T>>()
val insertElement = src[0]
permutations(src.drop(1)).forEach { perm ->
for(i in 0..perm.size) {
val newPerm = perm.toMutableList()
newPerm.add(i, insertElement)
perms.add(newPerm.toList())
}
}
return perms
}
// return nCr, if you want nCr, please access v[n][r]
fun combinations(n: Long): List<List<Long>> {
val v = (0..n).map { (0..n).map{0L}.toMutableList() }.toMutableList()
for(i in 0 until v.size) {
v[i][0] = 1L
v[i][i] = 1L
}
for(i in 0 until v.size) {
for(j in 1 until i) {
v[i][j] = (v[i-1][j-1] + v[i-1][j]) % MOD
}
}
return v.map { it.toList() }.toList()
}
// should be a >= b
fun gcd(a: Long, b: Long): Long =
if(b == 0L) a else gcd(b, a % b)
// shoud be a >= b
fun lcm(a: Long, b: Long): Long =
a / gcd(a, b) * b
fun sumDigits(num_: Long): Long {
var num = num_
var rtn: Long = 0
while(num != 0.toLong()) {
val tmp = num % 10
rtn += tmp
num /= 10
}
return rtn
}
fun Double.isDecimal(): Boolean = ((this - Math.floor(this)) != 0.0)
// Data Structures
class Stack<T>(private var st: MutableList<T> = mutableListOf<T>()) {
fun isEmpty() = st.isEmpty()
fun top(): T = st.last()
fun push(e: T) { st.add(e) }
fun pop() { st = st.dropLast(1).toMutableList() }
}
class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
fun isEmpty() = que.isEmpty()
fun top(): T = que.first()
fun push(e: T) { que.add(e) }
fun pop() { que = que.drop(1).toMutableList() }
}
| a.cc:52:18: error: too many decimal points in number
52 | for(i in 0..perm.size) {
| ^~~~~~~~~~~~
a.cc:63:14: error: too many decimal points in number
63 | val v = (0..n).map { (0..n).map{0L}.toMutableList() }.toMutableList()
| ^~~~
a.cc:63:27: error: too many decimal points in number
63 | val v = (0..n).map { (0..n).map{0L}.toMutableList() }.toMutableList()
| ^~~~
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.PrintWriter
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:19:1: error: 'fun' does not name a type
19 | fun read() = readLine()!!
| ^~~
a.cc:25:1: error: 'fun' does not name a type
25 | fun readListOfLong() = readListOfString().map { it.toLong() }
| ^~~
a.cc:26:1: error: 'fun' does not name a type
26 | fun readListOfDouble() = readListOfString().map { it.toDouble() }
| ^~~
a.cc:28:1: error: 'fun' does not name a type
28 | fun Double.format(digits: Int) = String.format("%.${digits}f", this)
| ^~~
a.cc:32:1: error: 'fun' does not name a type
32 | fun println(value : Any) { pw.println(value) }
| ^~~
a.cc:36:1: error: 'fun' does not name a type
36 | fun<T> List<T>.toBuckets(bucketKeys: List<T>): Map<T, Int> {
| ^~~
a.cc:44:1: error: 'fun' does not name a type
44 | fun <K, V> Map<K, V>.toMutableMap(): MutableMap<K, V> = HashMap(this)
| ^~~
a.cc:62:1: error: 'fun' does not name a type
62 | fun combinations(n: Long): List<List<Long>> {
| ^~~
a.cc:77:1: error: 'fun' does not name a type
77 | fun gcd(a: Long, b: Long): Long =
| ^~~
a.cc:95:1: error: 'fun' does not name a type
95 | fun Double.isDecimal(): Boolean = ((this - Math.floor(this)) != 0.0)
| ^~~
a.cc:105:7: error: 'Queue' is not a class template
105 | class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
| ^~~~~
a.cc:105:13: error: 'T' was not declared in this scope
105 | class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
| ^
a.cc:105:16: error: expected unqualified-id before 'private'
105 | class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
| ^~~~~~~
a.cc:105:16: error: expected ')' before 'private'
105 | class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
| ~^~~~~~~
| )
|
s593115056 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
int sum = A+B;
cout << ((sum >= 10) ? "error" : sum) << endl;
}
| a.cc: In function 'int main()':
a.cc:6:26: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << ((sum >= 10) ? "error" : sum) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
s214303772 | p03697 | C++ | #inhclude<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a+b>=10) printf("error\n");
else printf("%d",a+b);
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #inhclude; did you mean #include?
1 | #inhclude<stdio.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d %d",&a,&b);
| ^~~~~
a.cc:6:25: error: 'printf' was not declared in this scope
6 | if(a+b>=10) printf("error\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | #inhclude<stdio.h>
a.cc:7:17: error: 'printf' was not declared in this scope
7 | else printf("%d",a+b);
| ^~~~~~
a.cc:7:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s392846812 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1e9;
//long long
using ll = long long;
//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// begin() end()
#define all(x) (x).begin(),(x).end()
//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)
//最大公約数
ll gcd(ll a,ll b){
if(b == 0) return a;
return gcd(b,a%b);
}
//最小公倍数
ll lcm(ll a,ll b){
ll g = gcd(a,b);
return a / g * b; // Be careful not to overflow if(a < b) return gcd(b, a);
unsigned r;
while ((r=a%b)) {
a = b;
b = r;
}
return b;
}
int main() {
int a, b;
cin >> a >> b;
int ans = a + b
if(ans >= 10) print("error");
else print(ans);
} | a.cc: In function 'int main()':
a.cc:50:1: error: expected ',' or ';' before 'if'
50 | if(ans >= 10) print("error");
| ^~
a.cc:51:1: error: 'else' without a previous 'if'
51 | else print(ans);
| ^~~~
|
s942426212 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
if (a+b) > 9) cout << "error";
else cout << a+b ;
} | a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before '>' token
8 | if (a+b) > 9) cout << "error";
| ^
|
s678307894 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << ((a+b) > 9) ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << ((a+b) > 9) ? "error" : a+b << endl;
| ~~~~^~~~~~~
|
s938979916 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << (a+b) >= 9 ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:17: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:8:17: note: candidate: 'operator>=(int, int)' (built-in)
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~~^~~~
a.cc:8:17: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
476 | operator>=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
520 | operator>=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1724 | operator>=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1781 | operator>=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
739 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/string_view:746:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
746 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/string_view:754:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
754 | operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:754:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3997:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3997 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3997:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:4011:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
4011 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4011:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:4024:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4024 | operator>=(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4024:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2631:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2631 | operator>=(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2631:5: note: template argument deduction/substitution failed:
a.cc:8:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ^
a.cc:8:38: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ~~~~^~~~~~~
|
s041881791 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << (a+b) > 9 ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:17: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~ ^ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:8:17: note: candidate: 'operator>(int, int)' (built-in)
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~~^~~
a.cc:8:17: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ^
a.cc:8:37: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ~~~~^~~~~~~
|
s780214219 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A+B < 10)? A+B:"error";
}
| a.cc: In function 'int main()':
a.cc:9:21: error: operands to '?:' have different types 'int' and 'const char*'
9 | cout << (A+B < 10)? A+B:"error";
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
|
s362695883 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A+B < 10? A+B:"error";
}
| a.cc: In function 'int main()':
a.cc:9:15: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
9 | cout << A+B < 10? A+B:"error";
| ~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::basic_ostream<char>
a.cc:9:15: note: candidate: 'operator<(int, int)' (built-in)
9 | cout << A+B < 10? A+B:"error";
| ~~~~~~~~~~~~^~~~
a.cc:9:15: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
9 | cout << A+B < 10? A+B:"error";
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
9 | cout << A+B < 10? A+B:"error";
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
9 | cout << A+B < 10? A+B:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
9 | cout << A+B < 10? A+B:"error";
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
9 | cout << A+B < 10? A+B:"error";
| ^~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s455643749 | p03697 | C++ | #include <iosrteam>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A+B < 10? A+B:"error";
} | a.cc:1:10: fatal error: iosrteam: No such file or directory
1 | #include <iosrteam>
| ^~~~~~~~~~
compilation terminated.
|
s745555050 | p03697 | C++ | #inslude<iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if(A+B < 10) cout << A+B;
else cout << "error";
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inslude; did you mean #include?
1 | #inslude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> A >> B;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inslude<iostream>
a.cc:7:16: error: 'cout' was not declared in this scope
7 | if(A+B < 10) cout << A+B;
| ^~~~
a.cc:7:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:8: error: 'cout' was not declared in this scope
8 | else cout << "error";
| ^~~~
a.cc:8:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s543525343 | p03697 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
using namespace std;
int main(){
int A, B; cin >> A >> B;
cout << (A + B < 10 ? A + B : "error") << endl;
}
| a.cc: In function 'int main()':
a.cc:16:23: error: operands to '?:' have different types 'int' and 'const char*'
16 | cout << (A + B < 10 ? A + B : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s445583842 | p03697 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if(a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
void print(const std::vector<int> &v) {
std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
std::cout << std::endl;
}
int main() {
int A, B;
cin >> A >> B;
if(A + B >= 10) {
cout << "error" << endl return 0;
}
cout << A + B << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:37:32: error: expected ';' before 'return'
37 | cout << "error" << endl return 0;
| ^~~~~~~
| ;
|
s814611308 | p03697 | C++ | # -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
import random
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def main():
A,B = inputMap()
tmp = A+B
if tmp < 11:
print(tmp)
else:
print("error")
if __name__ == "__main__":
main()
| a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:13:3: error: invalid preprocessing directive #NO
13 | # NO, PAY-PAY
| ^~
a.cc:14:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
14 | #import numpy as np
| ^~~~~~
a.cc:14:9: error: #import expects "FILENAME" or <FILENAME>
14 | #import numpy as np
| ^~~~~
a.cc:15:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
15 | #import statistics
| ^~~~~~
a.cc:15:9: error: #import expects "FILENAME" or <FILENAME>
15 | #import statistics
| ^~~~~~~~~~
a.cc:16:2: error: invalid preprocessing directive #from
16 | #from statistics import mean, median,variance,stdev
| ^~~~
a.cc:2:1: error: 'import' does not name a type
2 | import sys
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
|
s258224182 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define a first
#define b second
#define sz size()
#define pb(x) push_back(x)
#define bg begin()
#define ed end()
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define mp(x,y) make_pair(x,y)
const ll MOD=1000000007;
const ll INF=-10000000000;
ll maxx(ll x,ll y,ll z){
return max(max(x,y),z);
}
ll minn(ll x,ll y,ll z){
return min(min(x,y),z);
}
ll gcd(ll x,ll y){
if(x%y==0) return y;
else return gcd(y,x%y);
}
ll lcm(ll x,ll y){
return x*(y/gcd(x,y));
}
//a,b x
int main(){
ll A,B; cin>>A>>B;
cout<<(A+B<10?A+B:"error");
} | a.cc: In function 'int main()':
a.cc:35:16: error: operands to '?:' have different types 'll' {aka 'long long int'} and 'const char*'
35 | cout<<(A+B<10?A+B:"error");
| ~~~~~~^~~~~~~~~~~~
|
s416436899 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b;
int main()
{
int a,b;
cin>>a>>b;
if(a+b=>10||a>10||b>10) cout<<"error"<<endl;
else cout<<a+b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before '>' token
8 | if(a+b=>10||a>10||b>10) cout<<"error"<<endl;
| ^
|
s760131403 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a >>b;
if(a+b <10){
cout << a+b <<endl;
}
else {
cout <"<error" <<endl;
}
} | a.cc: In function 'int main()':
a.cc:11:20: error: invalid operands of types 'const char [7]' and '<unresolved overloaded function type>' to binary 'operator<<'
11 | cout <"<error" <<endl;
| ~~~~~~~~~^~~~~~
|
s512870141 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a >>b;
if(a+b <10){
cout << a+b <<endl;
}
else {
cout <<error <<endl;
}
} | a.cc: In function 'int main()':
a.cc:11:12: error: 'error' was not declared in this scope; did you mean 'perror'?
11 | cout <<error <<endl;
| ^~~~~
| perror
|
s790114059 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >>a >>b;
if(a+b <10){
cout << a+b <<endl;
}
else if{
cout <<error <<endl;
}
} | a.cc: In function 'int main()':
a.cc:10:10: error: expected '(' before '{' token
10 | else if{
| ^
| (
|
s900924390 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
char jubge = 'z';
bool a = true;
cin >> s;
sort(s.begin(),s.end());
for(int i = 0; i < s.size(); i++){
if(z == s.at(i)){
a = false;
break;
}else{
jubge = s.at(i);
}
}
if(a)
cout << "yes" << endl;
else
cout << "no" << endl;
} | a.cc: In function 'int main()':
a.cc:11:8: error: 'z' was not declared in this scope
11 | if(z == s.at(i)){
| ^
|
s378246195 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A + B < 10 ? A + B : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:8:25: error: operands to '?:' have different types 'int' and 'const char*'
8 | cout << (A + B < 10 ? A + B : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s944797876 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A + B < 10 ? A + B : "error" << endl;
} | a.cc: In function 'int main()':
a.cc:8:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ~~~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::basic_ostream<char>
a.cc:8:19: note: candidate: 'operator<(int, int)' (built-in)
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ~~~~~~~~~~~~~~^~~~
a.cc:8:19: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ^~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_ |
s582641825 | p03697 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABCtest
{
delegate void Signal();
class Program
{
static void Main(string[] args)
{
int A, B ,Ans;
string[] value = Console.ReadLine().Split(' ');
if (value.Length == 1) return;
if (!int.TryParse(value[0], out A) || !int.TryParse(value[1], out B)) return;
if (A <= 1 || (B >= 9)) return;
Ans = A + B;
if(Ans >= 10) Console.WriteLine("erroe");
else Console.WriteLine(Ans);
Console.ReadLine();
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:9:5: error: 'delegate' does not name a type
9 | delegate void Signal();
| ^~~~~~~~
a.cc:12:26: error: 'string' has not been declared
12 | static void Main(string[] args)
| ^~~~~~
a.cc:12:35: error: expected ',' or '...' before 'args'
12 | static void Main(string[] args)
| ^~~~
a.cc:30:6: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In static member function 'static void ABCtest::Program::Main(int*)':
a.cc:15:13: error: 'string' was not declared in this scope
15 | string[] value = Console.ReadLine().Split(' ');
| ^~~~~~
a.cc:15:20: error: expected primary-expression before ']' token
15 | string[] value = Console.ReadLine().Split(' ');
| ^
a.cc:17:17: error: 'value' was not declared in this scope
17 | if (value.Length == 1) return;
| ^~~~~
a.cc:19:18: error: expected primary-expression before 'int'
19 | if (!int.TryParse(value[0], out A) || !int.TryParse(value[1], out B)) return;
| ^~~
a.cc:19:18: error: expected ')' before 'int'
a.cc:19:16: note: to match this '('
19 | if (!int.TryParse(value[0], out A) || !int.TryParse(value[1], out B)) return;
| ^
a.cc:23:27: error: 'Console' was not declared in this scope
23 | if(Ans >= 10) Console.WriteLine("erroe");
| ^~~~~~~
a.cc:24:19: error: 'Console' was not declared in this scope
24 | else Console.WriteLine(Ans);
| ^~~~~~~
a.cc:26:13: error: 'Console' was not declared in this scope
26 | Console.ReadLine();
| ^~~~~~~
|
s034271130 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B;
cin >>A>>B;
if((A+B)>=10){
cout <<"error";
}
else{
cotu <<A+B;
}
}
| a.cc: In function 'int main()':
a.cc:11:5: error: 'cotu' was not declared in this scope
11 | cotu <<A+B;
| ^~~~
|
s190223874 | p03697 | C++ | A,B = list(map(int,input().split(' ')))
#print(n,m)
c = A+B
ans = 'error' if c >=10 else c
print(ans) | a.cc:2:2: error: invalid preprocessing directive #print
2 | #print(n,m)
| ^~~~~
a.cc:4:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | ans = 'error' if c >=10 else c
| ^~~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A,B = list(map(int,input().split(' ')))
| ^
|
s149915583 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
int main() {
int A, B;
cin >> A >> B;
if (A+B <= 9) {
cout << A+B << endl;
}
else if {
cout << "error"<< endl;
}
} | a.cc: In function 'int main()':
a.cc:24:11: error: expected '(' before '{' token
24 | else if {
| ^
| (
|
s129231661 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
int main() {
int A, B;
cin >> A >> B;
cout << (A+B<=9 ? A+B : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:21:19: error: operands to '?:' have different types 'int' and 'const char*'
21 | cout << (A+B<=9 ? A+B : "error") << endl;
| ~~~~~~~^~~~~~~~~~~~~~~
|
s214804673 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << ((a + b >= 10) ? "error": a + b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:26: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << ((a + b >= 10) ? "error": a + b) << endl;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
s484228999 | p03697 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b; cin >> a >> b;
cout << (a+b <= 9 ? a+b : "error");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:21: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b <= 9 ? a+b : "error");
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s308775923 | p03697 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a + b >= 10 ? "error": a + b) << endl;
}
| a.cc: In function 'int main()':
a.cc:8:24: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (a + b >= 10 ? "error": a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
s138688069 | p03697 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a+b>=10 ? "error" : a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:9:22: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << (a+b>=10 ? "error" : a+b) << endl;
| ~~~~~~~~^~~~~~~~~~~~~~~
|
s427929413 | p03697 | C++ | #inlcude<iostream>
using namespace std;
int main(){
int a,b; cin>>a>>b;
if(a+b<10) cout<<a+b<<endl;
else cout<<"error"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope
5 | int a,b; cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inlcude<iostream>
a.cc:6:14: error: 'cout' was not declared in this scope
6 | if(a+b<10) cout<<a+b<<endl;
| ^~~~
a.cc:6:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:25: error: 'endl' was not declared in this scope
6 | if(a+b<10) cout<<a+b<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inlcude<iostream>
a.cc:7:8: error: 'cout' was not declared in this scope
7 | else cout<<"error"<<endl;
| ^~~~
a.cc:7:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:23: error: 'endl' was not declared in this scope
7 | else cout<<"error"<<endl;
| ^~~~
a.cc:7:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s646224597 | p03697 | C++ | #inlcude<iostream>
using namespace std;
int main(){
int a,b; cin>>a>>b;
if(a+B<10) cout<<a+b<<endl;
else cout<<"error"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope
5 | int a,b; cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inlcude<iostream>
a.cc:6:8: error: 'B' was not declared in this scope
6 | if(a+B<10) cout<<a+b<<endl;
| ^
a.cc:6:14: error: 'cout' was not declared in this scope
6 | if(a+B<10) cout<<a+b<<endl;
| ^~~~
a.cc:6:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:25: error: 'endl' was not declared in this scope
6 | if(a+B<10) cout<<a+b<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inlcude<iostream>
a.cc:7:8: error: 'cout' was not declared in this scope
7 | else cout<<"error"<<endl;
| ^~~~
a.cc:7:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:23: error: 'endl' was not declared in this scope
7 | else cout<<"error"<<endl;
| ^~~~
a.cc:7:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s592450358 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>c;
if(a+b<10)cout<<a+b;
else cout<<"error";
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'c' was not declared in this scope
6 | cin>>a>>c;
| ^
|
s516330141 | p03697 | C++ | #include <cstdio>
int main(){
int A, B;
scanf("%d%d", &A, &B);
if(X+Y<10) printf("%d\n", X+Y);
else printf("error\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'X' was not declared in this scope
6 | if(X+Y<10) printf("%d\n", X+Y);
| ^
a.cc:6:10: error: 'Y' was not declared in this scope
6 | if(X+Y<10) printf("%d\n", X+Y);
| ^
|
s353766202 | p03697 | C | #include <stdio.h>
int main() {
int number_x, number_y;
scanf("%d %d", &number_x, &number_y);
if(number_x + number_y < 10) {
printf("%d\n"number_x + number_y);
} else {
printf("error\n");
}
return 0;
}
| main.c: In function 'main':
main.c:7:18: error: expected ')' before 'number_x'
7 | printf("%d\n"number_x + number_y);
| ~ ^~~~~~~~
| )
|
s845650347 | p03697 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
typedef long long ll;
using namespace std;
int ctoi(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
return 0;
}
int main() {
int a,b; cin >> a >> b;
cout << (a+b >= 10? "error" : a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:27:27: error: operands to '?:' have different types 'const char*' and 'int'
27 | cout << (a+b >= 10? "error" : a+b) << endl;
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s018138619 | p03697 | C++ |
ilist = input().split(" ")
ans = int(ilist[0]) + int(ilist[1] )
if ans >= 10:
print("error")
else :
print(ans) | a.cc:2:1: error: 'ilist' does not name a type
2 | ilist = input().split(" ")
| ^~~~~
|
s557412857 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
ina a,b;
cin >> a >> b;
int c = a + b;
if(c >= 10)
cout << "error" << endl;
else
cout << c << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'ina' was not declared in this scope; did you mean 'int'?
4 | ina a,b;
| ^~~
| int
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin >> a >> b;
| ^
a.cc:5:15: error: 'b' was not declared in this scope
5 | cin >> a >> b;
| ^
|
s563166463 | p03697 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
cout<<((a+b>9)?"error":a+b);
} | a.cc: In function 'int main()':
a.cc:12:23: error: operands to '?:' have different types 'const char*' and 'int'
12 | cout<<((a+b>9)?"error":a+b);
| ~~~~~~~^~~~~~~~~~~~
|
s083803973 | p03697 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b);
} | a.cc: In function 'int main()':
a.cc:12:21: error: operands to '?:' have different types 'const char*' and 'int'
12 | cout<<(a+b>9?"error":a+b);
| ~~~~~^~~~~~~~~~~~
|
s074076445 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A+B<10){
cout<<A+B<<endl;
}
else{
cout<<"error"<,endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ',' token
10 | cout<<"error"<,endl;
| ^
|
s733626971 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B; cin >> A >> B;
if(A+B < 10){
cout << A+B << endl;
}
else{
cout << "error" << endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:14:12: error: expected '}' at end of input
14 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s610266720 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
cout<<a+b<10?a+b:"error";
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
7 | cout<<a+b<10?a+b:"error";
| ~~~~~~~~~^~~
| | |
| | int
| std::basic_ostream<char>
a.cc:7:14: note: candidate: 'operator<(int, int)' (built-in)
7 | cout<<a+b<10?a+b:"error";
| ~~~~~~~~~^~~
a.cc:7:14: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
7 | cout<<a+b<10?a+b:"error";
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
7 | cout<<a+b<10?a+b:"error";
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | cout<<a+b<10?a+b:"error";
| ^~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
7 | cout<<a+b<10?a+b:"error";
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:7:15: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
7 | cout<<a+b<10?a+b:"error";
| ^~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s382304098 | p03697 | C++ | #include<iosteam>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a + b >= 10){
cout << "error" << endl;
}else{
cout << a + b << endl;
}
} | a.cc:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s577349226 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a+b>=10?"error":a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:6:21: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (a+b>=10?"error":a+b) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s002830866 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
if((a+b)>=10){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
}
| a.cc:9:3: error: extended character is not valid in an identifier
9 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:9:3: error: '\U00003000cout' was not declared in this scope
9 | cout<<"error"<<endl;
| ^~~~~~
|
s550576240 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
if(a+b){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
}
| a.cc:9:3: error: extended character is not valid in an identifier
9 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:9:3: error: '\U00003000cout' was not declared in this scope
9 | cout<<"error"<<endl;
| ^~~~~~
|
s807585100 | p03697 | C++ | #include<bits/stdc++.h>
int main(void){
int a,b;
cin>>a>>b;
if(a+b){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
} | a.cc:8:3: error: extended character is not valid in an identifier
8 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:3: error: '\U00003000cout' was not declared in this scope
8 | cout<<"error"<<endl;
| ^~~~~~
a.cc:8:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | cout<<"error"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout<<a+b<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout<<a+b<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s013479340 | p03697 | C++ | #include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a+b>=10?"error":a+b) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:21: error: operands to '?:' have different types 'const char*' and 'int'
11 | cout << (a+b>=10?"error":a+b) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s039312520 | p03697 | C++ | #include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a+b<10?a+b:"error") << endl;
}
| a.cc: In function 'int main()':
a.cc:11:20: error: operands to '?:' have different types 'int' and 'const char*'
11 | cout << (a+b<10?a+b:"error") << endl;
| ~~~~~~^~~~~~~~~~~~
|
s647234015 | p03697 | C++ | #include <iostream>
int main()
{
int a,b;
cin >> a >> b;
if(a+b>=10)
{
cout << "error" << endl;
return 0;
}
cout << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << "error" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << "error" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout << a+b << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout << a+b << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s448946251 | p03697 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b; cin >> a >> b;
cout << (a+b > 10 ? "error" : a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:6:21: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (a+b > 10 ? "error" : a+b) << endl;
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s383214811 | p03697 | Java | import java.util.*;
class Main{
public static main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(a+b>=10?"error":a+b);
}
} | Main.java:3: error: invalid method declaration; return type required
public static main(String[] args){
^
1 error
|
s845149687 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>X>>A>>B;
if(A+B>=10) cout<<"error";
else cout<<A+B;
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'X' was not declared in this scope
6 | cin>>X>>A>>B;
| ^
|
s573921516 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a+b>9)cour<<a+b;
else cout<<"error";
} | a.cc: In function 'int main()':
a.cc:6:12: error: 'cour' was not declared in this scope
6 | if(a+b>9)cour<<a+b;
| ^~~~
|
s975397965 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a+b>9)? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:17: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<((a+b>9)? a+b:"error");
| ~~~~~~~^~~~~~~~~~~~~
|
s066173131 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9 ? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:16: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9 ? a+b:"error");
| ~~~~~~^~~~~~~~~~~~~
|
s443459348 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:15: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9? a+b:"error");
| ~~~~~^~~~~~~~~~~~~
|
s201749595 | p03697 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#define REP(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;
int a,b;
int main(){
cin >> a >> b >> c;
int ans = a+b;
if(ans>=10){
cout<< "error" << endl;
return 0;
}
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:19:20: error: 'c' was not declared in this scope
19 | cin >> a >> b >> c;
| ^
|
s625391611 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b<=9?a+b:"error")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout<<(a+b<=9?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s662393981 | p03697 | C++ | #include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a+b>=10)cout << "error" << endl;
else << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '<<' token
9 | else << a+b << endl;
| ^~
|
s234639864 | p03697 | C++ | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
#define int long long
signed main(){
int N,K,B;
vector<int>a={0,1,3,1,2,1,2,1,1,2,1,2,1};
str S1,S2,S3;
cin>>N>>K;
cout<<(N+K<=10?N+K:"error");
}
| a.cc: In function 'int main()':
a.cc:14:17: error: operands to '?:' have different types 'long long int' and 'const char*'
14 | cout<<(N+K<=10?N+K:"error");
| ~~~~~~~^~~~~~~~~~~~
|
s940267617 | p03697 | C++ | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
#define int long long
signed main(){
double N,K,B;
vector<int>a={0,1,3,1,2,1,2,1,1,2,1,2,1};
str S1,S2,S3;
cin>>N>>K;
cout<<(N+K<=10?N+K:"error");
}
| a.cc: In function 'int main()':
a.cc:14:17: error: operands to '?:' have different types 'double' and 'const char*'
14 | cout<<(N+K<=10?N+K:"error");
| ~~~~~~~^~~~~~~~~~~~
|
s671458344 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
cout << (a + b < 10 ? a + b : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: operands to '?:' have different types 'int' and 'const char*'
8 | cout << (a + b < 10 ? a + b : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s273129891 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b<10?a+b:"error")<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:22: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b<10?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s505517123 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9)?(a+b):"error"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:36: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<(a+b>9)?(a+b):"error"<<endl;
| ~~~~~~~^~~~~~
|
s978993971 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?a+b:"error")<<endl;
}
| a.cc: In function 'int maiN()':
a.cc:6:21: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9?a+b:"error")<<endl;
| ~~~~~^~~~~~~~~~~~
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
7 | }
| ^
|
s502453367 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9)?a+b:"error"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:34: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<(a+b>9)?a+b:"error"<<endl;
| ~~~~~~~^~~~~~
|
s508828132 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?)a+b:"error"<<endl;
}
| a.cc: In function 'int maiN()':
a.cc:6:22: error: expected primary-expression before ')' token
6 | cout<<(a+b>9?)a+b:"error"<<endl;
| ^
a.cc:6:22: error: expected ':' before ')' token
6 | cout<<(a+b>9?)a+b:"error"<<endl;
| ^
| :
a.cc:6:22: error: expected primary-expression before ')' token
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
7 | }
| ^
|
s761708954 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?a+b:"error")<<endl;
} | a.cc: In function 'int maiN()':
a.cc:6:21: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9?a+b:"error")<<endl;
| ~~~~~^~~~~~~~~~~~
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
7 | }
| ^
|
s956644242 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A+B>=10?"error":A+B) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:19: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (A+B>=10?"error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s509197672 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (((a + b) >= 10 )? "error" : a + b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:28: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (((a + b) >= 10 )? "error" : a + b) << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s866294903 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << ((a + b) >= 10 ? "error" : a + b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:26: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << ((a + b) >= 10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s341234543 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b)<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout<<(a+b>9?"error":a+b)<<endl;
| ~~~~~^~~~~~~~~~~~
|
s468789769 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a<<b;
cout<<(a+b>9?"error":a+b)<<endl;
}
| a.cc: In function 'int main()':
a.cc:5:9: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>>a<<b;
| ~~~~~~^~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:5:9: note: candidate: 'operator<<(int, int)' (built-in)
5 | cin>>a<<b;
| ~~~~~~^~~
a.cc:5:9: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:5:6: note: cannot convert 'std::cin.std::basic_istream<char>::operator>>(a)' (type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'}) to type 'std::byte'
5 | cin>>a<<b;
| ~~~^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:5:11: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits> |
s187677581 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;cin>>a>>b;
if(a+b=>10)cout<<"error"<<endl;
else cout<<a+b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: expected primary-expression before '>' token
6 | if(a+b=>10)cout<<"error"<<endl;
| ^
|
s833163117 | p03697 | C++ | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <limits.h>
#include <map>
#include <numeric>
namespace test {
std::string to_string (char val) {
return std::string (1, val);
// return std::string{val};
}
//if( str.find ("r") != string::npos)
}
using namespace std;
typedef long long int llint;
int main (void) {
int a,b; cin >> a >> b;
cout << ( a + b >= 10 ? "error" : a + b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:27:31: error: operands to '?:' have different types 'const char*' and 'int'
27 | cout << ( a + b >= 10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s438093784 | p03697 | C++ | #include <iostream>
using namespace std;
int main (){
int a, b;
cin >> a >> b;
if((a+b)>=){
cout << "error" << endl;
}else{
cout << a+b << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before ')' token
7 | if((a+b)>=){
| ^
|
s563317319 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin a >> b;
if( a+b > 9){
cout << "error" << endl;
}
else{
cout << a + b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a >> b;
| ^~
| ;
|
s703268230 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin a>>b;
if(a+b>9){
cout << "error" << endl;
}
else{
cout << a+b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a>>b;
| ^~
| ;
|
s403250153 | p03697 | C++ | using namespace std;
#include<bits/stdc++.h>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for((I)=(A);(I)<(B);(I)++)
#define REP(I,N) FOR((I),0,(N))
#define UP(I,A,B) for((I)=(A);(I)<=(B);(I)++)
#define DW(I,A,B) for((I)=(A);(I)>=(B);(I)--)
#define IN(P) cin>>(P)
#define IN2(P1,P2) cin>>(P1)>>(P2)
#define IN3(P1,P2,P3) cin>>(P1)>>(P2)>>(P3)
#define INS(I,N,V) REP((I),(N)) cin>>(V[I])
#define INS2(I,N,V1,V2) REP((I),(N)) cin>>(V1[I])>>(V2[I]);
#define INS3(I,N,V1,V2,V3) REP((I),(N)) cin>>(V1[I])>>(V2[I])>>(V3[I]);
#define OUT(P) cout<<(P)<<endl
#define OUT2(P1,P2) cout<<(P1)<<" "<<(P2)<<endl
#define OUT3(P1,P2,P3) cout<<(P1)<<" "<<(P2)<<" "<<(P3)<<endl
#define OUTS(I,N,V) REP((I),(N)) cout<<(V[i])<<endl
#define ALL(C) (C).begin(),(C).end()
#define RALL(C) (C).rbegin(),(C).rend()
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
int A,B;
inline void solve(){
IN2(A,B);
OUT(A+B>9?"error":A+B);
}
int main(int argc,char**argv){
BEGIN
solve();
END
}
| a.cc: In function 'void solve()':
a.cc:31:12: error: operands to '?:' have different types 'const char*' and 'int'
31 | OUT(A+B>9?"error":A+B);
| ~~~~~^~~~~~~~~~~~
a.cc:15:23: note: in definition of macro 'OUT'
15 | #define OUT(P) cout<<(P)<<endl
| ^
|
s946877233 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) {
for (int j = 0; j < v[i].size(); j++) {
cout << v[i][j];
if (j != v[i].size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
}
template<typename T> void Show(vector<T> v) {
for (int i = 0; i < v.size(); i++) {
cout << v[i];
if (i != v.size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
int main() {
int A = 0, B = 0;
cin >> A >> B;
if (A + B >= 10) {
cout << "error" << endl;
} else {
cout << A + B << endl;
}
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s986518542 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) {
for (int j = 0; j < v[i].size(); j++) {
cout << v[i][j];
if (j != v[i].size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
}
template<typename T> void Show(vector<T> v) {
for (int i = 0; i < v.size(); i++) {
cout << v[i];
if (i != v.size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
int main() {
int A = 0, B = 0;
cin >> A >> B;
if (A + B >= 10) {
cout << "error";
} else {
cout << A + B;
}
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s456231456 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) {
for (int j = 0; j < v[i].size(); j++) {
cout << v[i][j];
if (j != v[i].size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
}
template<typename T> void Show(vector<T> v) {
for (int i = 0; i < v.size(); i++) {
cout << v[i];
if (i != v.size() - 1) {
cout << " ";
} else {
cout << endl;
}
}
}
int main() {
int A = 0, B = 0;
cin >> A >> B;
if (A + B > 10) {
cout << "error";
} else {
cout << A + B;
}
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s882418737 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10 ? a+b : "error");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:19: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b<10 ? a+b : "error");
| ~~~~~~~^~~~~~~~~~~~~~~
|
s402927146 | p03697 | C | #include <bits/stdc+;.h>
using namespace std;
int main(int argc, char const *argv[])
{
int a,b,c;
cin >> a >> b;
c = a + b;
if(c < 10) cout << c <, endl;
else cout <<"error" << endl;
return 0;
} | main.c:1:10: fatal error: bits/stdc+;.h: No such file or directory
1 | #include <bits/stdc+;.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s511080219 | p03697 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define For(i, n) for(int i = 0; i < (n); i ++)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.begin(), c.end()
#define Cin(T, x) T x; cin >> x;
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i];
#define Cout(val) cout << (val) << "\n";
#define Sort(a) sort(Range(a));
#define DeSort(a) sort(RevRange(a));
using namespace std;
using ll = long long;
int main(void){
Cin(int, a);
Cin(int, b);
if(a+b >= 10) Cout("error");
else Cout(a+b);
} | a.cc: In function 'int main()':
a.cc:21:3: error: 'else' without a previous 'if'
21 | else Cout(a+b);
| ^~~~
|
s950003810 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int a,b;cin>>a>>b;cout<<(a+b<=9?a+b:"error")<<endl;
} | a.cc: In function 'int main()':
a.cc:4:36: error: operands to '?:' have different types 'int' and 'const char*'
4 | int a,b;cin>>a>>b;cout<<(a+b<=9?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s050946587 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
cout<<(n+m>=10?"error":n+m)<<endl;;
}
| a.cc: In function 'int main()':
a.cc:6:17: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout<<(n+m>=10?"error":n+m)<<endl;;
| ~~~~~~~^~~~~~~~~~~~
|
s625112542 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10?(a+b):"error") << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b<10?(a+b):"error") << '\n';
| ~~~~~~^~~~~~~~~~~~~~
|
s786308052 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10?a+b:"error") << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b<10?a+b:"error") << '\n';
| ~~~~~~^~~~~~~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.