submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s658629935
p04043
C++
1. #include <iostream> 2. 3. using namespace std; 4. 5. int main() 6. { 7. int A,B,C; 8. cin >>A>>B>>C; 9. if (((A==5)||(A==7))&&((B==5)||(B==7))&&((C==5)||(C==7))&&(A+B+C==17)) 10. cout << "YES"; 11. else cout << "NO"; 12. return 0; 13. }
a.cc:1:9: error: stray '#' in program 1 | 1. #include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1. #include <iostream> | ^~ a.cc:4:1: error: expected unqualified-id before numeric constant 4 | 4. | ^~
s023291067
p04043
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> x(3); for( int i = 0;i <3; ++i ){ cin >> x[i]; } sort(x.begin(),x.end()); if( x[0] == 5 && x[1] == 5 && x[2] == 7 ){ cout << "YES"; } else { cout << "NO"; } coutn << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:7: error: 'coutn' was not declared in this scope 19 | coutn << endl; | ^~~~~
s225657379
p04043
C++
#include <iostream> using namespace std; int main() { int x[3]; for( int i = 0;i <3; ++i ){ cin >> x[i]; } sort(x); if( x[0] == 5 && x[1] == 5 && x[2] == 7 ){ cout << "YES"; } else { cout << "NO"; } coutn << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(x); | ^~~~ | short a.cc:16:7: error: 'coutn' was not declared in this scope 16 | coutn << endl; | ^~~~~
s809174333
p04043
C++
include <iostream> using namespace std; int main() { int x[3]; for( int i = 0;i <3; ++i ){ cin >> x[i]; } sort(x); if( x[0] == 5 && x[1] == 5 && x[2] == 7 ){ cout << "YES"; } else { cout << "NO"; } coutn << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin >> x[i]; | ^~~ a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(x); | ^~~~ | short a.cc:11:4: error: 'cout' was not declared in this scope 11 | cout << "YES"; | ^~~~ a.cc:14:5: error: 'cout' was not declared in this scope 14 | cout << "NO"; | ^~~~ a.cc:16:3: error: 'coutn' was not declared in this scope 16 | coutn << endl; | ^~~~~ a.cc:16:12: error: 'endl' was not declared in this scope 16 | coutn << endl; | ^~~~
s678520570
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> abc; for(int i=0;i<3;i++){ cin << abc.at(i); } sort(abc.begin(),abc.end()); if(abc.at(0)==7&&(abc.at(1)==5&&abc.at(2)==5)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 9 | cin << abc.at(i); | ~~~ ^~ ~~~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int} | std::istream {aka std::basic_istream<char>} a.cc:9:7: note: candidate: 'operator<<(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in) 9 | cin << abc.at(i); | ~~~~^~~~~~~~~~~~ a.cc:9:7: 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin << abc.at(i); | ^~~ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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
s837335647
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> abc; for(int i=0;i<3;i++){ cin << abc.at(i); } sort(abc.begin(),abc.end()); if(abc.at(0)==7&&abc.at(1)==5&&abc.at(2)==5) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 9 | cin << abc.at(i); | ~~~ ^~ ~~~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int} | std::istream {aka std::basic_istream<char>} a.cc:9:7: note: candidate: 'operator<<(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in) 9 | cin << abc.at(i); | ~~~~^~~~~~~~~~~~ a.cc:9:7: 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin << abc.at(i); | ^~~ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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
s624871181
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> abc(3); for(int i=0;i<3;i++){ cin << abc.at(i); } sort(a.begin(),a.end()); if(a.at(0)==7&&a.at(1)==5&&a.at(2)==5) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 9 | cin << abc.at(i); | ~~~ ^~ ~~~~~~~~~ | | | | | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int} | std::istream {aka std::basic_istream<char>} a.cc:9:7: note: candidate: 'operator<<(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in) 9 | cin << abc.at(i); | ~~~~^~~~~~~~~~~~ a.cc:9:7: 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin << abc.at(i); | ^~~ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << abc.at(i); | ^ /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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ 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:9:18: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << abc.at(i); | ^ /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
s244183097
p04043
C++
#include<iostream> using namespace std; int main(){ int A,B,C; cin >> A >> B >> C; if (A == 5 && B == 7 && C == 5){ cout << "YES" << endl; } else if (B == 5 && A == 7 && C == 5){ cout << "YES" << endl; } else if (A == 5 && C == 7 && B == 5){ cout << "YES" << endl; } else{ cout << "NO" << endl;} return 0;}   
a.cc:22:1: error: extended character   is not valid in an identifier 22 |    | ^ a.cc:22:1: error: extended character   is not valid in an identifier a.cc:22:1: error: '\U00003000\U00003000' does not name a type 22 |    | ^~~~
s576045143
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int arr[3],count=0; for(int i=0;i<n;i++) cin>>arr[i]; map<int,int> mp; for(int i=0;i<n;i++) mp[arr[i]]++; for(auto it=mp.begin();it!=mp.end();it++) { if(it->first==5) { if(it->second==2) count=1; else count=0; } else { if(it->first==7) { if(it->second==1) count=1; else count=0; } else count=0; } } if(count==0) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'n' was not declared in this scope 7 | for(int i=0;i<n;i++) | ^ a.cc:10:17: error: 'n' was not declared in this scope 10 | for(int i=0;i<n;i++) | ^
s321973666
p04043
C
#include <stdio.h> int main(){ int a,i=0; int cnt_7,cnt_5; while(i<2){ scanf("%d\n",&a); if(a==7&&cnt_7==0) cnt_7++; else if(a==7&&cnt_7==1){ printf("NO"); return 0; } else if(a==5&&cnt_5==2){ printf("NO"); return 0; } else if(a==5&&cnt_5!=2){ cnt_5++; } else{ printf("NO"); return 0; i++; } printf("YES"); }
main.c: In function 'main': main.c:26:1: error: expected declaration or statement at end of input 26 | } | ^
s503319119
p04043
C
#include <stdio.h> int main(){ int a,i=0; int cnt_7,cnt_5; while(i<2){ scanf("%d\n",a); if(a==7||cnt_7==0) cnt_7++; else if(a==7||cnt_7==1){ printf("NO"); return 0; } else if(b==5||cnt==2){ printf("NO"); return 0; } else if(b==5||cnt!=2){ cnt_2++; } i++; } printf("YES"); }
main.c: In function 'main': main.c:13:14: error: 'b' undeclared (first use in this function) 13 | else if(b==5||cnt==2){ | ^ main.c:13:14: note: each undeclared identifier is reported only once for each function it appears in main.c:13:20: error: 'cnt' undeclared (first use in this function); did you mean 'int'? 13 | else if(b==5||cnt==2){ | ^~~ | int main.c:18:8: error: 'cnt_2' undeclared (first use in this function); did you mean 'cnt_5'? 18 | cnt_2++; | ^~~~~ | cnt_5
s442591234
p04043
C
#include <stdio.h> #include <string.h> int main(){ int A,B,C; scanf("%d %d %d",&A,&B,&C); if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||(A==5 && B==7 && C==7)){ printf("YES");} else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:6:125: error: expected expression before '||' token 6 | if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||(A==5 && B==7 && C==7)){ | ^~ main.c:6:149: error: expected statement before ')' token 6 | if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||(A==5 && B==7 && C==7)){ | ^ main.c:8:7: error: 'else' without a previous 'if' 8 | else{ | ^~~~
s442319407
p04043
C
#include <stdio.h> #include <string.h> int main(){ int A,B,C; scanf("%d %d %d",&A,&B,&C); if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ printf("YES");} else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:6:125: error: expected expression before '||' token 6 | if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^~ main.c:6:147: error: expected statement before ')' token 6 | if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^ main.c:6:148: error: expected statement before ')' token 6 | if((A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^ main.c:8:7: error: 'else' without a previous 'if' 8 | else{ | ^~~~
s817832073
p04043
C
#include <stdio.h> #include <string.h> int main(){ int A,B,C; scanf("%d %d %d",&A,&B,&C); if({A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ printf("YES");} else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:6:6: error: expected expression before '{' token 6 | if({A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^ main.c:6:125: error: expected expression before '||' token 6 | if({A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^~ main.c:6:147: error: expected statement before ')' token 6 | if({A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^ main.c:6:148: error: expected statement before ')' token 6 | if({A==5 && B==7 && C==5) ||(A==7 && B==7 && C==5)||(A==5 && B==5 && C==7)|| (A==7 && B==5 && C==7)||A==7 && B==5 && C==5)||A==5 && B==7 && C==7)){ | ^ main.c:8:7: error: 'else' without a previous 'if' 8 | else{ | ^~~~
s434146143
p04043
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(0); //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int cnt = 0; for (int i = 0, a; i < 3; ++i) { cin >> a; if (a == 5) cnt++; } cout << (cnt >= ? "YES" : "NO"); }
a.cc: In function 'int main()': a.cc:17:25: error: expected primary-expression before '?' token 17 | cout << (cnt >= ? "YES" : "NO"); | ^
s072338384
p04043
C++
#include <bits/stdc++.h> using namespace std; using lint = long; using ll = long long; #define rep(i,n) for(lint (i) = 0;(i) < (lint)(n);(i)++) #define repInRange(i,start,end) for(lint (i) = (start);(i) < (end);++(i)) using lpair = pair<lint,lint>; using llv = vector<long long>; using lv = vector<lint>; using Llist = list<lint>; ll pow(ll k,ll l) { ll ret = 1; rep(i,l) { ret *= k; } return ret; } template <typename T> T sum(vector<T> vec) { ll ret = 0; rep(i,vec.size()) { ret += vec.at(i); } return ret; } void Main() { lv v(3); rep(i,3) cin >> lv[i]; sort(lv.begin(),lv.end()); if (lv[0] == 5 && lv[1] == 5 && lv[2] == 7) { cout << "Yes" << '\n'; return ; } cout << "No" << '\n'; } signed main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }
a.cc: In function 'void Main()': a.cc:31:27: error: expected primary-expression before '[' token 31 | rep(i,3) cin >> lv[i]; | ^ a.cc:32:16: error: expected primary-expression before '.' token 32 | sort(lv.begin(),lv.end()); | ^ a.cc:32:27: error: expected primary-expression before '.' token 32 | sort(lv.begin(),lv.end()); | ^ a.cc:33:15: error: expected unqualified-id before '[' token 33 | if (lv[0] == 5 && lv[1] == 5 && lv[2] == 7) { | ^
s819922901
p04043
C++
#include <bits/stdc++.h> using namespace std; using lint = long; using ll = long long; #define rep(i,n) for(lint (i) = 0;(i) < (lint)(n);(i)++) #define repInRange(i,start,end) for(lint (i) = (start);(i) < (end);++(i)) using lpair = pair<lint,lint>; using llv = vector<long long>; using lv = vector<lint>; using Llist = list<lint>; ll pow(ll k,ll l) { ll ret = 1; rep(i,l) { ret *= k; } return ret; } template <typename T> T sum(vector<T> vec) { ll ret = 0; rep(i,vec.size()) { ret += vec.at(i); } return ret; } void Main() { lv v; rep(i,3) cin >> lv[i]; sort(lv.begin(),lv.end()); if (lv[0] == 5 && lv[1] == 5 && lv[2] == 7) { cout << "Yes" << '\n'; return ; } cout << "No" << '\n'; } signed main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }
a.cc: In function 'void Main()': a.cc:31:27: error: expected primary-expression before '[' token 31 | rep(i,3) cin >> lv[i]; | ^ a.cc:32:16: error: expected primary-expression before '.' token 32 | sort(lv.begin(),lv.end()); | ^ a.cc:32:27: error: expected primary-expression before '.' token 32 | sort(lv.begin(),lv.end()); | ^ a.cc:33:15: error: expected unqualified-id before '[' token 33 | if (lv[0] == 5 && lv[1] == 5 && lv[2] == 7) { | ^
s729221562
p04043
C++
#include <bits/stdc++.h> using namespace std; using lint = long; using ll = long long; #define rep(i,n) for(lint (i) = 0;(i) < (lint)(n);(i)++) #define repInRange(i,start,end) for(lint (i) = (start);(i) < (end);++(i)) using lpair = pair<lint,lint>; using Vecint = vector<lint>; using Llist = list<lint>; ll pow(ll k,ll l) { ll ret = 1; rep(i,l) { ret *= k; } return ret; } template <typename T> T sum(vector<T> vec) { ll ret = 0; rep(i,vec.size()) { ret += vec.at(i); } return ret; } void Main() { ll a,b,c; cin >> a >> b >> c; if (a+b+c == 17 && a*b*c == 175) { cout << "Yes" << '\n'; return ; } cout << "No" >> '\n'; } signed main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }
a.cc: In function 'void Main()': a.cc:35:22: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and 'char') 35 | cout << "No" >> '\n'; | ~~~~~~~~~~~~ ^~ ~~~~ | | | | | char | std::basic_ostream<char> a.cc:35:22: note: candidate: 'operator>>(int, int)' (built-in) 35 | cout << "No" >> '\n'; | ~~~~~~~~~~~~~^~~~~~~ a.cc:35:22: note: no known conversion for argument 1 from '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:35:14: note: cannot convert 'std::operator<< <char_traits<char> >(std::cout, ((const char*)"No"))' (type 'std::basic_ostream<char>') to type 'std::byte' 35 | cout << "No" >> '\n'; | ~~~~~^~~~~~~ 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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ 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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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 = char]': a.cc:35:18: required from here 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ 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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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:35:25: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 35 | cout << "No" >> '\n'; | ^~~~ /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 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/ioman
s555448628
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (A==5 && B==5 && C==7){ cout << "YES" >> ; } if else (A==5 && B==7 && C==5){ cout << "YES" >> ; } if else (A==7 && B==5 && C==5){ cout << "YES" >> ; } else { cout << "NO" >> ; }
a.cc: In function 'int main()': a.cc:9:21: error: expected primary-expression before ';' token 9 | cout << "YES" >> ; | ^ a.cc:11:6: error: expected '(' before 'else' 11 | if else (A==5 && B==7 && C==5){ | ^~~~ | ( a.cc:14:6: error: expected '(' before 'else' 14 | if else (A==7 && B==5 && C==5){ | ^~~~ | ( a.cc:17:3: error: 'else' without a previous 'if' 17 | else { | ^~~~ a.cc:18:21: error: expected primary-expression before ';' token 18 | cout << "NO" >> ; | ^ a.cc:19:4: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s878867713
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if (A==5 && B==5 && C==7){ cout << "YES" >> ;end1 } if else (A==5 && B==7 && C==5){ cout << "YES" >> ;end1 } if else (A==7 && B==5 && C==5){ cout << "YES" >> ;end1 } else { cout << "NO" >> ;end1 }
a.cc: In function 'int main()': a.cc:9:21: error: expected primary-expression before ';' token 9 | cout << "YES" >> ;end1 | ^ a.cc:9:22: error: 'end1' was not declared in this scope 9 | cout << "YES" >> ;end1 | ^~~~ a.cc:11:6: error: expected '(' before 'else' 11 | if else (A==5 && B==7 && C==5){ | ^~~~ | ( a.cc:14:6: error: expected '(' before 'else' 14 | if else (A==7 && B==5 && C==5){ | ^~~~ | ( a.cc:17:3: error: 'else' without a previous 'if' 17 | else { | ^~~~ a.cc:18:21: error: expected primary-expression before ';' token 18 | cout << "NO" >> ;end1 | ^ a.cc:18:22: error: 'end1' was not declared in this scope 18 | cout << "NO" >> ;end1 | ^~~~ a.cc:19:4: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s970824298
p04043
C++
#include <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if((a != 5 && a != 7) || (b != 5 && b != 7) || (c != 5 && c != 7)){ cout << "NO"; } else if((a + b + c) != 17){ count << "NO"; } else{ count << "YES"; } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'count' was not declared in this scope 12 | count << "NO"; | ^~~~~ a.cc:15:9: error: 'count' was not declared in this scope 15 | count << "YES"; | ^~~~~
s788408373
p04043
C++
using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if((a != 5 && a != 7) || (b != 5 && b != 7) || (c != 5 && c != 7)){ cout << "NO"; } else if((a + b + c) != 17){ count << "NO"; } else{ count << "YES"; } }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> a >> b >> c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout << "NO"; | ^~~~ a.cc:7:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:9: error: 'count' was not declared in this scope 10 | count << "NO"; | ^~~~~ a.cc:13:9: error: 'count' was not declared in this scope 13 | count << "YES"; | ^~~~~
s584521411
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner snanner = new Scanner(System.in); int A = scanner.nextInt(); int B = scanner.nextInt(); int C = scanner.nextInt(); if( A * B * C == 175 ){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:9: error: cannot find symbol int A = scanner.nextInt(); ^ symbol: variable scanner location: class Main Main.java:10: error: cannot find symbol int B = scanner.nextInt(); ^ symbol: variable scanner location: class Main Main.java:11: error: cannot find symbol int C = scanner.nextInt(); ^ symbol: variable scanner location: class Main 3 errors
s530901773
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner snanner = new Scanner(System.in); int A = scanner.nextInt(); int B = scanner.nextInt(); int C = scanner.nextInt(); if( A * B * C == 175 ){ System.out.println("YES"); } else { System.out.println("NO"); } }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s389218733
p04043
Java
import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int L = scan.nextInt(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] str = new String[N]; for(int i = 0; i < N; i++){ str[i] = scan.next(); } Arrays.sort(str); for(String out : str){ System.out.print(out); } scan.close(); } }
Main.java:10: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:10: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:10: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 3 errors
s131953799
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int L = scan.nextInt(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] str = new String[N]; for(int i = 0; i < N; i++){ str[i] = reader.readLine(); } Arrays.sort(str); for(String out : str){ System.out.print(out); } reader.close(); } }
Main.java:17: error: unreported exception IOException; must be caught or declared to be thrown str[i] = reader.readLine(); ^ Main.java:25: error: unreported exception IOException; must be caught or declared to be thrown reader.close(); ^ 2 errors
s801849265
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int L = scan.nextInt(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); for(int i = 0; i < N; i++){ String[] str = new String[N]; str[i] = reader.readLine(); } Arrays.sort(str); for(String out : str){ System.out.print(out); } reader.close(); } }
Main.java:20: error: cannot find symbol Arrays.sort(str); ^ symbol: variable str location: class Main Main.java:22: error: cannot find symbol for(String out : str){ ^ symbol: variable str location: class Main 2 errors
s781949652
p04043
Java
import java.util.Scanner; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int cnt1 = 0; int cnt2 = 0; for(int i = 0; i < 3; i++){ int num = scan.nextInt(); if(num == 5){ cnt1++; } else if(num == 7){ cnt2++; } } if(cnt1 == 2 && cnt2 == 1){ System.out.println("YES"); } else{ System.out.println("NO"); } scan.close(); }
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s978495332
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,C; cin >> A >> B >> C; int count = 0; if(A == 7)count ++; if(B == 7)count ++; if(C == 7)count ++; if(count == 1)cout << YES << endl; else cout << NO << endl; }
a.cc: In function 'int main()': a.cc:13:25: error: 'YES' was not declared in this scope 13 | if(count == 1)cout << YES << endl; | ^~~ a.cc:14:16: error: 'NO' was not declared in this scope 14 | else cout << NO << endl; | ^~
s711655375
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C cin >> A >> B >> C ; if ( (A==5 && B==5 && C==7) || (A==5 && B==7 && C==5) || (A==7 && B==5 && C==5) || ) { cout << "YES" << endl; } else if { cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:7:5: error: expected initializer before 'cin' 7 | cin >> A >> B >> C ; | ^~~ a.cc:9:25: error: 'C' was not declared in this scope 9 | if ( (A==5 && B==5 && C==7) || | ^ a.cc:13:6: error: expected primary-expression before ')' token 13 | ) | ^ a.cc:18:3: error: expected '(' before '{' token 18 | { | ^ | ( a.cc:20:4: error: expected '}' at end of input 20 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s206698659
p04043
C++
#!/bin/bash read s s=(`echo $s | tr ' ' '\n' | sort`) if((s[0]==5&&s[1]==5&&s[2]==7)) then echo "YES" else echo "NO" fi
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/bin/bash | ^ a.cc:3:4: error: stray '`' in program 3 | s=(`echo $s | tr ' ' '\n' | sort`) | ^ a.cc:3:33: error: stray '`' in program 3 | s=(`echo $s | tr ' ' '\n' | sort`) | ^ a.cc:2:1: error: 'read' does not name a type 2 | read s | ^~~~
s798596598
p04043
C++
#iclude<bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> s(n); for(int i = 0; i < n; i++)cin >> s.at(i); sort(s.begin(),s.end()); for(int i = 0;i < n; i++)cout << s.at(i); cout << endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include? 1 | #iclude<bits/stdc++.h> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> n >> l; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #iclude<bits/stdc++.h> a.cc:7:3: error: 'vector' was not declared in this scope 7 | vector<string> s(n); | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' +++ |+#include <vector> 1 | #iclude<bits/stdc++.h> a.cc:7:10: error: 'string' was not declared in this scope 7 | vector<string> s(n); | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | #iclude<bits/stdc++.h> a.cc:7:18: error: 's' was not declared in this scope 7 | vector<string> s(n); | ^ a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(s.begin(),s.end()); | ^~~~ | short a.cc:10:28: error: 'cout' was not declared in this scope 10 | for(int i = 0;i < n; i++)cout << s.at(i); | ^~~~ a.cc:10:28: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:3: error: 'cout' was not declared in this scope 11 | cout << endl; | ^~~~ a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:11: error: 'endl' was not declared in this scope 11 | cout << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #iclude<bits/stdc++.h>
s824893687
p04043
C++
clude<bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> s(n); for(int i = 0; i < n; i++)cin >> s.at(i); sort(s.begin(),s.end()); for(int i = 0;i < n; i++)cout << s.at(i); cout << endl; return 0; }
a.cc:1:1: error: 'clude' does not name a type 1 | clude<bits/stdc++.h> | ^~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> n >> l; | ^~~ a.cc:7:3: error: 'vector' was not declared in this scope 7 | vector<string> s(n); | ^~~~~~ a.cc:7:10: error: 'string' was not declared in this scope 7 | vector<string> s(n); | ^~~~~~ a.cc:7:18: error: 's' was not declared in this scope 7 | vector<string> s(n); | ^ a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(s.begin(),s.end()); | ^~~~ | short a.cc:10:28: error: 'cout' was not declared in this scope 10 | for(int i = 0;i < n; i++)cout << s.at(i); | ^~~~ a.cc:11:3: error: 'cout' was not declared in this scope 11 | cout << endl; | ^~~~ a.cc:11:11: error: 'endl' was not declared in this scope 11 | cout << endl; | ^~~~
s520851933
p04043
C
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a==5 && b==5 && c==7) || (b==5&&c==5 && a==7) || (a==5 && c==5 && b==7)) cout<<"YES"; else cout<<"NO"; return 0; }
main.c:1:13: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s241110833
p04043
C
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a==5 & b==5) || (b==5&&c==5) || (a==5 && c==5))cout<<"YES"; else cout<<"NO"; return 0; }
main.c:1:13: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s239134740
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c vector<int> v(3); cin>>v[0]>>v[1]>>v[2]; sort(v.begin(),v.end()); if(v[0]== 5 and v[1]==5 and v[2]==7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:4: error: expected initializer before 'vector' 7 | vector<int> v(3); | ^~~~~~ a.cc:9:8: error: 'v' was not declared in this scope 9 | cin>>v[0]>>v[1]>>v[2]; | ^
s392537540
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c vector<int> v(3); cin>>v[0]>>v[1]>>v[2]; sort(v.begin(),v.end()); if(v[0]== 5 and v[1]==5 and v[2]==7){ cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:4: error: expected initializer before 'vector' 7 | vector<int> v(3); | ^~~~~~ a.cc:9:8: error: 'v' was not declared in this scope 9 | cin>>v[0]>>v[1]>>v[2]; | ^ a.cc:16:3: error: expected '}' before 'else' 16 | else | ^~~~ a.cc:13:39: note: to match this '{' 13 | if(v[0]== 5 and v[1]==5 and v[2]==7){ | ^
s776545266
p04043
C++
int a , b ; char op ; cin >> a >> op >> b ; if (op == '+') { cout << a + b ; } else cout << a - b ;
a.cc:4:5: error: 'cin' does not name a type 4 | cin >> a >> op >> b ; | ^~~ a.cc:5:5: error: expected unqualified-id before 'if' 5 | if (op == '+') | ^~ a.cc:10:5: error: expected unqualified-id before 'else' 10 | else | ^~~~
s481386955
p04043
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) int main() { string ans; int a, b, c; cin >> a >> b >> c; if (a != 5 || a != 7 || b != 5 || b != 7 || c != 5 || c != 7 ||) { ans = "NO"; cout << ans << "\n"; return 0; }else if(a+b+c==12){ ans = "YES"; cout << ans << "\n"; return 0; }else{ ans = "NO"; cout << ans << "\n"; return 0; } }
a.cc: In function 'int main()': a.cc:11:68: error: expected primary-expression before ')' token 11 | if (a != 5 || a != 7 || b != 5 || b != 7 || c != 5 || c != 7 ||) | ^
s093569542
p04043
Java
import java.util.Arrays; import java.util.Scanner; public class Main10 { public static void main(String[]args){ Scanner scan = new Scanner(System.in); int[] A = new int[3]; for(int i = 0;i<3;i++){ A[i] = scan.nextInt(); } Arrays.sort(A);//昇順にソート if(A[0]==5&&A[1]==5&&A[2]==7) System.out.println("YES"); else System.out.println("NO"); } }
Main.java:4: error: class Main10 is public, should be declared in a file named Main10.java public class Main10 { ^ 1 error
s209068159
p04043
C++
#include <iostream> using namespace std; int main() { int A ,B ,C ; cin >> A , B , C; if ( A ,B == 5 && C == 7 || B , C == 5 && A == 7 || A , C == 5 && B == 7 ) cout << "YES"; else cout << "NO"; return 0;
a.cc: In function 'int main()': a.cc:19:14: error: expected '}' at end of input 19 | return 0; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s504115689
p04043
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==5&&b==5&&c=7){printf("YES"); }else if(a==5&&b==7&&c=5){printf("YES"); }else if(a==7&&b==5&&c=5){printf("YES"); }else(printf("NO");) return 0; }
main.c: In function 'main': main.c:8:19: error: lvalue required as left operand of assignment 8 | if(a==5&&b==5&&c=7){printf("YES"); | ^ main.c:9:25: error: lvalue required as left operand of assignment 9 | }else if(a==5&&b==7&&c=5){printf("YES"); | ^ main.c:10:25: error: lvalue required as left operand of assignment 10 | }else if(a==7&&b==5&&c=5){printf("YES"); | ^ main.c:11:21: error: expected ')' before ';' token 11 | }else(printf("NO");) | ~ ^ | ) main.c:11:23: error: expected ';' before 'return' 11 | }else(printf("NO");) | ^ | ; 12 | 13 | return 0; | ~~~~~~
s574161330
p04043
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a==5 & b==5) || (b==5&&c==5) || (a==5 && c==5)))cout<<"YES"; else cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:8:54: error: expected primary-expression before ')' token 8 | if((a==5 & b==5) || (b==5&&c==5) || (a==5 && c==5)))cout<<"YES"; | ^
s167969034
p04043
Java
q
Main.java:1: error: reached end of file while parsing q ^ 1 error
s830431973
p04043
C++
#include <iostream> using namespace std; int main() { int a, b, c; cout<<"enter your poem 3 times"<<endl; cin>> a>>b>>c; if ( a = 5 && b = 5 && c = 7 ) cout << "yes"; else cout <<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: lvalue required as left operand of assignment 9 | if ( a = 5 && b = 5 && c = 7 ) | ~~^~~~
s173886783
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(a = 7 && b = 5 && c = 5){ cout << "Yes" << endl; } else if(a = 5 && b = 7 && c = 5){ cout << "Yes" << endl; } else if(a = 5 && b = 5 && c = 7){ cout << "Yes" << endl; } else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:8:21: error: lvalue required as left operand of assignment 8 | if(a = 7 && b = 5 && c = 5){ | ~~^~~~ a.cc:12:27: error: lvalue required as left operand of assignment 12 | else if(a = 5 && b = 7 && c = 5){ | ~~^~~~ a.cc:16:26: error: lvalue required as left operand of assignment 16 | else if(a = 5 && b = 5 && c = 7){ | ~~^~~~
s128006633
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if(a = 7 && b = 5 $$ c = 5){ cout << "Yes" << endl; } else if(a = 5 && b = 7 $$ c = 5){ cout << "Yes" << endl; } else if(a = 5 && b = 5 $$ c = 7){ cout << "Yes" << endl; } else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:8:12: error: lvalue required as left operand of assignment 8 | if(a = 7 && b = 5 $$ c = 5){ | ~~^~~~ a.cc:8:20: error: expected ')' before '$$' 8 | if(a = 7 && b = 5 $$ c = 5){ | ~ ^~~ | ) a.cc:12:18: error: lvalue required as left operand of assignment 12 | else if(a = 5 && b = 7 $$ c = 5){ | ~~^~~~ a.cc:12:26: error: expected ')' before '$$' 12 | else if(a = 5 && b = 7 $$ c = 5){ | ~ ^~~ | ) a.cc:16:17: error: lvalue required as left operand of assignment 16 | else if(a = 5 && b = 5 $$ c = 7){ | ~~^~~~ a.cc:16:25: error: expected ')' before '$$' 16 | else if(a = 5 && b = 5 $$ c = 7){ | ~ ^~~ | )
s435797376
p04043
C++
#include <iostream> using namespace std; int main() char A , B ,C; cin >> A >> B >> C; if ( 1<= A , B ,C <=10) cout << "YES"; else cout << "NO";
a.cc:6:3: error: expected initializer before 'char' 6 | char A , B ,C; | ^~~~ a.cc:7:1: error: 'cin' does not name a type 7 | cin >> A >> B >> C; | ^~~ a.cc:8:1: error: expected unqualified-id before 'if' 8 | if ( 1<= A , B ,C <=10) | ^~ a.cc:10:3: error: expected unqualified-id before 'else' 10 | else | ^~~~
s609848187
p04043
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define rep2(i,s,n) for (int i = s; i < n; ++i) #define all(a) a.begin(),a.end() using namespace std; int main() { int v[3]; rep(i,3) cin >> v[i]; sort(all(v)); if(v == {5,5,7}) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:4:18: error: request for member 'begin' in 'v', which is of non-class type 'int [3]' 4 | #define all(a) a.begin(),a.end() | ^~~~~ a.cc:10:10: note: in expansion of macro 'all' 10 | sort(all(v)); | ^~~ a.cc:4:28: error: request for member 'end' in 'v', which is of non-class type 'int [3]' 4 | #define all(a) a.begin(),a.end() | ^~~ a.cc:10:10: note: in expansion of macro 'all' 10 | sort(all(v)); | ^~~ a.cc:11:13: error: expected primary-expression before '{' token 11 | if(v == {5,5,7}) cout << "YES" << endl; | ^ a.cc:11:12: error: expected ')' before '{' token 11 | if(v == {5,5,7}) cout << "YES" << endl; | ~ ^~ | )
s922405647
p04043
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define rep2(i,s,n) for (int i = s; i < n; ++i) #define all(a) a.begin(),a.end() using namespace std; int main() { vector<int> v(3); rep(i,3) cin >> v[i]; sort(all(v)); if(v == {5,5,7}) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:11:13: error: expected primary-expression before '{' token 11 | if(v == {5,5,7}) cout << "YES" << endl; | ^ a.cc:11:12: error: expected ')' before '{' token 11 | if(v == {5,5,7}) cout << "YES" << endl; | ~ ^~ | )
s551494372
p04043
C
#include <stdio.h> #include <string.h> int main(){ int line[3]; int count5 = 0; int count7 = 0; int i; if(!((scanf("%d",&line[0])==1) && (scanf("%d",&line[1])==1) && (scanf("%d",&line[2])==1))){ return -1; } for(i=0;i<3,i++){ if(line[i]==5){ count5++; } if(line[i]==7){ count7++; } } if(count5==2&&count7==1){ printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:14:17: error: expected ';' before ')' token 14 | for(i=0;i<3,i++){ | ^ | ;
s442664135
p04043
C
#include <stdio.h> #include <string.h> int main(){ int line[3]; int count5 = 0; int count7 = 0; int i; if(!((scanf("%d",&line[0])==1) && (scanf("%d",&line[1])==1) && (scanf("%d",&line[2])==1)){ return -1; } for(i=0;i<3,i++){ if(line[i]==5){ count5++; } if(line[i]==7){ count7++; } } if(count5==2&&count7==1){ printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:11:38: error: expected ')' before '{' token 11 | && (scanf("%d",&line[2])==1)){ | ^ | ) main.c:9:5: note: to match this '(' 9 | if(!((scanf("%d",&line[0])==1) | ^ main.c:28:1: error: expected expression before '}' token 28 | } | ^
s215285037
p04043
C
#include <stdio.h> #include <string.h> int main(){ int line[3]; int count5 = 0; int count7 = 0; int i; if(!((scanf("%d",&line[0])==1) && (scanf("%d",&line[1])==1) && (scanf("%d",&c),&line[2]))){ return -1; } for(i=0;i<3,i++){ if(line[i]==5){ count5++; } if(line[i]==7){ count7++; } } if(count5==2&&count7==1){ printf("YES"); } else { printf("NO"); } return 0; }
main.c: In function 'main': main.c:11:25: error: 'c' undeclared (first use in this function) 11 | && (scanf("%d",&c),&line[2]))){ | ^ main.c:11:25: note: each undeclared identifier is reported only once for each function it appears in main.c:14:17: error: expected ';' before ')' token 14 | for(i=0;i<3,i++){ | ^ | ;
s000297129
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ int count5 = 0; int count7 = 0; Scanner sc = new Scanner(System.in); Stirng[] line = sc.nextLine().split(" "); for(String n:line){ if(n.equals("5")){ count5++; } if(n.equals("7")){ count7++; } } if(count5==2 && count7==1){ System.out.println("OK"); }else { System.out.println("NG"); } } }
Main.java:9: error: cannot find symbol Stirng[] line = sc.nextLine().split(" "); ^ symbol: class Stirng location: class Main 1 error
s079552636
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ int count5 = 0; int count7 = 0; Scanner sc = new Scanner(System.in); String[] line = sc.readLine().split(" "); for(String n:line){ if(n.equals("5")){ count5++; } if(n.equals("7")){ count7++; } } if(count5==2 && count7==1){ System.out.println("OK"); }else { System.out.println("NG"); } } }
Main.java:9: error: cannot find symbol String[] line = sc.readLine().split(" "); ^ symbol: method readLine() location: variable sc of type Scanner 1 error
s990855170
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ int count5 = 0; int count7 = 0; Scanner sc = new Scanner(System.in); Stirng[] line = sc.nextLine().split(" "); for(String n:line){ if(n.equals("5")){ count5++; } if(n.equals("7")){ count7++; } } if(count5==2 && count7==1){ System.out.println("OK"); }else { System.out.println("NG"); } } }
Main.java:9: error: cannot find symbol Stirng[] line = sc.nextLine().split(" "); ^ symbol: class Stirng location: class Main 1 error
s742824793
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ int count5 = 0; int count7 = 0; Scanner sc = new Scanner(System.in); Stirng[] line = sc.readLine().split(" "); for(String n:line){ if(n.equals("5")){ count5++; } if(n.equals("7")){ count7++; } } if(count5==2 && count7==1){ System.out.println("OK"); }else { System.out.println("NG"); } } }
Main.java:9: error: cannot find symbol Stirng[] line = sc.readLine().split(" "); ^ symbol: class Stirng location: class Main Main.java:9: error: cannot find symbol Stirng[] line = sc.readLine().split(" "); ^ symbol: method readLine() location: variable sc of type Scanner 2 errors
s702437746
p04043
Java
import java.util.*; public class Main { public static void main(String[] args){ int count5 = 0; int count7 = 0; Scanner sc = new Scanner(System.in); Stirng[] line = sc.readLine().split(" "); for(String n:line){ if(n.equals("5")){ count5++; } if(n.equals("7")){ count7++; } } if(count5==2 && count7==1){ System.out.println("OK"); }else { System.out.println("NG") } } }
Main.java:21: error: ';' expected System.out.println("NG") ^ 1 error
s654349337
p04043
C
#include <stdio.h> int Main(){ int a; int b; int c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){ printf("OK"); } else { printf("NG"); } return 1; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s003913404
p04043
C
#include <stdio.h> int Main(){ int a; int b; int c; scanf("%d",a); scanf("%d",b); scanf("%d",c); if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){ printf("OK"); } else { printf("NG"); } return 1; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s401300736
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin>>A >> B>> C; if(A+B+C=17&&A*B*C=175){ cout <<"Yes"<<endl; } else{ cout <<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:7:14: error: lvalue required as left operand of assignment 7 | if(A+B+C=17&&A*B*C=175){ | ~~^~~~~~~
s441927267
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin>>A >> B>> C; if(A+B+C=17&&ABC=175){ cout <<"Yes"<<endl; else{ cout <<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:16: error: 'ABC' was not declared in this scope 7 | if(A+B+C=17&&ABC=175){ | ^~~ a.cc:9:3: error: expected '}' before 'else' 9 | else{ | ^~~~ a.cc:7:24: note: to match this '{' 7 | if(A+B+C=17&&ABC=175){ | ^ a.cc:11:4: error: expected '}' at end of input 11 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s818819422
p04043
C
#include<stdio.h> int main(void){ int a[3],cnt5=cnt7=0; for(int i=0;i<3;i++){ scanf("%d",a[i]); if(a[i]==5){ cnt5++; } if(a[i]==7){ cnt7++; } } if(cnt5==1&&cnt7==1){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:3:17: error: 'cnt7' undeclared (first use in this function); did you mean 'cnt5'? 3 | int a[3],cnt5=cnt7=0; | ^~~~ | cnt5 main.c:3:17: note: each undeclared identifier is reported only once for each function it appears in
s738266082
p04043
C++
#include "bits/stdc++.h" using namespace std; int main() { int A, B, C; cin >> A >> B >> C; if (A == 5 && B == 5 && C == 7) { cout << "YES" << endl; } else if (A == 5 && B == 7 && C == 5) { cout << "YES" << endl; } else if (A == 7 && B == 5 && C == 5) { cout << "YES" << endl; } else { cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:19:4: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s583878103
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { #freopen("input.txt","r",stdin); #freopen("output.txt","w",stdout); #freopen("error.txt","w",stderr); int a,b,c; cin>>a>>b>>c; if((a==7 && b==5 && c==5)||(a==5 && b==7 && c==5)||(a==5 && b==5 && c==7)) cout<<"YES"; else cout<<"NO"; return 0; }
a.cc:5:10: error: invalid preprocessing directive #freopen 5 | #freopen("input.txt","r",stdin); | ^~~~~~~ a.cc:6:10: error: invalid preprocessing directive #freopen 6 | #freopen("output.txt","w",stdout); | ^~~~~~~ a.cc:7:10: error: invalid preprocessing directive #freopen 7 | #freopen("error.txt","w",stderr); | ^~~~~~~
s215881462
p04043
C++
a = input() b = input() c = input() if((a+b+c)==17): if(a==5): if(b==7 or c==7): print('YES') elif(a==7): if(b==5 and c==5): print('YES') else: print('NO') else: print('NO')
a.cc:8:13: warning: multi-character character constant [-Wmultichar] 8 | print('YES') | ^~~~~ a.cc:11:13: warning: multi-character character constant [-Wmultichar] 11 | print('YES') | ^~~~~ a.cc:13:11: warning: multi-character character constant [-Wmultichar] 13 | print('NO') | ^~~~ a.cc:16:9: warning: multi-character character constant [-Wmultichar] 16 | print('NO') | ^~~~ a.cc:1:1: error: 'a' does not name a type 1 | a = input() | ^
s048905956
p04043
C
#include<stdio.h> int main(void) { int a[2], i, sum = 0; for (i = 0; i < 3; i++) { scanf("%d" &a[i]); } for (i = 0; i < 3; i++) { if (a[i] != 5 || a[i] != 7) { puts("No"); return 0; } sum += a[i]; } if (sum == 12) puts("Yes"); else puts("No"); return 0; }
main.c: In function 'main': main.c:7:28: error: invalid operands to binary & (have 'char *' and 'int') 7 | scanf("%d" &a[i]); | ~~~~ ^~~~~ | | | | char * int
s763375277
p04043
C
#include<stdio.h> int main(void) { int a,b,c; scanf("%d,%d,%d",a,b,c); if(a==7||b==7||c==7) else if((a==5&&b==5)||(b==5&&c==5)||(c==5&&a==5)) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:9: error: expected expression before 'else' 7 | else if((a==5&&b==5)||(b==5&&c==5)||(c==5&&a==5)) | ^~~~
s290093510
p04043
C++
#include<bits/stdc++.h> using namespace std; #define mod(cans) cans%10**9+7 #define debug(x) cout << "Debug" << x << "\n" #define rep(i,n) for(int i=0;i<n;i++) #define repr(i,n) for(int i=n-1;i>=0;i--) #define rep1(i,n) for(int i=1;i<=n;i++) #define cin_pl(n,x) rep(i,n){cin>>x[i];} #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define prians(Answer) cout<<Answer<<"\n" #define TF(X) X==1?cout<<"Yes\n":cout<<"No\n" #define elcon else{continue;} typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<string> vs; typedef vector<vector<int> > matrix; typedef pair<int,int> pii; typedef vector<pii> vpi; typedef greater<int> gi; typedef vector<unsigned> vu; ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); } bool is_prime(const unsigned n){ switch(n){ case 0: case 1: return false; case 2: return true; } for(unsigned i=2;i<n;++i){ if(n%i == 0) return false; } return true; } int main() { vi p(3); cin_pl(3,p); sort(all(p)); if(p[0]==5&&p[i]==5&&p[2]==7)cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:50:19: error: 'i' was not declared in this scope 50 | if(p[0]==5&&p[i]==5&&p[2]==7)cout<<"YES"; | ^
s654021629
p04043
C++
#include<bit/stdc++.h> using namespace std; int main() { int arr[3]; cin >> arr[0] >> arr[1] >> arr[2]; sort(arr, arr+3); cout (arr[0] == 5 && arr[1] == 5 && arr[2] == 7) }
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory 1 | #include<bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s316574270
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int a[3]; for (int i = 0; i < 3; i++) { cin >> a[i]; } sort(a, a+3); if (a[0] == 5 && a[1] == 5 && a[2] == 7) { cout < "YES\n"; } else { cout << "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:18:22: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [5]') 18 | cout < "YES\n"; | ~~~~ ^ ~~~~~~~ | | | | | const char [5] | std::ostream {aka std::basic_ostream<char>} 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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [5]' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [5]' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 18 | cout < "YES\n"; | ^~~~~~~ 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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 18 | cout < "YES\n"; | ^~~~~~~ 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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout < "YES\n"; | ^~~~~~~ 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:18:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout < "YES\n"; | ^~~~~~~ /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:18:24: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 18 | cout < "YES\n"; | ^~~~~~~ /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<_C
s959864428
p04043
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main(){ vi a(3); bool f1=false,sv=false,f2=false; rep(i,3){ cin>>a.at(i); if(a.at(i)==5){ if(!f1)f1=true; else f2=true; }else if(a.at(i)==7)sv=true; } if(f1&&sv&&f2) cout<<"YES\n"s; else cout<<"NO\n"s; }
a.cc: In function 'int main()': a.cc:6:9: error: 'vi' was not declared in this scope 6 | vi a(3); | ^~ a.cc:9:22: error: 'a' was not declared in this scope 9 | cin>>a.at(i); | ^
s438237885
p04043
C++
include <bits/stdc++.h> using namespace std; int main() { int c[11] = {0}; int A, B, C; cin >> A >> B >> C; c[A]++; c[B]++; c[C]++; if (c[5] == 2 && c[7] == 1) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> A >> B >> C; | ^~~ a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout << "YES" << endl; | ^~~~ a.cc:13:26: error: 'endl' was not declared in this scope 13 | cout << "YES" << endl; | ^~~~ a.cc:15:9: error: 'cout' was not declared in this scope 15 | cout << "NO" << endl; | ^~~~ a.cc:15:25: error: 'endl' was not declared in this scope 15 | cout << "NO" << endl; | ^~~~
s582865091
p04043
C++
#include<iostream> #include<vector> #include <cmath> #include <map> #include <cctype> #include <algorithm> #include <string> using namespace std; int main(void){ string a; int a[2] ; a[0] = 0; a[1] = 0; for(int i = 0; i < 3 ; i++){ cin >> a ; size_t n = a.size(); if(n == 5){ a[0]++; }else if(n == 7){ a[1]++: } } if(a[0]==2 &&a[1]==1){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: conflicting declaration 'int a [2]' 11 | int a[2] ; | ^ a.cc:10:12: note: previous declaration as 'std::string a' 10 | string a; | ^ a.cc:21:19: error: expected ';' before ':' token 21 | a[1]++: | ^ | ;
s894542702
p04043
C
#include<iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if ((a + b + c) != 17){ cout << "NO"; } else { cout << "YES"; } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s184836643
p04043
C++
#include <bits/stdc++.h> using namespace std int main() { int A , B , C ; cin >> A >> B >> C ; if((A==5 && B==7 && C==5)||(A==5 && B==5 && C==7)||(A==7 && B==5 && C==5)) { cout << "YES\n" ; } else { cout << "NO\n" ; } return 0 ; }
a.cc:3:24: error: expected ';' before 'int' 3 | using namespace std | ^ | ; 4 | 5 | int main() | ~~~
s153309779
p04043
C++
#include <bits/stdc++.h> using namespace std int main() { int A , B , C ; cin << A << B << C ; if((A==5 && B==7 && C==5)||(A==5 && B==5 && C==7)||(A==7 && B==5 && C==5)) { cout << "YES\n" ; } else { cout << "NO\n" ; } return 0 ; }
a.cc:3:20: error: expected ';' before 'int' 3 | using namespace std | ^ | ; 4 | 5 | int main() | ~~~ a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 9 | cin << A << B << C ; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:9:7: note: candidate: 'operator<<(int, int)' (built-in) 9 | cin << A << B << C ; | ~~~~^~~~ a.cc:9:7: 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ 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:9:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 9 | cin << A << B << C ; | ^~~ 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 9 | cin << A << B << C ; | ^ /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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ 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:9:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 9 | cin << A << B << C ; | ^ /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/substi
s152936657
p04043
Java
import java.util.Scanner; public class IroHaAndHaiku { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); System.out.println(( (A == 5 && B == 5 && C == 7) || (A == 5 && B == 7 && C == 5) || (A == 7 && B == 5 && C == 5) ) ? "YES" : "NO"); } } }
Main.java:3: error: class IroHaAndHaiku is public, should be declared in a file named IroHaAndHaiku.java public class IroHaAndHaiku { ^ 1 error
s919975444
p04043
C++
#include<bits/stdc++> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a + b + c == 19){ if(a == 7 && b == 7) cout << "YES" << endl; else if(a == 7 && c == 7) cout << "YES" << endl; else if(b == 7 && c == 7) cout << "YES" << endl; else cout << "NO" << endl; } else cout << "NO" << endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s677342998
p04043
C++
#include<iostream> #include<vector> using namespace std; int main () { vector<int> data_array(cin); if (data_array.size != 3) cout << "NO"; int value5 = 0; int value7 = 0; for (int& element : data_array) { if (element == 5) value5++; if (element == 7) value7++; } if (value5 == 2 and value7 == 1) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:6:33: error: no matching function for call to 'std::vector<int>::vector(std::istream&)' 6 | vector<int> data_array(cin); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = int; _Alloc = std::allocator<int>]' 707 | vector(_InputIterator __first, _InputIterator __last, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]' 678 | vector(initializer_list<value_type> __l, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::initializer_list<int>' 678 | vector(initializer_list<value_type> __l, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]' 659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>; std::false_type = std::false_type]' 640 | vector(vector&& __rv, const allocator_type& __m, false_type) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>; std::true_type = std::true_type]' 635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>; std::__type_identity_t<_Alloc> = std::allocator<int>]' 624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 620 | vector(vector&&) noexcept = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:620:14: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::vector<int>&&' 620 | vector(vector&&) noexcept = default; | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 601 | vector(const vector& __x) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:601:28: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'const std::vector<int>&' 601 | vector(const vector& __x) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int; value_type = int; allocator_type = std::allocator<int>]' 569 | vector(size_type __n, const value_type& __value, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int; allocator_type = std::allocator<int>]' 556 | vector(size_type __n, const allocator_type& __a = allocator_type()) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:556:24: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'std::vector<int>::size_type' {aka 'long unsigned int'} 556 | vector(size_type __n, const allocator_type& __a = allocator_type()) | ~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]' 542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:542:36: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'const std::vector<int>::allocator_type&' {aka 'const std::allocator<int>&'} 542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = int; _Alloc = std::allocator<int>]' 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 1 provided a.cc:7:22: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 7 | if (data_array.size != 3) cout << "NO"; | ~~~~~~~~~~~^~~~ | ()
s877507378
p04043
C++
#include<iostream> #include<vector> int main () { vector<int> data_array(cin); if (data_array.size != 3) cout << "NO"; int value5 = 0; int value7 = 0; for (int& element : data_array) { if (element == 5) value5++; if (element == 7) value7++; } if (value5 == 2 and value7 == 1) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'vector' was not declared in this scope 5 | vector<int> data_array(cin); | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/vector:93:13: note: 'std::pmr::vector' 93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ a.cc:5:10: error: expected primary-expression before 'int' 5 | vector<int> data_array(cin); | ^~~ a.cc:6:7: error: 'data_array' was not declared in this scope 6 | if (data_array.size != 3) cout << "NO"; | ^~~~~~~~~~ a.cc:6:29: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if (data_array.size != 3) cout << "NO"; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:23: error: 'data_array' was not declared in this scope 11 | for (int& element : data_array) { | ^~~~~~~~~~ a.cc:16:36: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 16 | if (value5 == 2 and value7 == 1) cout << "YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | else cout << "NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s924673221
p04043
C++
#include <bits/stdc++.h> class kin{ public: inline void open(FILE *,int); inline void close(void); inline void scan(void); inline kin &operator>>(char &); inline kin &operator>>(int &); inline kin &operator>>(long long &); inline kin &operator>>(double &); inline kin &operator>>(long double &); inline kin &operator>>(char *); template <class T> inline void get(T *,int); private: FILE *fp; char *buf; int siz; int idx; }in; class kout{ public: inline void open(FILE *,int); inline void close(void); inline void print(void); inline kout &operator<<(char); inline kout &operator<<(int); inline kout &operator<<(long long); inline kout &operator<<(double); inline kout &operator<<(long double); inline kout &operator<<(const char *); template <class T> inline void put(T *,int,char,char); private: FILE *fp; char *buf; int siz; int idx; }out; int main(int argc,char **argv){ in.open(stdin,512); out.open(stdout,512); in.scan(); int d[3]; in.get(d,3); std::sort(d,d+3); if(d[0]==5&&d[1]==5&&d[2]==7) out<<"YES"; else out<<"NO"; out<<'\n'; out.print(); in.close(); out.close(); return 0; } inline void kin::open(FILE *fpa,int siza){ fp=fpa; buf=new char[siza]; siz=siza; idx=0; return; } inline void kin::close(void){ fp=nullptr; delete[] buf; buf=nullptr; siz=0; idx=0; return; } inline void kin::scan(void){ int readsiz=(int)std::fread((void *)buf,(std::size_t)1,(std::size_t)siz,fp); if(readsiz!=siz) buf[readsiz]='\x00'; idx=0; return; } inline kin &kin::operator>>(char &var){ if(!buf[idx]){ var='\x00'; return *this; } var=buf[idx]; if(++idx==siz) scan(); if(++idx==siz) scan(); return *this; } inline kin &kin::operator>>(int &var){ if(!buf[idx]){ var=0; return *this; } int sign=-1; if(buf[idx]=='-'){ sign=1; if(++idx==siz) scan(); } var=0; while(buf[idx]>='0'){ var=var*10-(int)(buf[idx]-'0'); if(++idx==siz) scan(); } var*=sign; if(++idx==siz) scan(); return *this; } inline kin &kin::operator>>(long long &var){ if(!buf[idx]){ var=0LL; return *this; } long long sign=-1LL; if(buf[idx]=='-'){ sign=1LL; if(++idx==siz) scan(); } var=0LL; while(buf[idx]>='0'){ var=var*10LL-(long long)(buf[idx]-'0'); if(++idx==siz) scan(); } var*=sign; if(++idx==siz) scan(); return *this; } inline kin &kin::operator>>(double &var){ if(!buf[idx]){ var=0.0; return *this; } double sign=-1.0; if(buf[idx]=='-'){ sign=1.0; if(++idx==siz) scan(); } var=0.0; while(buf[idx]>='0'){ var=var*10.0-(double)(buf[idx]-'0'); if(++idx==siz) scan(); } if(buf[idx]=='.'){ if(++idx==siz) scan(); double dig=1.0; while(buf[idx]>='0'){ var-=(double)(buf[idx]-'0')*(dig/=10.0); if(++idx==siz) scan(); } } var*=sign; if(++idx==siz) scan(); return *this; } inline kin &kin::operator>>(long double &var){ if(!buf[idx]){ var=0.0L; return *this; } long double sign=-1.0L; if(buf[idx]=='-'){ sign=1.0L; if(++idx==siz) scan(); } var=0.0L; while(buf[idx]>='0'){ var=var*10.0L-(long double)(buf[idx]-'0'); if(++idx==siz) scan(); } if(buf[idx]=='.'){ if(++idx==siz) scan(); long double dig=1.0L; while(buf[idx]>='0'){ var-=(long double)(buf[idx]-'0')*(dig/=10.0L); if(++idx==siz) scan(); } } var*=sign; if(++idx==siz) scan(); return *this; } inline kin &kin::operator>>(char *var){ if(!buf[idx]){ var[0]='\x00'; return *this; } int ptr=0; while(buf[idx]>='!'){ var[ptr++]=buf[idx]; if(++idx==siz) scan(); } var[ptr]='\x00'; if(++idx==siz) scan(); return *this; } template<class T> inline void kin::get(T *var,int num){ for(int i=0;i<num;++i) (*this)>var[i]; return; } inline void kout::open(FILE *fpa,int siza){ fp=fpa; buf=new char[siza]; siz=siza; idx=0; return; } inline void kout::close(void){ fp=nullptr; delete[] buf; buf=nullptr; siz=0; idx=0; return; } inline void kout::print(void){ std::fwrite((void *)buf,(std::size_t)1,(std::size_t)idx,fp); idx=0; return; } inline kout &kout::operator<<(char val){ buf[idx]=val; if(++idx==siz) print(); return *this; } inline kout &kout::operator<<(int val){ if(val<0){ buf[idx]='-'; if(++idx==siz) print(); } else val*=-1; char dig[10]; int ptr=0; do{ int tmp=val/10; dig[ptr++]=(char)-(val-tmp*10)+'0'; val=tmp; }while(val); while(ptr--){ buf[idx]=dig[ptr]; if(++idx==siz) print(); } return *this; } inline kout &kout::operator<<(long long val){ if(val<0LL){ buf[idx]='-'; if(++idx==siz) print(); } else val*=-1LL; char dig[19]; int ptr=0; do{ long long tmp=val/10LL; dig[ptr++]=(char)-(val-tmp*10LL)+'0'; val=tmp; }while(val); while(ptr--){ buf[idx]=dig[ptr]; if(++idx==siz) print(); } return *this; } inline kout &kout::operator<<(double val){ if(val<0.0){ buf[idx]='-'; if(++idx==siz) print(); } else val*=-1.0; double dig=1.0; while(val/dig<=-10.0) dig*=10.0; int tmp; while(dig>=1.0){ buf[idx]=(char)-(tmp=(int)(val/dig))+'0'; if(++idx==siz) print(); val-=(double)tmp*dig; dig/=10.0; } buf[idx]='.'; if(++idx==siz) print(); for(int i=0;i<12;++i){ buf[idx]=(char)-(tmp=(int)(val/dig))+'0'; if(++idx==siz) print(); val-=(double)tmp*dig; dig/=10.0; } return *this; } inline kout &kout::operator<<(long double val){ if(val<0.0L){ buf[idx]='-'; if(++idx==siz) print(); } else val*=-1.0L; long double dig=1.0L; while(val/dig<=-10.0L) dig*=10.0L; int tmp; while(dig>=1.0L){ buf[idx]=(char)-(tmp=(int)(val/dig))+'0'; if(++idx==siz) print(); val-=(long double)tmp*dig; dig/=10.0L; } buf[idx]='.'; if(++idx==siz) print(); for(int i=0;i<16;++i){ buf[idx]=(char)-(tmp=(int)(val/dig))+'0'; if(++idx==siz) print(); val-=(long double)tmp*dig; dig/=10.0L; } return *this; } inline kout &kout::operator<<(const char *val){ for(int i=0;val[i];++i){ buf[idx]=val[i]; if(++idx==siz) print(); } return *this; } template<class T> inline void kout::put(T *val,int num,char spc,char end){ --num; for(int i=0;i<num;++i) (*this)<val[i]<spc; (*this)<val[num]<end; return; }
a.cc: In instantiation of 'void kin::get(T*, int) [with T = int]': a.cc:47:8: required from here 47 | in.get(d,3); | ~~~~~~^~~~~ a.cc:197:39: error: no match for 'operator>' (operand types are 'kin' and 'int') 197 | for(int i=0;i<num;++i) (*this)>var[i]; | ~~~~~~~^~~~~
s709548513
p04043
C
#include <stdio.h> #include <stdlib.h> int main(int argc. char *argv[]) { int n1, n2, n3; scanf("%d %d %d", &n1, &n2, &n3); if (n1*n2*n3 == 5*7*5) printf("YES\n"); else printf("NO\n"); }
main.c:5:14: error: expected ';', ',' or ')' before '.' token 5 | main(int argc. char *argv[]) | ^
s623090693
p04043
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt(); if((a-5)*(b-5)*(c-7) == 0 || (a-5)*(b-7)*(c-5) == 0 || (a-7)*(b-5)*(c-5) == 0) { System.out.print("YES"); }else{ System.out.print("NO"); } sc.close(); } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s829298725
p04043
Java
import java.util.*; public class ABC042A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N, count5, count7; count5 = count7 = 0; for (int i = 0; i < 3; i++) { N = sc.nextInt(); if (N == 5) { ++count5; }else if (N == 7){ ++count7; } } if(count5 == 2 && count7 == 1) { System.out.print("YES"); }else{ System.out.print("NO"); } sc.close(); } }
Main.java:3: error: class ABC042A is public, should be declared in a file named ABC042A.java public class ABC042A { ^ 1 error
s121002324
p04043
Java
import java.util.Scanner; public class ABC_042 { public static void main(String[] args) { //整数を三つ受けとる int number1 = 0; int number2 = 0; int number3 = 0; // String anser = "NO"; Scanner scan = new Scanner(System.in); number1 = scan.nextInt(); number2 = scan.nextInt(); number3 = scan.nextInt(); //処理開始 if(checkFiveOrSeven(number1)) { if(checkFiveOrSeven(number2)) { if(checkFiveOrSeven(number3)) { if(number1 + number2 + number3 == 17) { anser = "YES"; } } } } System.out.println(anser); } private static boolean checkFiveOrSeven(int number) { if(number ==5 || number == 7) { return true; } return false; } }
Main.java:3: error: class ABC_042 is public, should be declared in a file named ABC_042.java public class ABC_042 { ^ 1 error
s752535178
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a[3]; for(int i=0;i<3;++i){ cin >> a[i]; } int cnt=3; int p=2; int q=1; for(int i=0;i<3;++i{ if(a[i]==5 && p!=0) { --cnt; --p; } if(a[i]==7 && q!=0) { --cnt; --q; } } if(cnt==0) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:12:28: error: expected ')' before '{' token 12 | for(int i=0;i<3;++i{ | ~ ^ | )
s009840938
p04043
Java
import java.util.Scanner; public class MySample { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int sum = 0; if(a == 5 || a == 7) { sum += a; } if(b == 5 || b == 7) { sum += b; } if(c == 5 || c == 7) { sum += c; } if(sum == 17) { System.out.print("YES"); } else { System.out.print("NO"); } scan.close(); } }
Main.java:3: error: class MySample is public, should be declared in a file named MySample.java public class MySample { ^ 1 error
s116680257
p04043
Java
import java.util.Scanner; public class AtCoder { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); String[] strContena = str.split(" "); int sum = 0; if(strContena[0] == "5" || strContena[0] == "7") { sum += Integer.parseInt(strContena[0]); } if(strContena[1] == "5" || strContena[1] == "7") { sum += Integer.parseInt(strContena[1]); } if(strContena[2] == "5" || strContena[2] == "7") { sum += Integer.parseInt(strContena[2]); } if(sum == 17) { System.out.print("Yes"); }else { System.out.print("No"); } } }
Main.java:3: error: class AtCoder is public, should be declared in a file named AtCoder.java public class AtCoder { ^ 1 error
s900911397
p04043
C++
#include <iostream> #include <stdio.h> int main() { int a; int seven, five; seven = five = 0; for ( int i = 0; i < 3; ++i ) { cin >> a; if ( a == 7 ) ++seven; if ( a == 5 ) ++five; } if ( seven == 2 && five == 1 ) cout << "Yes\n"; else "No\n"; }
a.cc: In function 'int main()': a.cc:12:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 12 | cin >> a; | ^~~ | 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:17:34: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | if ( seven == 2 && five == 1 ) cout << "Yes\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s325234640
p04043
Java
import java.util.Arrays; import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int[] abc = new int[3]; int five =0; int seven = 0; String ans = "NO"; for(int i=0;i<3;i++){ int abc[i] = sc.nextInt(); if(abc[i]==5){ five++; }else if(abc[i]==7){ seven++; } } if(five==2&&seven==1){ ans = "YES"; } System.out.println(ans); } }
Main.java:11: error: ']' expected int abc[i] = sc.nextInt(); ^ Main.java:11: error: ';' expected int abc[i] = sc.nextInt(); ^ 2 errors
s582722779
p04043
Java
import java.util.Scanner; public class Iroha{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[3]; for(int i=0; i<3; i++){ a[i] = sc.nextInt(); } String yon = "NO"; if(a[0] == 5){ if(a[1] == 5){ if(a[2] == 7){ yon = "YES"; } }else if(a[1] == 7){ if(a[2] == 5){ yon = "NO"; } } }else if(a[0] == 7){ if(a[1] == 5){ if(a[2] == 5){ yon = "YES"; } } } System.out.println(yon); } }
Main.java:3: error: class Iroha is public, should be declared in a file named Iroha.java public class Iroha{ ^ 1 error
s064329716
p04043
Java
import java.util.Scanner; public class Iroha{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[3]; for(int i=0; i<3; i++){ a[i] = sc.nextInt(); } String yon = "NO"; if(a[0] == 5){ if(a[1] == 5){ if(a[2] == 7){ yon = "YES"; } }else if(a[1] == 7){ if(a[3] == 5){ yon = "NO"; } } }else if(a[0] == 7){ if(a[1] == 5){ if(a[2] == 5){ yon = "YES"; } } } System.out.println(yon); } }
Main.java:3: error: class Iroha is public, should be declared in a file named Iroha.java public class Iroha{ ^ 1 error
s730378197
p04043
C
#incude<stdio.h> it main(void){ int a[3]; scanf("%d %d %d",a[0],a[1],a[2]); int i; int count5=0,count7=0; for(i=0;i<3;i++){ if(a[i]!=5||a[i]!=7){ printf("NO"); break; } else if(a[i]==5){ count5++; } else if(a[i]==7){ count7++; } } if(count5==2&&count7==1){ printf("YES"); } return 0; }
main.c:1:2: error: invalid preprocessing directive #incude; did you mean #include? 1 | #incude<stdio.h> | ^~~~~~ | include main.c:2:1: error: unknown type name 'it'; did you mean 'int'? 2 | it main(void){ | ^~ | int main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d %d %d",a[0],a[1],a[2]); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #incude<stdio.h> main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d %d %d",a[0],a[1],a[2]); | ^~~~~ main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:9:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 9 | printf("NO"); | ^~~~~~ main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:9:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:20:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 20 | printf("YES"); | ^~~~~~ main.c:20:5: note: include '<stdio.h>' or provide a declaration of 'printf'
s147085807
p04043
C++
#include <bits/stdc++> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a+b+c==17 && a*b*c == 175) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s237575965
p04043
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (int)n; ++i) #define INF 100000000 int main() { vector<int> q; rep(i,3) cin >> q.push_back(); sort(q.begin(), q.end()); rep(i,3){ if(i < 2 && q.at(i) != 5){ cout << "NO" << endl; return 0; } else if (i == 2 && q.at(i) != 7){ cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:30: error: no matching function for call to 'std::__debug::vector<int>::push_back()' 11 | rep(i,3) cin >> q.push_back(); | ~~~~~~~~~~~^~ In file included from /usr/include/c++/14/vector:76, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:2: /usr/include/c++/14/debug/vector:583:9: note: candidate: 'template<class _Up> typename __gnu_cxx::__enable_if<(! std::__are_same<_Up, bool>::__value), void>::__type std::__debug::vector<_Tp, _Allocator>::push_back(_Tp&&) [with _Tp = int; _Allocator = std::allocator<int>]' 583 | push_back(_Tp&& __x) | ^~~~~~~~~ /usr/include/c++/14/debug/vector:583:9: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/debug/vector:566:7: note: candidate: 'void std::__debug::vector<_Tp, _Allocator>::push_back(const _Tp&) [with _Tp = int; _Allocator = std::allocator<int>]' 566 | push_back(const _Tp& __x) | ^~~~~~~~~ /usr/include/c++/14/debug/vector:566:7: note: candidate expects 1 argument, 0 provided
s654839682
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a,a+3) if(a[0]==5 && a[1]==5 && a[2]==7) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: expected ';' before 'if' 7 | sort(a,a+3) | ^ | ; 8 | if(a[0]==5 && a[1]==5 && a[2]==7) | ~~ a.cc:10:2: error: 'else' without a previous 'if' 10 | else | ^~~~
s303526276
p04043
C++
//大文字->小文字 tolower(),逆はtoupper() //int a = stoi(c); 文字列をintへ //途中の出力をそのまま残さない //数値計算 基本はdouble //map<キー,値> p は辞書。p[キー] = 値 #include <bits/stdc++.h> #define ALL(a) (a).begin(),(a).end() #define ll long long int using namespace std; // Nの桁数 ll dig(ll N) { ll dig = 0; while (N) { dig++; N /= 10; } return dig; } // x,yの最大公約数 ll gcd(ll x, ll y) { ll r; while (x%y) { r = x % y; x = y; y = r; } return y; } // int main() { vector<int> a[3]; cin >> a[0] >> a[1] >> a[2]; sort(ALL(a)); if (a[0] == 5 && a[1] == 5 && a[2] == 7)cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:34:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 34 | cin >> a[0] >> a[1] >> a[2]; | ~~~ ^~ ~~~~ | | | | | std::vector<int> | std::istream {aka std::basic_istream<char>} In file included 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, from a.cc:6: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/x86_64-linux-gn
s890707453
p04043
C
#include<stdio.h> int main(void) { int A,B,C; g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello puts("整数を入力してください。"); printf("a:\n"); scanf("%d",&A); printf("b:\n"); scanf("%d",&B); printf("c:\n"); scanf("%d",&C); if(A+B+C==17) puts("YES"); else puts("NO"); return 0; }
main.c: In function 'main': main.c:5:3: error: 'g' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^ main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in main.c:5:8: error: 'O2' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~ main.c:5:12: error: 'Wall' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~~~ main.c:5:18: error: 'Wno' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~~ main.c:5:22: error: 'unused' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~~~~~ main.c:5:29: error: 'result' undeclared (first use in this function) 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~~~~~ main.c:5:35: error: expected ';' before 'hello' 5 | g++ -O2 -Wall -Wno-unused-result hello.cpp -o hello | ^~~~~~ | ;
s435779416
p04043
C
int main(void) { int A,B,C; puts("整数を入力してください。"); printf("a:\n"); scanf("%d",&A); printf("b:\n"); scanf("%d",&B); printf("c:\n"); scanf("%d",&C); if(A+B+C==17) puts("YES"); else puts("NO"); return 0; } #include<stdio.h> int main(void) { int A,B,C; puts("整数を入力してください。"); printf("a:\n"); scanf("%d",&A); printf("b:\n"); scanf("%d",&B); printf("c:\n"); scanf("%d",&C); if(A+B+C==17) puts("YES"); else puts("NO"); return 0; }
main.c: In function 'main': main.c:6:3: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 6 | puts("整数を入力してください。"); | ^~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts' +++ |+#include <stdio.h> 1 | main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 7 | printf("a:\n"); scanf("%d",&A); | ^~~~~~ main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:7:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 7 | printf("a:\n"); scanf("%d",&A); | ^~~~~ main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:7:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c: At top level: main.c:20:5: error: redefinition of 'main' 20 | int main(void) | ^~~~ main.c:2:5: note: previous definition of 'main' with type 'int(void)' 2 | int main(void) | ^~~~