submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s882528103
p03773
Java
23 2
Main.java:1: error: class, interface, enum, or record expected 23 2 ^ 1 error
s835373219
p03773
C++
Powers of two
a.cc:1:1: error: 'Powers' does not name a type 1 | Powers of two | ^~~~~~
s751198652
p03773
C++
#include<bits/stdc++.h> using namespace std; int main(){ cin>>a>>b; cout<<(a+b)%24; return 0; }
a.cc: In function 'int main()': a.cc:4:14: error: 'a' was not declared in this scope 4 | cin>>a>>b; | ^ a.cc:4:17: error: 'b' was not declared in this scope 4 | cin>>a>>b; | ^
s731157308
p03773
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B, x = A + B; cin >> A >> B; if(x <= 24) { cout << x << endl; } else { cout << x - 24 << ensl; } }
a.cc: In function 'int main()': a.cc:12:23: error: 'ensl' was not declared in this scope 12 | cout << x - 24 << ensl; | ^~~~
s453410672
p03773
C++
#inculude<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >>a>>b; if (a+b>=24){ cout << a+b-24 <<endl; } else{ cout << a+b <<endl; } }
a.cc:1:2: error: invalid preprocessing directive #inculude; did you mean #include? 1 | #inculude<bits/stdc++.h> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >>a>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inculude<bits/stdc++.h> a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << a+b-24 <<endl; | ^~~~ a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:22: error: 'endl' was not declared in this scope 7 | cout << a+b-24 <<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #inculude<bits/stdc++.h> a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout << a+b <<endl; | ^~~~ a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:19: error: 'endl' was not declared in this scope 10 | cout << a+b <<endl; | ^~~~ a.cc:10:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s799050917
p03773
C++
A, B = map(int, input().split()) print((A + B) % 24)
a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s784463315
p03773
C++
A, B = map(int, input().split()) print((A + B) % 24)
a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s955197618
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; cout << (A + B) / 24 < endl; return 0; }
a.cc: In function 'int main()': a.cc:6:24: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | cout << (A + B) / 24 < endl; | ~~~~~~~~~~~~~~~~~~~~~^~~~~~ 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:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:6:26: note: couldn't deduce template parameter '_Bi_iter' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:6:26: note: couldn't deduce template parameter '_Bi_iter' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << (A + B) / 24 < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 6 | cout << (A + B) / 24 < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << (A + B) / 24 < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:6:26: note: couldn't deduce template parameter '_CharT' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:6:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout << (A + B) / 24 < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(
s516930589
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; cout << A + B < endl; return 0; }
a.cc: In function 'int main()': a.cc:6:17: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | cout << A + B < endl; | ~~~~~~~~~~~~~~^~~~~~ 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:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:6:19: note: couldn't deduce template parameter '_Bi_iter' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:6:19: note: couldn't deduce template parameter '_Bi_iter' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 6 | cout << A + B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 6 | cout << A + B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << A + B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:6:19: note: couldn't deduce template parameter '_CharT' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout << A + B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template arg
s305693034
p03773
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <climits> #include <bitset> using namespace std; typedef long double ld; typedef long long int ll; typedef unsigned long long int ull; typedef vector<int> vi; typedef vector<char> vc; typedef vector<string> vs; typedef vector<pair<int,int>> vpii; typedef vector<vector<int>> vvi; typedef vector<vector<char>> vvc; typedef vector<vector<string>> vvs; #define rep(i,n) for(int i=0;i<n;i++) #define fin(ans) cout<<(ans)<<endl #define P 1000000007 #define STI(s) atoi(s.c_str())//string to int #define mp(p,q) make_pair(p,q) #define Sort(a) sort(a.begin(),a.end()) template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} const int INF = INT_MAX; const long long LLINF = 1LL<<60; //g++ -std=c++1z temp.cpp //./a.exe int main(void){ios::sync_with_stdio(false);cin.tie(0); ////////////////////////////////////////////////////// int a,b; cin >> a >> b; if ((a+b)<24) { cout << a+b << endl; }else { cout << a+b-24 endl;; } ////////////////////////////////////////////////////// return 0;}
a.cc: In function 'int main()': a.cc:49:17: error: expected ';' before 'endl' 49 | cout << a+b-24 endl;; | ^~~~~ | ;
s357221713
p03773
C++
#include<iostream> using namespace std; int main(){ int a,b;cin>>a>>b; if(a+b>=24)cout24-a-b; else cout<<a+b; }
a.cc: In function 'int main()': a.cc:5:14: error: 'cout24' was not declared in this scope 5 | if(a+b>=24)cout24-a-b; | ^~~~~~
s868370569
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin << A << B; if(A+B>=24){ cout >> A+B-24 >> endl; }else{ cout >> A+B >> endl; } }
a.cc: In function 'int main()': a.cc:5:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | cin << A << B; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:7: note: candidate: 'operator<<(int, int)' (built-in) 5 | cin << A << B; | ~~~~^~~~ a.cc:5: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/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:5:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | cin << A << B; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:5:10: required from here 5 | cin << A << B; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ a.cc:7:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 7 | cout >> A+B-24 >> endl; | ~~~~ ^~ ~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:7:10: note: candidate: 'operator>>(int, int)' (built-in) 7 | cout >> A+B-24 >> endl; | ~~~~~^~~~~~~~~ a.cc:7:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55: /usr/include/c++/14/bits/basic_string.tcc:835
s069405505
p03773
C++
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Linq; namespace AtCoder { class Program { static void Main() { var A = ReadIntArray(); if (A[0] + A[1] <= 24) { Console.WriteLine(A[0] + A[1]); } else { Console.WriteLine(A[0] + A[1] - 24); } } //ここからテンプレート //1行に1入力 private static string ReadString() { return Console.ReadLine(); } private static int ReadInt() { return int.Parse(ReadString()); } private static long ReadLong() { return long.Parse(ReadString()); } private static double ReadDouble() { return double.Parse(ReadString()); } //1行に複数入力(配列で取得) private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); } private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); } private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); } private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collections.Generic; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Linq; | ^~~~~~ a.cc:30:16: error: expected ':' before 'static' 30 | private static string ReadString() { return Console.ReadLine(); } | ^~~~~~~ | : a.cc:30:24: error: 'string' does not name a type 30 | private static string ReadString() { return Console.ReadLine(); } | ^~~~~~ a.cc:31:16: error: expected ':' before 'static' 31 | private static int ReadInt() { return int.Parse(ReadString()); } | ^~~~~~~ | : a.cc:32:16: error: expected ':' before 'static' 32 | private static long ReadLong() { return long.Parse(ReadString()); } | ^~~~~~~ | : a.cc:33:16: error: expected ':' before 'static' 33 | private static double ReadDouble() { return double.Parse(ReadString()); } | ^~~~~~~ | : a.cc:35:16: error: expected ':' before 'static' 35 | private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); } | ^~~~~~~ | : a.cc:35:24: error: 'string' does not name a type 35 | private static string[] ReadStringArray() { return ReadString().Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries); } | ^~~~~~ a.cc:36:16: error: expected ':' before 'static' 36 | private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); } | ^~~~~~~ | : a.cc:36:27: error: expected unqualified-id before '[' token 36 | private static int[] ReadIntArray() { return ReadStringArray().Select(int.Parse).ToArray(); } | ^ a.cc:37:16: error: expected ':' before 'static' 37 | private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); } | ^~~~~~~ | : a.cc:37:28: error: expected unqualified-id before '[' token 37 | private static long[] ReadLongArray() { return ReadStringArray().Select(long.Parse).ToArray(); } | ^ a.cc:38:16: error: expected ':' before 'static' 38 | private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); } | ^~~~~~~ | : a.cc:38:30: error: expected unqualified-id before '[' token 38 | private static double[] ReadDoubleArray() { return ReadStringArray().Select(double.Parse).ToArray(); } | ^ a.cc:39:6: error: expected ';' after class definition 39 | } | ^ | ; a.cc: In static member function 'static void AtCoder::Program::Main()': a.cc:13:13: error: 'var' was not declared in this scope 13 | var A = ReadIntArray(); | ^~~ a.cc:14:17: error: 'A' was not declared in this scope 14 | if (A[0] + A[1] <= 24) | ^ a.cc:16:17: error: 'Console' was not declared in this scope 16 | Console.WriteLine(A[0] + A[1]); | ^~~~~~~ a.cc:20:17: error: 'Console' was not declared in this scope 20 | Console.WriteLine(A[0] + A[1] - 24); | ^~~~~~~ a.cc: In static member function 'static int AtCoder::Program::ReadInt()': a.cc:31:47: error: expected primary-expression before 'int' 31 | private static int ReadInt() { return int.Parse(ReadString()); } | ^~~ a.cc:31:47: error: expected ';' before 'int' a.cc:31:50: error: expected unqualified-id before '.' token 31 | private static int ReadInt() { return int.Parse(ReadString()); } | ^ a.cc: In static member function 'static long int AtCoder::Program::ReadLong()': a.cc:32:49: error: expected primary-expression before 'long' 32 | private static long ReadLong() { return long.Parse(ReadString()); } | ^~~~ a.cc:32:49: error: expected ';' before 'long' a.cc:32:53: error: expected unqualified-id before '.' token 32 | private static long ReadLong() { return long.Parse(ReadString()); } | ^ a.cc: In static member function 'static double AtCoder::Program::ReadDouble()': a.cc:33:53: error: expected primary-expression before 'double' 33 | private static double ReadDouble() { return double.Parse(ReadString()); } | ^~~~~~ a.cc:33:53: error: expected ';' before 'double' a.cc:33:59: error: expected unqualified-id before '.' token 33 | private static double ReadDouble() { return double.Parse(ReadString()); } | ^
s008630968
p03773
C++
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int start = a+b; if(start > 24){ start -= 24; } System.out.println(start); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s719813460
p03773
C++
include<iostream> using namespace std; int a, b; int main(){ cin >> a >> b; if(a + b >= 24) cout << a + b - 24 << endl; else cout << a + b << 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:5:3: error: 'cin' was not declared in this scope 5 | cin >> a >> b; | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << a + b - 24 << endl; | ^~~~ a.cc:7:27: error: 'endl' was not declared in this scope 7 | cout << a + b - 24 << endl; | ^~~~ a.cc:9:5: error: 'cout' was not declared in this scope 9 | cout << a + b << endl; | ^~~~ a.cc:9:22: error: 'endl' was not declared in this scope 9 | cout << a + b << endl; | ^~~~
s577244927
p03773
C++
m_os << std::chrono::duration_cast<Duration>((m_end - m_begin)).count() << duration_name_v<Duration> << '\n';
a.cc:1:1: error: 'm_os' does not name a type 1 | m_os << std::chrono::duration_cast<Duration>((m_end - m_begin)).count() << duration_name_v<Duration> << '\n'; | ^~~~
s441041339
p03773
C++
#include<uostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b>=24?a+b-24:a+b)<<endl; return 0; }
a.cc:1:9: fatal error: uostream: No such file or directory 1 | #include<uostream> | ^~~~~~~~~~ compilation terminated.
s523797946
p03773
C++
#include <iostream> #include <vector> int main(void){ int a,b; std::cin >> a >> b; std:::cout << a+b%24; return 0; }
a.cc: In function 'int main()': a.cc:7:10: error: expected unqualified-id before ':' token 7 | std:::cout << a+b%24; | ^
s874793134
p03773
C++
#include<bits/stdc++.h> using namesoace std; int main(){ int A,B; cin >> A >> B; if(A+B<24) cout << A+B << endl; else cout << (A+B)%24 << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'namesoace' 2 | using namesoace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> A >> B; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << A+B << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << A+B << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << (A+B)%24 << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << (A+B)%24 << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s674516343
p03773
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int A,B; cin>>A>>B; time=A+B; if(time<=24) time-=24; cout<<<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: assignment of function 'time_t time(time_t*)' 7 | time=A+B; | ~~~~^~~~ a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(time<=24) | ~~~~^~~~ a.cc:9:13: warning: pointer to a function used in arithmetic [-Wpointer-arith] 9 | time-=24; | ~~~~^~~~ a.cc:9:13: error: assignment of read-only location 'time' a.cc:10:11: error: expected primary-expression before '<<' token 10 | cout<<<<endl; | ^~
s388373027
p03773
C++
//template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } //long longのシフト演算には気をつけよう int main(){ int a, b; cin >> a >> b; cout << (a+b)%24 << endl; }
a.cc: In function 'int main()': a.cc:6:15: error: 'cin' was not declared in this scope 6 | int a, b; cin >> a >> b; | ^~~ a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout << (a+b)%24 << endl; | ^~~~ a.cc:8:25: error: 'endl' was not declared in this scope 8 | cout << (a+b)%24 << endl; | ^~~~
s840120994
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; int ans == (A + B) % 24; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:11: error: expected initializer before '==' token 9 | int ans == (A + B) % 24; | ^~ a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | cout << ans << endl; | ^~~ | abs
s256423007
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b; cin >> a >> b; if(a+b < 24){ cout << a+b << endl; } else{ cout << a+b-24 << endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator<' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 7 | if(a+b < 24){ | ~~~ ^ ~~ | | | | | int | std::__cxx11::basic_string<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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b < 24){ | ^~ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if(a+b < 24){ | ^~ /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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b < 24){ | ^~ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if(a+b < 24){ | ^~ /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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b < 24){ | ^~ /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:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 7 | if(a+b < 24){ | ^~ /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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b < 24){ | ^~ 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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | if(a+b < 24){ | ^~ 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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(a+b < 24){ | ^~ 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:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 7 | if(a+b < 24){ | ^~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const _CharT*' and 'int' 7 | if(a+b < 24){ |
s560445925
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)%24<<endl; } }
a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s436786497
p03773
C++
1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s190305679
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *(argv[]) { int a,b; cin >> a >> b; cout << (a + b) % 24 << endl; return 0; }
a.cc:4:40: error: expected ')' before '{' token 4 | int main(int argc, char const *(argv[]) | ~ ^ | ) 5 | { | ~
s018194459
p03773
C++
062C #include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <map> #include <math.h> #include <deque> using ll = long long; using namespace std; int main(){ int a, b; cin >> a >> b; cout << (a+b)%24 << endl; return 0; }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 062C | ^~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:3: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX
s051558076
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a, b; if ((a + B) < 24) { cout << a + b << endl; } else { cout << (a + b) - 24 << endl; } }
a.cc: In function 'int main()': a.cc:7:12: error: 'B' was not declared in this scope 7 | if ((a + B) < 24) { | ^
s090666395
p03773
C
#include <stdio.h> int main(void){ int A,B,c; scanf("%d %d",&a,&b); c=a+b; if(a+b>24){c=a+b-24;} printf("%d",c); return 0; }
main.c: In function 'main': main.c:4:18: error: 'a' undeclared (first use in this function) 4 | scanf("%d %d",&a,&b); | ^ main.c:4:18: note: each undeclared identifier is reported only once for each function it appears in main.c:4:21: error: 'b' undeclared (first use in this function) 4 | scanf("%d %d",&a,&b); | ^
s101284309
p03773
C++
using ll=long long; using R=double; // Combination Table ll C[51][51]; // C[n][k] -> nCk void comb_table(int N){ for(int i=0;i<N+1;++i){ for(int j=0;j<=i;++j){ if(j==0||j==i){ C[i][j]=1; } else{ C[i][j]=C[i-1][j-1]+C[i-1][j]; } } } } int main(void){ int N,A,B; cin>> N>>A>>B; const int NMAX=50; ll v[NMAX]; for(int i=0;i<N;++i){ cin >> v[i]; } comb_table(N); sort(v,v+N); reverse(v,v+N); R max_average=0.0; for(int i=0;i<A;++i){ max_average+=v[i]; } max_average/=A; int a_th_val_num=0,a_th_val_pos=0; for(int i=0;i<N;++i){ if(v[i]==v[A-1]){ a_th_val_num++; if(i<A){ a_th_val_pos++; } } } ll cnt=0LL; if(a_th_val_pos==A){ for(a_th_val_pos=A;a_th_val_pos<=B;++a_th_val_pos){ cnt+=C[a_th_val_num][a_th_val_pos]; } }else{ cnt+=C[a_th_val_num][a_th_val_pos]; } cout.precision(20); cout << fixed << max_average << endl; cout << cnt << endl; return 0; }
a.cc: In function 'int main()': a.cc:21:1: error: 'cin' was not declared in this scope 21 | cin>> N>>A>>B; | ^~~ a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'? 28 | sort(v,v+N); | ^~~~ | short a.cc:29:5: error: 'reverse' was not declared in this scope 29 | reverse(v,v+N); | ^~~~~~~ a.cc:50:5: error: 'cout' was not declared in this scope 50 | cout.precision(20); | ^~~~ a.cc:51:13: error: 'fixed' was not declared in this scope 51 | cout << fixed << max_average << endl; | ^~~~~ a.cc:51:37: error: 'endl' was not declared in this scope 51 | cout << fixed << max_average << endl; | ^~~~
s926182281
p03773
C++
#include <iostrean> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)%24; }
a.cc:1:10: fatal error: iostrean: No such file or directory 1 | #include <iostrean> | ^~~~~~~~~~ compilation terminated.
s449154475
p03773
C
main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int] main.c:1:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} main.c:1:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ^~~~~ main.c:1:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:31: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ^~~~ main.c:1:31: note: include '<stdio.h>' or provide a declaration of 'puts' main.c:1:42: error: expected ')' before ':' token 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ~ ^ | ) main.c:1:39: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion] 1 | main(a,b){scanf("%d%d",&a,&b);puts(a+b<24:a+b:24-a-b);} | ~~~^~~ | | | int main.c:1:39: note: expected 'const char *' but argument is of type 'int'
s186063729
p03773
C
#include <stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); printf("%d", (a + b) % 24) }
main.c: In function 'main': main.c:7:35: error: expected ';' before '}' token 7 | printf("%d", (a + b) % 24) | ^ | ; 8 | } | ~
s797829466
p03773
C
#include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a+b)%24);return 0;}
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a+b)%24);return 0;} | ^~~ /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
s308693518
p03773
C++
#include <iostream> int main(){ int a,b; cin>>a>>b; if(a+b<24)cout<<a+b; else cout<<a+b-24; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(a+b<24)cout<<a+b; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | else cout<<a+b-24; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s037936781
p03773
C++
#include <iostream> using namespace std; int main() { int A, B, res; cin >> A >> B; res = A+B if (res >= 24) cout << res - 24; else cout << res; return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: expected ';' before 'if' 8 | res = A+B | ^ | ; 9 | if (res >= 24) cout << res - 24; | ~~ a.cc:10:3: error: 'else' without a previous 'if' 10 | else cout << res; | ^~~~
s221434837
p03773
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b)%24<<endl;} }
a.cc:8:1: error: expected declaration before '}' token 8 | } | ^
s389645785
p03773
C++
#include <iostream> #include <string> #include <vector> #include <map> #include <algorithm> #include <numeric> #include <functional> #include <cmath> int main(){ int a, b; std::cin>>a>>b; int res; if(a + b < 24){ res = a + b; }else(a + b <= 48){ res = a + b - 24; } std::cout<<res<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:17:23: error: expected ';' before '{' token 17 | }else(a + b <= 48){ | ^ | ;
s096157073
p03773
C++
int main(){ int a,b,t; scanf("%a %b",&a,&b); t = a + b; if(t>=24){ t = t-24; printf("%d\n",t); } else{ printf("%d\n",t); } return 0; }
a.cc: In function 'int main()': a.cc:3:9: error: 'scanf' was not declared in this scope 3 | scanf("%a %b",&a,&b); | ^~~~~ a.cc:7:17: error: 'printf' was not declared in this scope 7 | printf("%d\n",t); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main(){ a.cc:10:25: error: 'printf' was not declared in this scope 10 | printf("%d\n",t); | ^~~~~~ a.cc:10:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
s672879358
p03773
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >>a>>b; cout << (a+b)%24 << endl;
a.cc: In function 'int main()': a.cc:7:28: error: expected '}' at end of input 7 | cout << (a+b)%24 << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s468978052
p03773
C++
#include <stdio.h> #include <stdlib.h> void main() { int A, B,c,d,e; scanf("%d%d", &A, &B); c = A + B; d = c - 24; e = 0; if (c <24) { printf("%d\n", c); } else { if (c == 48) { printf("%d\n",e); } else printf("%d\n", d); } system("pause"); }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~
s856806589
p03773
C
include<stdio.h> int main(void) { int start; int now; int remain; scanf("%d%d", &now, &remain); start = now + remain; if (start >= 24) { start = start-24; } printf("%d", start); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s185241158
p03773
C
include<stdio.h> int main(void) { int start; int now; int remain; scanf("%d%d", &now, &remain); start = now + remain; if (start>=24) { start = start-24; } printf("%d", start); return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s216485947
p03773
C
include <stdio.h> int main(){ int a,b; scanf("%d%d",&a,&b); printf("%d",(a+b)%24+24*(a+b==24)); }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s327774653
p03773
C
main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int] main.c:1:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} main.c:1:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ^~~~~ main.c:1:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:31: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ^~~~~~ main.c:1:31: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:31: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:31: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:59: error: expected ')' before ';' token 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ~ ^ | ) main.c:1:60: error: expected ';' before '}' token 1 | main(a,b){scanf("%d%d",&a,&b);printf("%d",a+b+24*(a+b==24);} | ^ | ;
s078106771
p03773
C
#include<stdio.h>> int main(){ int A, B, C; scanf("%d %d", &A, &B); C = A + B; if(C >= 0 && C <= 23){ printf("%d", C); } else if(C >= 0 && C >= 23){ C = C - 24; printf("%d", C); } return 0;
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>> | ^ main.c: In function 'main': main.c:19:5: error: expected declaration or statement at end of input 19 | return 0; | ^~~~~~
s357611233
p03773
C++
#include<stdio.h>> int main(){ int A, B, C; scanf("%d %d", &A, &B); C = A + B; if(C >= 0 && C <= 23){ printf("%d", C); } else if(C >= 0 && C >= 23){ C = C - 24; printf("%d", C); } return 0;
a.cc:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>> | ^ a.cc: In function 'int main()': a.cc:19:14: error: expected '}' at end of input 19 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s979038511
p03773
C
include<stdio.h>> int main(){ int A, B, C; scanf("%d %d", &A, &B); C = A + B; if(C >= 0 && C <= 23){ printf("%d", C); } else if(C >= 0 && C >= 23){ C = C - 24; printf("%d", C); } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h>> | ^
s615753729
p03773
C++
#include<bits/stdc++.h> using namespace std; int main() { int n,i,j,k,x,y,ans=0,curr; scanf("%d %d",&n,&k); int ans = n+k; if(ans > 24) printf("%d\n",ans-24); else printf("%d\n",ans); return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: redeclaration of 'int ans' 7 | int ans = n+k; | ^~~ a.cc:5:21: note: 'int ans' previously declared here 5 | int n,i,j,k,x,y,ans=0,curr; | ^~~
s890530198
p03773
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = SC.nextInt(); int b = sc.nextInt(); int ans = a+b; if(ans>=24) ans -= 24; System.out.println(ans); } }
Main.java:6: error: cannot find symbol int a = SC.nextInt(); ^ symbol: variable SC location: class Main 1 error
s409797803
p03773
C++
print sum(map(int, raw_input().split())) % 24
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'? 1 | print sum(map(int, raw_input().split())) % 24 | ^~~~~ | int
s775949846
p03773
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int n,m; int sum; scanf("%d%d",&n,&m); sum=m+n; sum%=24; printf("%d ",sum); } }
a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s220454488
p03773
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b<24) { cout<<a+b; } else { cout<<a+b-24 } return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: expected ';' before '}' token 13 | cout<<a+b-24 | ^ | ; 14 | } | ~
s783906647
p03773
C++
#include <iostream> int main(){ int a,b; cin >> a >> b; if(a+b >= 24) cout << a+b-24 << endl; else cout << a+b << endl; }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> a >> b; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(a+b >= 24) cout << a+b-24 << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if(a+b >= 24) cout << a+b-24 << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | else cout << a+b << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | else cout << a+b << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s311995300
p03773
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A >> B; while(A+B>=24){ A+B -= 24; } cout << A+B << endl; }
a.cc: In function 'int main()': a.cc:8:6: error: lvalue required as left operand of assignment 8 | A+B -= 24; | ~^~
s298657795
p03773
C++
#include <iostream> using namespace std; int main(){ int A,B; cin >> A >> B; while(A+B>=24){ A+B -= 24; } cout << A+B << endl; }
a.cc: In function 'int main()': a.cc:8:6: error: lvalue required as left operand of assignment 8 | A+B -= 24; | ~^~
s708497781
p03773
C++
#include <iostream> using namespace std; int main(){ int A,B; cin >> A >> B; while(A+B>=24){ A+B = A+B-24; } cout << A+B << endl; }
a.cc: In function 'int main()': a.cc:8:6: error: lvalue required as left operand of assignment 8 | A+B = A+B-24; | ~^~
s060038999
p03773
C++
#include <iostream> using namespace std; int main(){ int A,B; cin >> A >> B; while(A+B>=24){ A+B -=24; } cout << A+B << endl; }
a.cc: In function 'int main()': a.cc:8:6: error: lvalue required as left operand of assignment 8 | A+B -=24; | ~^~
s618270562
p03773
Java
import java.util.Scanner; public class A57Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); System.out.println(A + B); } }
Main.java:3: error: class A57Main is public, should be declared in a file named A57Main.java public class A57Main { ^ 1 error
s734693050
p03773
C++
#include<iostream> typedef long long ll; using namespace std; } int main(){ ll N;  cin>>N; ll X=0; ll digit = 0; for(ll i=1; i<=sqrt(N); ++i){ if(N%i==0) X=N/i;} while(X!=0){ X=X/10; ++digit;} cout<<digit<<endl; }
a.cc:6:6: error: extended character   is not valid in an identifier 6 | ll N;  | ^ a.cc:4:1: error: expected declaration before '}' token 4 | } | ^ a.cc: In function 'int main()': a.cc:6:6: error: '\U00003000' was not declared in this scope 6 | ll N;  | ^~ a.cc:10:18: error: 'sqrt' was not declared in this scope 10 | for(ll i=1; i<=sqrt(N); ++i){ | ^~~~
s659011023
p03773
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B; cin>>A>>B; int ans=(A+B); if(ans>=24)ans-=42; cout<<ans<<endl; return 0; } }
a.cc:11:1: error: expected declaration before '}' token 11 | } | ^
s907353498
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c,d= 0; cin >> a >> b; c=a+b; if(c >24){ c = c-24 } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: expected ';' before '}' token 11 | c = c-24 | ^ | ; 12 | } | ~
s360271412
p03773
C++
import std.stdio; import std.string; import std.conv; import std.algorithm; import std.array; import std.range; void main(){ auto Q=readln.split.to!(int[]),A=Q[0],B=Q[1]; if(A+B>24)writeln((A+B)-24); else writeln(A+B); }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.string; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import std.conv; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import std.algorithm; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import std.array; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: 'import' does not name a type 6 | import std.range; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: '::main' must return 'int' 8 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:16: error: 'readln' was not declared in this scope 9 | auto Q=readln.split.to!(int[]),A=Q[0],B=Q[1]; | ^~~~~~ a.cc:10:12: error: 'A' was not declared in this scope 10 | if(A+B>24)writeln((A+B)-24); | ^ a.cc:10:14: error: 'B' was not declared in this scope 10 | if(A+B>24)writeln((A+B)-24); | ^ a.cc:10:19: error: 'writeln' was not declared in this scope 10 | if(A+B>24)writeln((A+B)-24); | ^~~~~~~ a.cc:11:14: error: 'writeln' was not declared in this scope 11 | else writeln(A+B); | ^~~~~~~
s821700800
p03773
C++
#include <iostream> using namespace std; int main() { int a=0,b=0,y=0; cin >> a; cin >> b; if(a<0){ exit(0); } if(b>23){ exit(0); } y=a+b; if(y>24){ y=y-24; } if(y==24){ y=0; }
a.cc: In function 'int main()': a.cc:21:10: error: expected '}' at end of input 21 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s320461298
p03773
C++
#include <iostream> using namespace std; int main() { int A; int B; cin >> A; cin >> B; int t; t = A + B; if(t > 23){ t = t - 24 } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: expected ';' before '}' token 12 | t = t - 24 | ^ | ; 13 | } | ~
s987598472
p03773
C++
#include<iostream> using namespace std; int main(){ int A, B; cin >> A >> B; cout >> (A+B)%24; }
a.cc: In function 'int main()': a.cc:11:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 11 | cout >> (A+B)%24; | ~~~~ ^~ ~~~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:11:10: note: candidate: 'operator>>(int, int)' (built-in) 11 | cout >> (A+B)%24; | ~~~~~^~~~~~~~~~~ a.cc:11:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >> (A+B)%24; | ^~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:11:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 11 | cout >> (A+B)%24; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >> (A+B)%24; | ^~ /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:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >> (A+B)%24; | ^~ /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:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >> (A+B)%24; | ^~ /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:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >> (A+B)%24; | ^~ /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:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >> (A+B)%24; | ^~ /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:11:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >> (A+B)%24; | ^~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]': a.cc:11:19: required from here 11 | cout >> (A+B)%24; | ^~ /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) | ^~~~~~~~
s067036585
p03773
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=1;i<=n;++i) #define YES cout<<"YES"<<endl #define NO cout<<"NO"<<endl using namespace std; int main(){ string a,b; cin >> a >> b; cout << (a+b)%24 << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 10 | cout << (a+b)%24 << endl; | ~~~~~^~~ | | | | | int | std::__cxx11::basic_string<char> In file included from /usr/include/c++/14/valarray:605, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc:1: /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)' 1200 | _DEFINE_BINARY_OPERATOR(%, __modulus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1200 | _DEFINE_BINARY_OPERATOR(%, __modulus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>' 10 | cout << (a+b)%24 << endl; | ^~ /usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1200 | _DEFINE_BINARY_OPERATOR(%, __modulus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::valarray<_Tp>' and 'int' 10 | cout << (a+b)%24 << endl; | ^~
s442946532
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin >> A >> B; if(A+B>=24) cout << A+B-24 << endl; else cout << A+B < endl; }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | else cout << A+B < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:7:24: note: couldn't deduce template parameter '_CharT' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:7:24: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s810430980
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin >> A >> B; if(A+B>=24) cout << A+B-24 << endl; else cout << A+B < endl; }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | else cout << A+B < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:7:24: note: couldn't deduce template parameter '_CharT' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:7:24: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:7:24: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 7 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s455881770
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; if(A+B>=24) cout << A+B-24 << endl; else cout << A+B < endl; }
a.cc: In function 'int main()': a.cc:6:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | else cout << A+B < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h: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:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 6 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view: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:6:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:6:24: note: couldn't deduce template parameter '_CharT' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | else cout << A+B < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:6:24: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 6 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:6:24: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 6 | else cout << A+B < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s644978502
p03773
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; #define INF (1<<30) #define INFLL (1ll<<60) typedef pair<ll, int> P; #define MOD (1000000007ll) #define l_ength size ll sq(ll x){ return x*x; } void mul_mod(ll& a, ll b){ a *= b; a %= MOD; } bool isvowel(char c){ int i; string v="aeiou"; for(i = (v.size()-1); i>=0; --i){ if(c == v[i]){ return true; } } return false; } int main(void){ int a,b; cout >> a >> b; cout << ((a+b)%24) << endl; return 0; }
a.cc: In function 'int main()': a.cc:32:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 32 | cout >> a >> b; | ~~~~ ^~ ~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:32:14: note: candidate: 'operator>>(int, int)' (built-in) 32 | cout >> a >> b; | ~~~~~^~~~ a.cc:32:14: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:32:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 32 | cout >> a >> b; | ^~~~ 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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ 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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 32 | cout >> a >> b; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]': a.cc:32:10: required from here 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ 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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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:32:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 32 | cout >> a >> b; | ^ /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/iomanip:207:5: note:
s727949960
p03773
C++
#include<stdio.h> int main(void) { char str[24]; char str2[24]; fgets(str,24,stdin); int sum=str+str2; printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: invalid operands of types 'char [24]' and 'char [24]' to binary 'operator+' 7 | int sum=str+str2; | ~~~^~~~~ | | | | | char [24] | char [24]
s997538257
p03773
C++
#include<stdio.h> int main(void) { char str[24]; char str2[24]; int sum=str+str2; printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: invalid operands of types 'char [24]' and 'char [24]' to binary 'operator+' 6 | int sum=str+str2; | ~~~^~~~~ | | | | | char [24] | char [24]
s318415390
p03773
C++
#include<stdio.h> int main(void) { char str[10]; char str2[10]; int sum=str+str2; printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: invalid operands of types 'char [10]' and 'char [10]' to binary 'operator+' 6 | int sum=str+str2; | ~~~^~~~~ | | | | | char [10] | char [10]
s872261836
p03773
C++
#include<stdio.h> int main() { char str[10]; char str2[10]; int sum=str+str2; printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: invalid operands of types 'char [10]' and 'char [10]' to binary 'operator+' 6 | int sum=str+str2; | ~~~^~~~~ | | | | | char [10] | char [10]
s807793556
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin>>A; cin>>b; if(A+B>24){ cout<<A+B-24<<endl; } else{ cout<<A+B<<endl; } }
a.cc: In function 'int main()': a.cc:9:8: error: 'b' was not declared in this scope 9 | cin>>b; | ^
s086069111
p03773
C++
#include<iostream> using namespace std; int main(){ int A,B; cin>>A>>b; if(A+B>24){ cout<<A+B-24<<endl; } else{ cout<<A+B<<endl; } }
a.cc: In function 'int main()': a.cc:8:11: error: 'b' was not declared in this scope 8 | cin>>A>>b; | ^
s749897702
p03773
C++
#include<iostream> using namespace std; int main() { int A,B,i; cin>>A>>B; i=A+B; if(i<=) { cout<<i<<endl; }else{ cout<<i-24<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected primary-expression before ')' token 8 | if(i<=) | ^
s877887111
p03773
C++
#include<iostream> #include<cstdio> #include<cstring> #inlcude<alg0;orithm> using namespace std; int main() {int a,b;cin>>a>>b;cout<<(a+b)%24; return 0;}
a.cc:4:2: error: invalid preprocessing directive #inlcude; did you mean #include? 4 | #inlcude<alg0;orithm> | ^~~~~~~ | include
s934368538
p03773
C++
use std::io; fn next_vec() -> Vec<i64> { let mut buf = String::new(); io::stdin().read_line(&mut buf).unwrap(); buf.split_whitespace().map(|n| n.parse().unwrap()).collect() } fn main() { let v = next_vec(); let a = v[0]; let b = v[1]; println!("{:?}", (a + b) % 24); }
a.cc:1:1: error: 'use' does not name a type 1 | use std::io; | ^~~ a.cc:3:1: error: 'fn' does not name a type 3 | fn next_vec() -> Vec<i64> { | ^~ a.cc:9:1: error: 'fn' does not name a type 9 | fn main() { | ^~
s366939736
p03773
Java
import java.util.Scanner; public class TimeZone { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); System.out.println((a + b) % 24); } }
Main.java:3: error: class TimeZone is public, should be declared in a file named TimeZone.java public class TimeZone { ^ 1 error
s518091171
p03773
C++
#include <iostream> using namespace std; int main(void) { int a,b; cin>>a>>b; ans=a+b; if(ans>23)ans-=24; cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'ans' was not declared in this scope; did you mean 'abs'? 7 | ans=a+b; | ^~~ | abs
s996945475
p03773
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; int n = a+b; if(n=>24) n -= 24; cout << n; }
a.cc: In function 'int main()': a.cc:8:10: error: expected primary-expression before '>' token 8 | if(n=>24) n -= 24; | ^
s446264748
p03773
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; n = a+b; if(n>24) n -= 24; cout << n; }
a.cc: In function 'int main()': a.cc:7:5: error: 'n' was not declared in this scope 7 | n = a+b; | ^
s678244348
p03773
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> using namespace std; const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(){ int a,b; cin >> a >> b; cout << a+b)%24 << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:14: error: expected ';' before ')' token 17 | cout << a+b)%24 << endl; | ^ | ;
s723408888
p03773
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> using namespace std; const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(){ int a,b; cin >> a >> b; puts((a+b)%24); return 0; }
a.cc: In function 'int main()': a.cc:17:13: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 17 | puts((a+b)%24); | ~~~~~^~~ | | | int In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/stdio.h:714:30: note: initializing argument 1 of 'int puts(const char*)' 714 | extern int puts (const char *__s); | ~~~~~~~~~~~~^~~
s412084148
p03773
C++
include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if(c%24==0){ cout << c << endl; }else{ c=c-24; cout << c << 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:8:1: error: 'cin' was not declared in this scope 8 | cin >> a >> b; | ^~~ a.cc:13:3: error: 'cout' was not declared in this scope 13 | cout << c << endl; | ^~~~ a.cc:13:16: error: 'endl' was not declared in this scope 13 | cout << c << endl; | ^~~~ a.cc:16:3: error: 'cout' was not declared in this scope 16 | cout << c << endl; | ^~~~ a.cc:16:16: error: 'endl' was not declared in this scope 16 | cout << c << endl; | ^~~~
s548831929
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if(c%24!>=0){ c=c-24; } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:8: error: expected ')' before '!' token 12 | if(c%24!>=0){ | ~ ^ | )
s984614544
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if((c%24)!>=0){ c=c-24; } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: expected ')' before '!' token 12 | if((c%24)!>=0){ | ~ ^ | )
s594373751
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if(c%24!=0){ c=c-24; }else if{ c=c-48; } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:11: error: expected '(' before '{' token 14 | }else if{ | ^ | (
s113518539
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if(c%24!=0){ c=c-24; } cout << c < endl; return 0; }
a.cc: In function 'int main()': a.cc:16:11: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 16 | cout << c < endl; | ~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 16 | cout << c < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h: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:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 16 | cout << c < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view: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:16:13: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:16:13: note: couldn't deduce template parameter '_CharT' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 16 | cout << c < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:16:13: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 16 | cout << c < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:16:13: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 16 | cout << c < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s220327002
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c; cin >> a >> b; c=a+b; if(c%24=!0){ c=c-24; } cout << c <, endl; return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: lvalue required as left operand of assignment 12 | if(c%24=!0){ | ~^~~ a.cc:16:12: error: expected primary-expression before ',' token 16 | cout << c <, endl; | ^
s457518491
p03773
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Linq.Expressions; using System.Text; namespace Program { class MainClass { //////////////////////////////////////////////////////////// int N, A, B; long[] v; void Solve() { io.i(out N, out A, out B); io.ini(out v, N); Mat mat = new Mat(); var C = mat.C(50); v.SortR(); double maxAve = 0; A.REP(i => maxAve += v[i]); maxAve /= A; long ans = 0; var top = v.First(); var bot = v[A - 1]; if (top != bot) { var indexedV = v.Select((e, i) => new { e, i }); var choice = indexedV.Where(v => v.e == bot).Count(); var choiced = indexedV.Where(v => v.e == bot && v.i < A).Count(); ans = C[choice, choiced]; } else { var choice = v.Select((e, i) => new { e, i }).Where(v => v.e == top).Count(); for (int i = A; i <= B; i++) { if (choice < i) break; ans += C[choice, i]; } } io.o(maxAve); io.o(ans); } //////////////////////////////////////////////////////////// public static void Main() { new MainClass().Stream(); } IO io = new IO(); void Stream() { Solve(); io.writeFlush(); } //void Stream() { Test(); io.writeFlush(); } void Test() { } #region MockMacro //cannot use break,continue,goto void FOR(int a, int b, Action<int> act) { for (int i = a; i < b; ++i) act(i); } void FORR(int a, int b, Action<int> act) { for (int i = a - 1; i >= b; --i) act(i); } #endregion //////////////////////////////////////////////////////////// } #region default class IO { TYPE tp; string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' }; StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; public IO() { nextBuffer = new string[0]; BufferCnt = 0; Console.SetOut(sw); tp = new TYPE(); } public string Next() { if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++]; string st = Console.ReadLine(); while (st == "") st = Console.ReadLine(); nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries); BufferCnt = 0; return nextBuffer[BufferCnt++]; } public string String => Next(); public char Char => char.Parse(String); public int Int => int.Parse(String); public long Long => long.Parse(String); public double Double => double.Parse(String); public string[] arr => Console.ReadLine().Split(' '); public char[] arrChar => Array.ConvertAll(arr, char.Parse); public int[] arrInt => Array.ConvertAll(arr, int.Parse); public long[] arrLong => Array.ConvertAll(arr, long.Parse); public double[] arrDouble => Array.ConvertAll(arr, double.Parse); public T i<T>() { return tp.suitType<T>(String); } public void i<T>(out T v) { v = tp.suitType<T>(String); } public void i<T, U>(out T v1, out U v2) { i(out v1); i(out v2); } public void i<T, U, V>(out T v1, out U v2, out V v3) { i(out v1); i(out v2); i(out v3); } public void i<T, U, V, W>(out T v1, out U v2, out V v3, out W v4) { i(out v1); i(out v2); i(out v3); i(out v4); } public void i<T, U, V, W, X>(out T v1, out U v2, out V v3, out W v4, out X v5) { i(out v1); i(out v2); i(out v3); i(out v4); i(out v5); } public void ini<T>(out T[] a, int n) { a = new T[n]; for (int i = 0; i < n; i++) a[i] = tp.suitType<T>(String); } public void ini<T, U>(out T[] a, out U[] b, int n) { a = new T[n]; b = new U[n]; for (int i = 0; i < n; i++) { a[i] = i<T>(); b[i] = i<U>(); } } public void ini<T, U, V>(out T[] a, out U[] b, out V[] c, int n) { a = new T[n]; b = new U[n]; c = new V[n]; for (int i = 0; i < n; i++) { a[i] = i<T>(); b[i] = i<U>(); c[i] = i<V>(); } } public void ini<T>(out T[,] a, int h, int w) { a = new T[h, w]; for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) a[i, j] = i<T>(); } public void o<T>(T v) { Console.WriteLine(v); } public void o<T>(params T[] a) { Array.ForEach(a, n => o(n)); } public void o<T>(T[,] a) { a.GetLength(0).REP(i => { a.GetLength(1).REP(j => or(a[i, j] + " ")); br(); }); } public void ol<T>(T v) { Console.Write(v + " "); } public void ol<T>(params T[] a) { o(connect<T>(a)); } public void or<T>(T a) { Console.Write(a); } public void br() { o(""); } public void writeFlush() { Console.Out.Flush(); } private string connect<T>(params T[] s) { return string.Join(" ", s); } } class TYPE { public bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); } public T convertType<T, U>(U v) { return (T)Convert.ChangeType(v, typeof(T)); } public T suitType<T>(string s) { if (typeEQ<T, int>()) return convertType<T, int>(int.Parse(s)); if (typeEQ<T, long>()) return convertType<T, long>(long.Parse(s)); if (typeEQ<T, double>()) return convertType<T, double>(double.Parse(s)); if (typeEQ<T, char>()) return convertType<T, char>(char.Parse(s)); return convertType<T, string>(s); } } class PQueue<T> where T : IComparable { public List<T> heap; private Comparison<T> comp; private IComparer<T> comparer; private int size; private int type;//type=0->min public PQueue(int type = 0) : this(Comparer<T>.Default) { this.type = type; } public PQueue(IComparer<T> comparer) : this(16, comparer.Compare) { this.comparer = comparer; } public PQueue(Comparison<T> comparison) : this(16, comparison) { } public PQueue(int capacity, Comparison<T> comparison) { this.heap = new List<T>(capacity); this.comp = comparison; } public void Enqueue(T item) { this.heap.Add(item); var i = size++; while (i > 0) { var p = (i - 1) >> 1; if (Compare(this.heap[p], item) <= 0) break; this.heap[i] = heap[p]; i = p; } this.heap[i] = item; } public T Dequeue() { var ret = this.heap[0]; var x = this.heap[--size]; var i = 0; while ((i << 1) + 1 < size) { var a = (i << 1) + 1; var b = (i << 1) + 2; if (b < size && Compare(heap[b], heap[a]) < 0) a = b; if (Compare(heap[a], x) >= 0) break; heap[i] = heap[a]; i = a; } heap[i] = x; heap.RemoveAt(size); return ret; } public T Peek() { return heap[0]; } public int Count { get { return size; } } public bool Any() { return size > 0; } public bool Empty() { return !Any(); } public bool Contains(T v) { return heap.Contains(v); } private int Compare(T x, T y) { return type == 0 ? x.CompareTo(y) : y.CompareTo(x); } } #endregion #region other class Mat { public long mod = 1000000007;//10^9+7 public long Pow(long a, long b) { if (b == 0) return 1; if (b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod; else return Pow(a * a % mod, b / 2) % mod; } public long Fact(long n) { long ret = 1; for (long i = 1; i <= n; i++) ret = (ret * i) % mod; return ret; } public long ModC(long n, long r) { if (r == 0 || n == r) return 1; if (n == 0) return 0; if (n < 0 || n < r) throw new ArgumentException("n,r invalid"); else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod; } public long[,] C(int N) { long[,] Co = new long[N + 1, N + 1]; (N + 1).REP(i => (i + 1).REP(j => Co[i, j] = (j == 0 || j == i) ? 1L : Co[i - 1, j - 1] + Co[i - 1, j])); return Co; } public long DupC(long n, long r) { return ModC(n + r - 1, r); } public long P(long n, long r) { return Fact(n) / (Fact(n - r)); }//test public bool isPrime(long n) { if (n == 2) return true; if (n < 2 || n % 2 == 0) return false; for (long v = 3; v <= (long)Math.Sqrt(n); v += 2) if (n % v == 0) return false; return true; } public long LCM(long a, long b) { return a * (b / GCD(a, b)); } public long LCM(params long[] a) { return a.Aggregate((v, n) => LCM(v, n)); } public long GCD(long a, long b) { if (a < b) Swap(ref a, ref b); return b == 0 ? a : GCD(b, a % b); } public long GCD(params long[] array) { return array.Aggregate((v, n) => GCD(v, n)); } public T Max<T>(params T[] a) { return a.Max(); } public T Min<T>(params T[] a) { return a.Min(); } public void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; } public double Dis(int x1, int y1, int x2, int y2) { return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2)); } public int mDis(int x1, int y1, int x2, int y2) { return Math.Abs(x1 - x2) + Math.Abs(y1 - y2); } public int[] DigArr(int n) { int[] ret = new int[Digit(n)]; ret.Length.REP(i => ret[i] = DigVal(n, i + 1)); return ret; } public long DigArr2Num(IEnumerable<int> enu) { return enu.Aggregate((v, n) => v * 10 + n); } public int Digit(long n) { return (n == 0) ? 1 : (int)Math.Log10(n) + 1; } public int DigVal(int n, int dig) { return (n % (int)Pow(10, dig)) / (int)Pow(10, dig - 1); } public long Tousa(long a, long d, long n) { return a + (n - 1) * d; } public long TousaSum(long a, long d, long n) { return n * (2 * a + (n - 1) * d) / 2; } public long[] enuDivsor(long N) { var ret = new SortedSet<long>(); for (long i = 1; i * i <= N; i++) if (N % i == 0) { ret.Add(i); ret.Add(N / i); } return ret.ToArray(); } public IEnumerable<int[]> enuP(int[] Arr, int Use = -1) {//列挙順列 Use = (Use != -1) ? Use : Arr.Length; if (Use == 0 || Arr.Length < Use) yield break; var s = new Stack<List<int>>(); Arr.Length.REPR(i => s.Push(new List<int>() { i })); while (s.Count > 0) { var cur = s.Pop(); if (cur.Count == Use) { var ret = new List<int>(); cur.ForEach(X => ret.Add(Arr[X])); yield return ret.ToArray(); } else Arr.Length.REPR(i => { if (!cur.Contains(i)) s.Push(new List<int>(cur) { i }); }); } } public IEnumerable<int[]> enuC(int[] Arr, int Use = -1) {//列挙組み合わせ Use = (Use != -1) ? Use : Arr.Length; if (Use == 0 || Arr.Length < Use) yield break; var s = new Stack<Tuple<int, List<int>>>(); Arr.Length.REPR(i => s.Push(Tuple.Create(i, new List<int>() { Arr[i] }))); while (s.Count > 0) { var cur = s.Pop(); if (cur.Item2.Count == Use) yield return cur.Item2.ToArray(); else for (int i = Arr.GetUpperBound(0); i > cur.Item1; i--) s.Push(Tuple.Create(i, new List<int>(cur.Item2) { Arr[i] })); } } public IEnumerable<int[]> enuDupP(int[] Arr, int Use = -1) {//列挙重複順列 Use = (Use != -1) ? Use : Arr.Length; if (Use == 0) yield break; var s = new Stack<List<int>>(); Arr.Length.REPR(i => s.Push(new List<int>() { Arr[i] })); while (s.Count > 0) { var cur = s.Pop(); if (cur.Count == Use) yield return cur.ToArray(); else Arr.Length.REPR(i => s.Push(new List<int>(cur) { Arr[i] })); } } public IEnumerable<int[]> enuDupC(int[] Arr, int Use = -1) {//列挙組み合わせ Use = (Use != -1) ? Use : Arr.Length; if (Use == 0) yield break; var s = new Stack<Tuple<int, List<int>>>(); Arr.Length.REPR(i => s.Push(Tuple.Create(i, new List<int>() { Arr[i] }))); while (s.Count > 0) { var cur = s.Pop(); if (cur.Item2.Count == Use) yield return cur.Item2.ToArray(); else for (int i = Arr.GetUpperBound(0); i >= cur.Item1; i--) s.Push(Tuple.Create(i, new List<int>(cur.Item2) { Arr[i] })); } } public IEnumerable<long[]> enuPart(string str) { var s = new Stack<Tuple<string, List<long>, int>>(); s.Push(Tuple.Create(str[0].ToString(), new List<long>(), 1)); while (s.Count > 0) { var cur = s.Pop(); if (cur.Item3 >= str.Length) yield return (new List<long>(cur.Item2) { cur.Item1.toLong() }).ToArray(); else { s.Push(Tuple.Create(cur.Item1 + str[cur.Item3], new List<long>(cur.Item2), cur.Item3 + 1)); s.Push(Tuple.Create(str[cur.Item3].ToString(), new List<long>(cur.Item2) { cur.Item1.toLong() }, cur.Item3 + 1)); } } } } class Time { public int[] M = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; public int[] D = { 31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; public Time() { D[1] = 28; } public Time(int y) { D[1] = isLeapYear(y) ? 29 : 28; } public bool isLeapYear(int y) { return (y % 400 == 0 || (y % 4 == 0 && y % 100 != 0)); } } #endregion #region Data class AssociativeArray<T> : IEnumerable { public Dictionary<T, int> dic; public AssociativeArray() { dic = new Dictionary<T, int>(); } public AssociativeArray(params T[] a) { dic = new Dictionary<T, int>(); Add(a); } public void Add(T a) { if (!conK(a)) dic[a] = 0; dic[a]++; } public void Add(params T[] a) { a.Length.REP(i => { if (!conK(a[i])) dic[a[i]] = 0; dic[a[i]]++; }); } public void Set(T k, int v) { if (!dic.ContainsKey(k)) dic[k] = 0; dic[k] = v; } public void Remove(params T[] a) { a.Length.REP(i => { if (conK(a[i])) dic.Remove(a[i]); }); } public T[] Keys() { return dic.Keys.ToArray<T>(); } public int Val(T k) { return (dic.ContainsKey(k)) ? dic[k] : 0; } public int ValSum => dic.Values.Sum(); public int KeyNum => dic.Keys.Count; public int MaxVal => dic.Values.Max(); public int MinVal => dic.Values.Min(); public T MaxKey => MaxK(); public T MinKey => MinK(); public T MaxK() { var maxV = MaxVal; return dic.First(d => d.Value == maxV).Key; } public T MinK() { var minV = MinVal; return dic.First(d => d.Value == minV).Key; } public bool conK(T k) { return dic.ContainsKey(k); } public bool anyK(params T[] k) { return k.Any(key => conK(key)); } public bool allK(params T[] k) { return k.All(key => conK(key)); } public void Show() { foreach (var v in dic) { Console.WriteLine(v.Key + " : " + v.Value); } } public IEnumerator GetEnumerator() { foreach (var kp in dic) yield return kp; } public T[] ValueSortedKey(bool inc = true) {//test return (inc ? (dic.OrderBy(kp => kp.Value)) : (dic.OrderByDescending(kp => kp.Value))) .ThenBy(kp => kp.Key).ToDictionary(kp => kp.Key, kp => kp.Value).Keys.ToArray(); } //:sort->array } class Index { public int[] Comp(int[] bef) { int[] aft = new int[bef.Length]; var tmp = bef.Distinct().OrderBy(v => v).Select((v, i) => new { v, i }).ToDictionary(p => p.v, p => p.i); aft = bef.Select(v => tmp[v]).ToArray(); return aft; } } class TreeDis {//TODO:shortestPath public List<Tuple<long, long>>[] g; public long[] a2other; private int type; public TreeDis(int type = 0) { this.type = type; }//0->bfs,other->dfs public void Init(long n) { g = new List<Tuple<long, long>>[n + 1]; g.Length.REP(i => g[i] = new List<Tuple<long, long>>()); } public void Run(long[] a, long[] b) { a.Length.REP(i => { g[a[i]].Add(Tuple.Create(b[i], 1L)); g[b[i]].Add(Tuple.Create(a[i], 1L)); }); } public void Run(long[] a, long[] b, long[] w) { a.Length.REP(i => { g[a[i]].Add(Tuple.Create(b[i], w[i])); g[b[i]].Add(Tuple.Create(a[i], w[i])); }); } public long[] a2iArr(long a) { a2other = new long[g.Count()]; if (type == 0) BFS(a); else DFS(a); return a2other; } private void BFS(long a) { var q = new Queue<Tuple<long, long>>(); q.Enqueue(Tuple.Create(a, -1L)); while (q.Count > 0) { var c = q.Dequeue(); foreach (var v in g[c.Item1]) { if (v.Item1 == c.Item2) continue; a2other[v.Item1] = a2other[c.Item1] + v.Item2; q.Enqueue(Tuple.Create(v.Item1, c.Item1)); } } } private void DFS(long a) { var s = new Stack<Tuple<long, long>>(); s.Push(Tuple.Create(a, -1L)); while (s.Count > 0) { var c = s.Pop(); foreach (var v in g[c.Item1]) { if (v.Item1 == c.Item2) continue; a2other[v.Item1] = a2other[c.Item1] + v.Item2; s.Push(Tuple.Create(v.Item1, c.Item1)); } } } } class ShortestPath { public long INF = (long)1e15; protected int I = -1; protected int V; protected int E; public long[] cost; public List<Tuple<int, long>>[] Adj; protected bool isNonDir = true; public void Init(int n) { I = n + 1; V = n; Adj = new List<Tuple<int, long>>[I]; I.REP(i => Adj[i] = new List<Tuple<int, long>>()); } public void AddPath(int f, int t, long c) { E++; if (isNonDir) { Adj[f].Add(Tuple.Create(t, c)); Adj[t].Add(Tuple.Create(f, c)); } else { Adj[f].Add(Tuple.Create(t, c)); } } public void AddPath(int[] f, int[] t, long[] c) { f.Length.REP(i => AddPath(f[i], t[i], c[i])); } } class Dijkstra : ShortestPath {//隣接対応後検証不足,有向とか public long MinCost(int f, int t) { cost = new long[I]; cost.Set(INF); cost[f] = 0; var pq = new PQueue<Tuple<int, long>>(); pq.Enqueue(Tuple.Create(f, 0L));//(from,cost) while (pq.Count > 0) { var cur = pq.Dequeue(); if (cost[cur.Item1] < cur.Item2) continue; Adj[cur.Item1].Count.REP(i => { var tmp = Adj[cur.Item1][i]; if (cost[tmp.Item1] > cost[cur.Item1] + tmp.Item2) { cost[tmp.Item1] = cost[cur.Item1] + tmp.Item2; pq.Enqueue(Tuple.Create(tmp.Item1, cost[tmp.Item1])); } }); } return cost[t]; } } class BellmanFord : ShortestPath { private bool[] neg; public BellmanFord() { } public BellmanFord(bool isNonDir) { this.isNonDir = isNonDir; } public long MinCost(int f, int t) { cost = new long[I]; cost.Set(INF); cost[f] = 0; neg = new bool[I]; for (int i = 0; i < I - 1; i++) { I.REP(j => Adj[j].Count.REP(k => { var cur = Adj[j][k]; if (cost[cur.Item1] > cost[j] + cur.Item2) cost[cur.Item1] = cost[j] + cur.Item2; })); } for (int i = 0; i < I; i++) { I.REP(j => Adj[j].Count.REP(k => { var cur = Adj[j][k]; if (cost[cur.Item1] > cost[j] + cur.Item2) { cost[cur.Item1] = cost[j] + cur.Item2; neg[cur.Item1] = true; } if (neg[j]) neg[cur.Item1] = true; })); } return cost[t]; } public bool loopExist() { return neg[I - 1]; } } class WarshallFloyd {//そのうちAdjとどっちがいいか...TODO:ジェネリック private int E; private int INF = (int)1e9; public long[,] G; public void Init(int n) { E = n + 1; G = new long[E, E]; G.Set(INF); E.REP(i => G[i, i] = 0); } public void AddPath(int f, int t, long c) { G[f, t] = c; G[t, f] = c; } public void AddPath(int[] f, int[] t) { f.Length.REP(i => AddPath(f[i], t[i], 1)); } public void AddPath(int[] f, int[] t, long[] c) { f.Length.REP(i => AddPath(f[i], t[i], c[i])); } public void Run() { G = MinCostArr(); } public long[,] MinCostArr() { E.REP(i => E.REP(j => E.REP(k => G[j, k] = Math.Min(G[j, k], G[j, i] + G[i, k])))); return G; } } class UnionFind { public long[] parent; public long[] depth; private int I; public void Init(int n) { I = n + 1; parent = new long[I]; depth = new long[I]; I.REP(i => parent[i] = i); } public long Find(long x) { return (parent[x] == x) ? x : parent[x] = Find(parent[x]); } public void Unite(long x, long y) { x = Find(x); y = Find(y); if (x == y) return; if (depth[x] < depth[y]) parent[x] = y; else { parent[y] = x; if (depth[x] == depth[y]) depth[x]++; } } public bool Same(int a, int b) { return Find(a) == Find(b); } public long Size(int x) { return depth[Find(x)]; } } class Kruskal : ShortestPath {//TODO:test, public long Run() { var L = Adj.Select((l, i) => Tuple.Create(i, l[i].Item1, l[i].Item2)).OrderBy(t => t.Item3).ToList(); //var li = new List<Tuple<int, int, long>>(); //I.REP(i =>{ foreach (var t in Adj[i]) li.Add(Tuple.Create(i, t.Item1, t.Item2));}); //li = li.OrderBy(t => t.Item3).ToList();//li = li.OrderByDescending(t => t.Item3).ToList(); var uf = new UnionFind(); uf.Init(V); long ret = 0; foreach (var t in L) { if (!uf.Same(t.Item1, t.Item2)) { ret += t.Item3; uf.Unite(t.Item1, t.Item2); } } return ret; } } #endregion #region Ex static class StringEX { public static string Reversed(this string s) { return string.Join("", s.Reverse()); } public static string Repeat(this string s, int n) { return string.Concat(Enumerable.Repeat(s, n).ToArray()); } public static int toInt(this string s) { int n; return (int.TryParse(s.TrimStart('0'), out n)) ? n : 0; } public static int toInt(this char c) { return toInt(c.ToString()); } public static int toInt(this char[] c) { return toInt(new string(c)); } public static long toLong(this string s) { long n; return (long.TryParse(s.TrimStart('0'), out n)) ? n : (long)0; } public static long toLong(this char c) { return toLong(c.ToString()); } public static long toLong(this char[] c) { return toLong(new string(c)); } public static string toString(this char[] c) { return new string(c); } } static class NumericEx { public static string pad0<T>(this T v, int n) { return v.ToString().PadLeft(n, '0'); } public static double RoundOff(this double v, int n) { return Math.Round(v, n - 1, MidpointRounding.AwayFromZero); } public static bool Odd(this int v) { return v % 2 != 0; } public static bool Odd(this long v) { return v % 2 != 0; } public static void REP(this int v, Action<int> act) { for (int i = 0; i < v; ++i) act(i); } public static void REPR(this int v, Action<int> act) { for (int i = v - 1; i >= 0; --i) act(i); } } static class ArrayEX { public static T[] Sort<T>(this T[] a) { Array.Sort(a); return a; } public static T[] SortR<T>(this T[] a) { Array.Sort(a); Array.Reverse(a); return a; } public static void Set<T>(this T[] a, T v) { a.Length.REP(i => a[i] = v); } public static void Set<T>(this T[,] a, T v) { a.GetLength(0).REP(i => a.GetLength(1).REP(j => a[i, j] = v)); } } static class BitEx { public static bool Any(this BitArray b) { foreach (bool f in b) if (f) return true; return false; } public static bool All(this BitArray b) { foreach (bool f in b) if (!f) return false; return true; } public static bool None(this BitArray b) { return !Any(b); } public static void Flip(this BitArray b, int index) { b.Set(index, !b.Get(index)); } } static class IEnumerableEx { // } #endregion }
a.cc:47:10: error: invalid preprocessing directive #region 47 | #region MockMacro | ^~~~~~ a.cc:51:10: error: invalid preprocessing directive #endregion 51 | #endregion | ^~~~~~~~~ a.cc:54:6: error: invalid preprocessing directive #region 54 | #region default | ^~~~~~ a.cc:148:6: error: invalid preprocessing directive #endregion 148 | #endregion | ^~~~~~~~~ a.cc:149:6: error: invalid preprocessing directive #region 149 | #region other | ^~~~~~ a.cc:261:6: error: invalid preprocessing directive #endregion 261 | #endregion | ^~~~~~~~~ a.cc:262:6: error: invalid preprocessing directive #region 262 | #region Data | ^~~~~~ a.cc:420:6: error: invalid preprocessing directive #endregion 420 | #endregion | ^~~~~~~~~ a.cc:421:6: error: invalid preprocessing directive #region 421 | #region Ex | ^~~~~~ a.cc:456:6: error: invalid preprocessing directive #endregion 456 | #endregion | ^~~~~~~~~ a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collections.Generic; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Diagnostics; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.IO; | ^~~~~~ a.cc:6:7: error: expected nested-name-specifier before 'System' 6 | using System.Linq; | ^~~~~~ a.cc:7:7: error: expected nested-name-specifier before 'System' 7 | using System.Linq.Expressions; | ^~~~~~ a.cc:8:7: error: expected nested-name-specifier before 'System' 8 | using System.Text; | ^~~~~~ a.cc:13:13: error: expected unqualified-id before '[' token 13 | long[] v; | ^ a.cc:42:15: error: expected ':' before 'static' 42 | public static void Main() { new MainClass().Stream(); } | ^~~~~~~ | : a.cc:43:9: error: 'IO' does not name a type 43 | IO io = new IO(); | ^~ a.cc:49:32: error: 'Action' has not been declared 49 | void FOR(int a, int b, Action<int> act) { for (int i = a; i < b; ++i) act(i); } | ^~~~~~ a.cc:49:38: error: expected ',' or '...' before '<' token 49 | void FOR(int a, int b, Action<int> act) { for (int i = a; i < b; ++i) act(i); } | ^ a.cc:50:33: error: 'Action' has not been declared 50 | void FORR(int a, int b, Action<int> act) { for (int i = a - 1; i >= b; --i) act(i); } | ^~~~~~ a.cc:50:39: error: expected ',' or '...' before '<' token 50 | void FORR(int a, int b, Action<int> act) { for (int i = a - 1; i >= b; --i) act(i); } | ^ a.cc:53:6: error: expected ';' after class definition 53 | } | ^ | ; a.cc: In member function 'void Program::MainClass::Solve()': a.cc:15:13: error: 'io' was not declared in this scope 15 | io.i(out N, out A, out B); | ^~ a.cc:15:18: error: 'out' was not declared in this scope 15 | io.i(out N, out A, out B); | ^~~ a.cc:15:29: error: expected ')' before 'A' 15 | io.i(out N, out A, out B); | ^ a.cc:15:17: note: to match this '(' 15 | io.i(out N, out A, out B); | ^ a.cc:15:36: error: expected ')' before 'B' 15 | io.i(out N, out A, out B); | ^ a.cc:15:17: note: to match this '(' 15 | io.i(out N, out A, out B); | ^ a.cc:16:24: error: expected ')' before 'v' 16 | io.ini(out v, N); | ^ a.cc:16:19: note: to match this '(' 16 | io.ini(out v, N); | ^ a.cc:17:13: error: 'Mat' was not declared in this scope 17 | Mat mat = new Mat(); | ^~~ a.cc:18:13: error: 'var' was not declared in this scope 18 | var C = mat.C(50); | ^~~ a.cc:19:13: error: 'v' was not declared in this scope 19 | v.SortR(); | ^ a.cc:21:15: error: request for member 'REP' in '((Program::MainClass*)this)->Program::MainClass::A', which is of non-class type 'int' 21 | A.REP(i => maxAve += v[i]); | ^~~ a.cc:21:19: error: 'i' was not declared in this scope 21 | A.REP(i => maxAve += v[i]); | ^ a.cc:21:22: error: expected primary-expression before '>' token 21 | A.REP(i => maxAve += v[i]); | ^ a.cc:24:17: error: expected ';' before 'top' 24 | var top = v.First(); | ^~~ a.cc:25:17: error: expected ';' before 'bot' 25 | var bot = v[A - 1]; | ^~~ a.cc:26:17: error: 'top' was not declared in this scope 26 | if (top != bot) { | ^~~ a.cc:26:24: error: 'bot' was not declared in this scope 26 | if (top != bot) { | ^~~ a.cc:27:21: error: expected ';' before 'indexedV' 27 | var indexedV = v.Select((e, i) => new { e, i }); | ^~~~~~~~ a.cc:27:63: error: expected primary-expression before ')' token 27 | var indexedV = v.Select((e, i) => new { e, i }); | ^ a.cc:28:21: error: expected ';' before 'choice' 28 | var choice = indexedV.Where(v => v.e == bot).Count(); | ^~~~~~ a.cc:29:21: error: expected ';' before 'choiced' 29 | var choiced = indexedV.Where(v => v.e == bot && v.i < A).Count(); | ^~~~~~~ a.cc:30:23: error: 'C' was not declared in this scope 30 | ans = C[choice, choiced]; | ^ a.cc:30:25: error: 'choice' was not declared in this scope 30 | ans = C[choice, choiced]; | ^~~~~~ a.cc:30:33: error: 'choiced' was not declared in this scope 30 | ans = C[choice, choiced]; | ^~~~~~~ a.cc:32:21: error: expected ';' before 'choice' 32 | var choice = v.Select((e, i) => new { e, i }).Where(v => v.e == top).Count(); | ^~~~~~ a.cc:32:61: error: expected primary-expression before ')' token 32 | var choice = v.Select((e, i) => new { e, i }).Where(v => v.e == top).Count(); | ^ a.cc:34:25: error: 'choice' was not declared in this scope 34 | if (choice < i) break; | ^~~~~~ a.cc:35:28: error: 'C' was not declared in this scope 35 | ans += C[choice, i]; | ^ a.cc:35:30: error: 'choice' was not declared in this scope 35 | ans += C[choice, i]; | ^~~~~~ a.cc: In static member function 'static void Program::MainClass::Main()': a.cc:42:52: error: expected ';' before '.' token 42 | public static void Main() { new MainClass().Stream(); } | ^ a.cc: In member function 'void Program::MainClass::Stream()': a.cc:44:34: error: 'io' was not declared in this scope 44 | void Stream() { Solve(); io.writeFlush(); } | ^~ a.cc: In member function 'void Program::MainClass::FOR(int, int, int)': a.cc:49:79: error: 'act' was not declared in this scope 49 | void FOR(int a, int b, Action<int> act) { for (int i = a; i < b; ++i) act(i); } | ^~~ a.cc: In member function 'void Program::MainClass::FORR(int, int, int)': a.cc:50:85: error: 'act' was not declared in this scope 50 | void FORR(int a, int b, Action<int> act) { for (int i = a - 1; i >= b; --i) act(i); } | ^~~ a.cc: At global scope: a.cc:56:9: error: 'TYPE' does not name a type 56 | TYPE tp; | ^~~~ a.cc:57:9: error: 'string' does not name a type 57 | string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' }; | ^~~~~~ a.cc:57:49: error: expected unqualified-id before '[' token 57 | string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' }; | ^ a.cc:58:9: error: 'StreamWriter' does not name a type 58 | StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; | ^~~~~~~~~~~~ a.cc:59:15: error: expected ':' before 'IO' 59 | public IO() { nextBuffer = new string[0]; BufferCnt = 0; Console.SetOut(sw); tp = new TYPE(); } | ^~~ | : a.cc:60:15: error: expected ':' before 'string' 60 | public string Next() { | ^~~~~~~ | : a.cc:60:16: error: 'string' does not name a type 60 | public string Next() { | ^~~~~~ a.cc:68:15: error: expected ':' before 'string' 68 | public string String => Next(); | ^~~~~~~ | : a.cc:68:16: error: 'string' does not name a type 68 | public string String => Next(); | ^~~~~~ a.cc:69:15: error: expected ':' before 'char' 69 | public char Char => char.Parse(String);
s419817737
p03773
C
#include <stdio.h> int main(){ int A,B; scanf("%d", &A); scanf( "%d", &B); int x = A+B; if(x <= 24){ printf("%d",x); }else if(24 <= x){ printf("%d",x-24)); } return 0; }
main.c: In function 'main': main.c:10:34: error: expected ';' before ')' token 10 | printf("%d",x-24)); | ^ | ; main.c:10:34: error: expected statement before ')' token
s540651523
p03773
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); System.out.print("開始時刻"); int A = scan.nextInt(); System.out.print("経過時間"); int B = scan.nextInt(); scan.close(); if((A + B) >= 0 && (A + B) <= 23 ){ System.out.println("終了時間は" + (A + B) + "時です"); } else if((A + B) < 0 (A + B) >= 24){ System.out.println("もう一度"); } } }
Main.java:16: error: ')' expected else if((A + B) < 0 (A + B) >= 24){ ^ Main.java:16: error: not a statement else if((A + B) < 0 (A + B) >= 24){ ^ Main.java:16: error: ';' expected else if((A + B) < 0 (A + B) >= 24){ ^ 3 errors
s294873721
p03773
C++
#include <stdio.h> int main() { int i; i=1 + 1; printf("%d\n", i)
a.cc: In function 'int main()': a.cc:9:21: error: expected ';' at end of input 9 | printf("%d\n", i) | ^ | ; a.cc:9:21: error: expected '}' at end of input a.cc:5:1: note: to match this '{' 5 | { | ^
s640486575
p03773
Java
import java.util.Scanner; Scanner scan = new Scanner(System.in); System.out.print("開始時刻"); float a = scan.nextFloat(); System.out.print("経過時間"); float b = scan.nextFloat(); scan.close(); System.out.println("終了時間は" + (a + b) + "時です");
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. Scanner scan = new Scanner(System.in); ^ (use --enable-preview to enable unnamed classes) Main.java:4: error: class, interface, enum, or record expected System.out.print("????"); ^ Main.java:6: error: class, interface, enum, or record expected System.out.print("????"); ^ Main.java:8: error: class, interface, enum, or record expected scan.close(); ^ Main.java:10: error: class, interface, enum, or record expected System.out.println("?????" + (a + b) + "???"); ^ 5 errors
s789209743
p03773
Java
import java.util.*; public class Main { public static void main(String[] args) { int a,b; Scanner s = new Scanner(System.in); a = s.next(); b = s.next(); System.out.println((a + b) % 24); } }
Main.java:7: error: incompatible types: String cannot be converted to int a = s.next(); ^ Main.java:8: error: incompatible types: String cannot be converted to int b = s.next(); ^ 2 errors
s635664954
p03773
Java
public class Main { public static void main(String[] args) { int a,b; Scanner s = new Scanner(System.in); a = s.next(); b = s.next(); System.out.println((a + b) % 24); } }
Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s328168564
p03773
Java
public class Main { public static void main(String[] args) { int a,b; Scanner s = new Scanner(System.in); a = s.next(); b = s.next(); System.out.println((a + b) 5 24); } }
Main.java:7: error: ')' or ',' expected System.out.println((a + b) 5 24); ^ 1 error