submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s848793227
p03777
C++
package main import ( "fmt" ) func main() { var a, b string fmt.Scanf("%s %s", &a, &b) if (a == "H" && b == "H") || (a == "D" && b == "D") { fmt.Println("H") } else { fmt.Println("D") } }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s923718341
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=="H" && b=="H")cout<<"H"; else if(a=="D" && b=="D")cout<<"H"; else if(a=="D" && b=="H")cout<<"D"; else cout<<"D"; }
a.cc: In function 'int main()': a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(a=="H" && b=="H")cout<<"H"; | ~^~~~~ a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(a=="H" && b=="H")cout<<"H"; | ~^~~~~ a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | else if(a=="D" && b=="D")cout<<"H"; | ~^~~~~ a.cc:8:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | else if(a=="D" && b=="D")cout<<"H"; | ~^~~~~ a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="D" && b=="H")cout<<"D"; | ~^~~~~ a.cc:9:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="D" && b=="H")cout<<"D"; | ~^~~~~
s854814528
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'){ if(b=='H') cout<<'H'<<endl; else cout<<'D'<<ednl; } else{ if(b=='H') cout<<'D'<<endl; else cout<<'H'<<endl; } }
a.cc: In function 'int main()': a.cc:11:18: error: 'ednl' was not declared in this scope 11 | cout<<'D'<<ednl; | ^~~~
s016137585
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='D'){ if(b=='D')cout<<'H'<<endl; else cout<<'D'<<endl; } else{ if(b=='D')cout<<'D'>>endl; else cout<<'H'<<endl; } }
a.cc: In function 'int main()': a.cc:11:24: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 11 | if(b=='D')cout<<'D'>>endl; | ~~~~~~~~~^~~~~~ 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:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:11:26: note: couldn't deduce template parameter '_IntegerType' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:11:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: a.cc:11:26: note: couldn't deduce template parameter '_Tp' 11 | if(b=='D')cout<<'D'>>endl; | ^~~~
s203456534
p03777
C++
#include <iostream> using namespace std; #include <string> int main() { char a, b; cin >> a >> b; if(a=='h' && b=='H') cout << 'H'; else if(a=='D' && b = 'D') cout << 'H'; else cout << 'D'; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: lvalue required as left operand of assignment 10 | else if(a=='D' && b = 'D') cout << 'H'; | ~~~~~~~^~~~
s649935206
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; cout<<(a==b?"H":"D")<<endl; retrun 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'retrun' was not declared in this scope 9 | retrun 0; | ^~~~~~
s831638986
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; long long gcd(long long a, long long b){ if(a<b){ swap(a,b); } if(a%b==0){ return b; }else{ return gcd(b,a%b); } } long long lcm(long long x, long long y){ return (x/gcd(x,y))*y; } class UnionFind { public: //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。 vector<int> Parent; //クラスを作るときは、Parentの値を全て-1にする。 //以下のようにすると全てバラバラの頂点として解釈できる。 UnionFind(int N) { Parent = vector<int>(N, -1); } //Aがどのグループに属しているか調べる int root(int A) { if (Parent[A] < 0) return A; return Parent[A] = root(Parent[A]); } //自分のいるグループの頂点数を調べる int size(int A) { return -Parent[root(A)];//先祖をrootで取っておきたい。 } //AとBをくっ付ける bool connect(int A, int B) { //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける A = root(A); B = root(B); if (A == B) { //すでにくっついてるからくっ付けない return false; } //大きい方(A)に小さいほう(B)をくっ付けたい //大小が逆だったらAとBをひっくり返す。 if (size(A) < size(B)) swap(A, B); //Aのサイズを更新する Parent[A] += Parent[B]; //Bの親をAに変更する Parent[B] = A; return true; } }; int main(){ char a,b; cin>>a>>b; if(a=='H'){ cout<<b<<endl; }else{ if(b=='D'){ cout<<'H'<<endl; }else{ cout<<'D'<<endl; } } return 0; } return 0; }
a.cc:85:3: error: expected unqualified-id before 'return' 85 | return 0; | ^~~~~~ a.cc:86:1: error: expected declaration before '}' token 86 | } | ^
s312215879
p03777
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { char a, b; cin >> a >> b; if (a=="H"||(a=="D"&&b=="D")) { cout << "H" << endl; } else { cout << "D" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (a=="H"||(a=="D"&&b=="D")) { | ~^~~~~ a.cc:13:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (a=="H"||(a=="D"&&b=="D")) { | ~^~~~~ a.cc:13:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (a=="H"||(a=="D"&&b=="D")) { | ~^~~~~
s131627354
p03777
C++
#include <cstdio> using namespace std; int main() { int a,b,c; scanf("%c %c", &a, &b); if(a==H){ printf("%c", b); } if(a==D){ if(b==C){ printf("D"); } else { printf("H"); } } }
a.cc: In function 'int main()': a.cc:9:15: error: 'H' was not declared in this scope 9 | if(a==H){ | ^ a.cc:12:15: error: 'D' was not declared in this scope 12 | if(a==D){ | ^ a.cc:13:23: error: 'C' was not declared in this scope 13 | if(b==C){ | ^
s109349900
p03777
C++
include<bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if(a=b) cout << 'H' << endl; else cout << 'D' << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope 9 | cout << 'H' << endl; | ^~~~ a.cc:9:20: error: 'endl' was not declared in this scope 9 | cout << 'H' << endl; | ^~~~ a.cc:11:5: error: 'cout' was not declared in this scope 11 | cout << 'D' << endl; | ^~~~ a.cc:11:20: error: 'endl' was not declared in this scope 11 | cout << 'D' << endl; | ^~~~
s539250118
p03777
C++
¥#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'&&b=='H') cout<<'H'<<endl; else if(a=='D'&&b=='D') cout<<'H'<<endl; else{ cout<<'D'<<endl; } }
a.cc:1:1: error: extended character ¥ is not valid in an identifier 1 | ¥#include<iostream> | ^ a.cc:1:2: error: stray '#' in program 1 | ¥#include<iostream> | ^ a.cc:1:1: error: '\U000000a5' does not name a type 1 | ¥#include<iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /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/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ 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/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /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/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /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/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /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/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /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/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.
s577259904
p03777
C++
#include <iostream> #include <string> #include <vector> #include <stack> #include <map> #include <set> #include <algorithm> #include <numeric> #include <math.h> #include <stdio.h> #include <ctype.h> #include <ios> #include <iomanip> using namespace std; #define N_MAX (100000) #define LL_MAX_NUM (1LL<<60) #define INF 1e7 typedef long long ll; typedef long long int lli; int main() { char a, b, res; cin >> a >> b; vector<int> A(N,0); if (a == b) { res = 'H'; } else { res = 'D'; } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:26:19: error: 'N' was not declared in this scope 26 | vector<int> A(N,0); | ^
s528455995
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b; cin>>a,b; if(a=='H'){ cout<<b; } else{ if(b=='H'){ cout<<'D'; } else{ cout<<'H'; } }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s349786733
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ cnar a, b; cin >> a >> b; if((a=='H'&&b=='H')||(a=='D'&&b=='D')) cout << 'H' << endl; else cout << 'D' << endl; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cnar' was not declared in this scope; did you mean 'char'? 5 | cnar a, b; | ^~~~ | char a.cc:6:12: error: 'a' was not declared in this scope 6 | cin >> a >> b; | ^ a.cc:6:17: error: 'b' was not declared in this scope 6 | cin >> a >> b; | ^
s917219851
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(void){ char a[2]; int cnt=0; cin>>a>>a[1]; for(int i=0;i<2;i++){ if(a[i]=='H') cnt++; } cout<<(cnt%2==0)?"H":"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: invalid operands of types 'const char [2]' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | cout<<(cnt%2==0)?"H":"D"<<endl; | ~~~^~~~~~
s904359614
p03777
C++
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iostream> #include <bitset> #include <deque> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <iterator> #include <string> #include <cctype> using namespace std; int main(){ int A,B; cin >> A >> B; if(A=="H"){ A=1; } else { A=-1; } if (B=="H"){ B=1; } else { B=-1; } if (A*B==1){ puts("H"); } else { puts("D"); } }
a.cc: In function 'int main()': a.cc:23:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 23 | if(A=="H"){ | ~^~~~~ a.cc:28:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 28 | if (B=="H"){ | ~^~~~~
s568996393
p03777
C++
#include<bits/stdc++.h> using namespace std; int void(){ string a,b; cin>>a>>b; if(a==b) cout<<"H"<<endl; else cout<<"D"<<endl; }
a.cc:4:10: error: expected unqualified-id before ')' token 4 | int void(){ | ^
s865239030
p03777
C++
#include<bits/stcd++.h> using namespace std; int void(){ string a,b; cin>>a>>b; if(a==b) cout<<"H"<<endl; else cout<<"D"<<endl; }
a.cc:1:9: fatal error: bits/stcd++.h: No such file or directory 1 | #include<bits/stcd++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s764863895
p03777
C++
# coding: utf-8 a, b = map(str, input().split()) print('H' if a == b else 'D')
a.cc:1:3: error: invalid preprocessing directive #coding 1 | # coding: utf-8 | ^~~~~~ a.cc:2:1: error: 'a' does not name a type 2 | a, b = map(str, input().split()) | ^
s199676752
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a, b; bool at = ( a == 'H'); bool top = (b == 'H'); if (at && top) { cout << 'H' << endl; }else if (at || top); { cout << 'D' << endl; }else{ cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:13:10: error: 'else' without a previous 'if' 13 | }else{ | ^~~~
s348033890
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a, b; bool at = ( a == 'H'); bool top = (b == 'H'); if (at && top) { cout << 'H' < endl; }else if (at || top); { cout << 'D' << endl; }else{ cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:9:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << 'H' < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << 'H' < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << 'H' < 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:9:31: note: couldn't deduce template parameter '_CharT' 9 | cout << 'H' < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout << 'H' < endl; |
s050429566
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a, b; bool at = ( a == "H"); bool top = (b == "H"); if (at && top) { cout << "H" < endl; }else if (at || top); { cout << "D" << endl; }else{ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:9:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_CharT' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout << "H" < endl; |
s498014457
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; bool at = ( a == "H"); bool top = (b == "H"); if (at && top) { cout << "H" < endl; }else if (at || top); { cout << "D" << endl; }else{ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:5:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 5 | bool at = ( a == "H"); | ~~^~~~~~ a.cc:6:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | bool top = (b == "H"); | ~~^~~~~~ a.cc:9:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_Bi_iter' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << "H" < 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:9:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << "H" < 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:9:31: note: couldn't deduce template parameter '_CharT' 9 | cout << "H" < 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,
s939452909
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>a>>b; cin >> a >> b; if ( a == ’H ’ && b == ’H ’) cout << ’H ’; if ( a == ’H ’ && b == ’D ’) cout << ’D ’; if ( a == ’D ’ && b == ’H ’) cout << ’D ’; if ( a == ’D ’ && b == ’D ’) cout << ’H ’; }
a.cc:7:11: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:14: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:24: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:27: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:38: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:41: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:8:11: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:8:14: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:8:24: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:8:27: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:8:38: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:8:41: error: extended character ’ is not valid in an identifier 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^ a.cc:9:11: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:9:14: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:9:24: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:9:27: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:9:38: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:9:41: error: extended character ’ is not valid in an identifier 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^ a.cc:10:11: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc:10:14: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc:10:24: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc:10:27: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc:10:38: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc:10:41: error: extended character ’ is not valid in an identifier 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^ a.cc: In function 'int main()': a.cc:7:11: error: '\U00002019H' was not declared in this scope 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^~ a.cc:7:13: error: expected ')' before '\U00002019' 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ~ ^~ | ) a.cc:8:11: error: '\U00002019H' was not declared in this scope 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^~ a.cc:8:13: error: expected ')' before '\U00002019' 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ~ ^~ | ) a.cc:8:38: error: '\U00002019D' was not declared in this scope 8 | if ( a == ’H ’ && b == ’D ’) cout << ’D ’; | ^~ a.cc:9:11: error: '\U00002019D' was not declared in this scope 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ^~ a.cc:9:13: error: expected ')' before '\U00002019' 9 | if ( a == ’D ’ && b == ’H ’) cout << ’D ’; | ~ ^~ | ) a.cc:10:11: error: '\U00002019D' was not declared in this scope 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^~ a.cc:10:13: error: expected ')' before '\U00002019' 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ~ ^~ | ) a.cc:10:38: error: '\U00002019H' was not declared in this scope 10 | if ( a == ’D ’ && b == ’D ’) cout << ’H ’; | ^~
s318227090
p03777
C++
#include<iostream> #include<string> #include <algorithm> using namespace std; int main() { string a, b; cin >> a >> b; if(b == 'H'){ if(a == 'H'){ cout << 'H' << endl; }else{ cout << 'D' << endl; } }else if(b == 'D'){ if(a == 'H'){ cout << 'D' << endl; }else{ cout << 'H' << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 10 | if(b == 'H'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 10 | if(b == 'H'){ | ^~~ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 10 | if(b == 'H'){ | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 10 | if(b == 'H'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 10 | if(b == 'H'){ | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/string_view:644: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>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3755: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>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const _CharT*' and 'char' 10 | if(b == 'H'){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:10:11: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 10 | if(b == 'H'){ | ^~~ 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:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>' 10 | if(b == 'H'){ | ^~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 10 | if(b == 'H'){ | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33, from /usr/include/c++/14/bits/allocator.h:46: /usr/include/c++/14/bits/new_allocator.h:215:9: note: candidate: 'template<class _Up> bool std::operator==(const __new_allocator<char>&, const __new_allocator<_Tp>&)' 215 | operator==(const __new_allocator&, const __new_allocator<_Up>&) | ^~~~~~~~ /usr/include/c++/14/bits/new_allocator.h:215:9: note: template argument deduction/substitution
s272348619
p03777
C++
060C #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(){ char a, b; cin >> a >> b; if((a=='H' && b=='H')||(a=='D' && b=='D')) cout << 'H' << endl; else cout << 'D' << endl; return 0; }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 060C | ^~~~ 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
s897612807
p03777
C
#include <stdio.h> int main(){ char a[2]; char b[2]; if(a == b){ printf("H¥n"); }else{ printf("D¥n"); } }
main.c:1:10: error: stray '\343' in program 1 | <U+FF03>include<U+3000><stdio.h> | ^~~~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | #include <stdio.h> | ^
s605372178
p03777
C
#include <stdio.h> int main(){ char a[2]; char b[2]; if(a == b){ printf("H¥n"); }else{ printf("D¥n"); } }
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | #include <stdio.h> | ^
s795462712
p03777
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(void) { string a, b; cin >> a >> b; if (a == "H") { if (b == "H")cout << "H\n"; else cout << "D\n"; }elss{ if (b == "H")cout << "D\n"; else cout << "H\n"; } return 0; }
a.cc: In function 'int main()': a.cc:16:10: error: 'elss' was not declared in this scope 16 | }elss{ | ^~~~
s955939724
p03777
C++
#include<iostream> using namespace std; int main(void) { char a,b; cin << a << b; if(a == 'H') { if(b == 'H') { cout >> "H"; } else { cout >> "D"; } } else { if(b =- 'H') { cout >> "D"; } else { cout >> "H"; } } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 7 | cin << a << b; | ~~~ ^~ ~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:7:9: note: candidate: 'operator<<(int, int)' (built-in) 7 | cin << a << b; | ~~~~^~~~ a.cc:7:9: 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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ In file included from /usr/include/c++/14/bits/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:7:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 7 | cin << a << b; | ^~~ In file included from /usr/include/c++/14/bits/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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed 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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream: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:7:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << a << b; | ^ /usr/include/c++/14/ostream: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 = char]': a.cc:7:12: required from here 7 | 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:12:18: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]') 12 | cout >> "H"; | ~~~~ ^~ ~~~ | | | | | const char [2] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55: /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::opera
s558436837
p03777
C++
#include < bits/stdc++.h> using namespace std; int main () { char a,b; cin >> a >> b; if(a=='H'&&b=='H'){ cout << "H" << endl; } if(a=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s328158570
p03777
C++
#include < bits/stdc++.h> using namespace std; int main () { char a,b; cin >> a,b; if(a=='H'&&b=='H'){ cout << "H" << endl; } if(a=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s504406106
p03777
C++
#include <bits/stdc++.h> using namespace std; int main () { string a,b; cin >> a,b; if(a=='H'&&b=='H'){ cout << "H" << endl; } if(a=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:8:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 8 | if(a=='H'&&b=='H'){ | ~^~~~~ | | | | | char | std::string {aka 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:8:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 8 | if(a=='H'&&b=='H'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | if(a=='H'&&b=='H'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | if(a=='H'&&b=='H'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, 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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 8 | if(a=='H'&&b=='H'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 8 | if(a=='H'&&b=='H'){ | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:8:9: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | if(a=='H'&&b=='H'){ | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::oper
s496147334
p03777
C++
#include < bits/stdc++.h> using namespace std; int main () { string a,b; cin >> a,b; if(a=='H'&&b=='H'){ cout << "H" << endl; } if(a=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s422224464
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a, b; cin >> a >> b; if(((a=='H')+(b=='H'))%2==0){ cout << 'H' << endl; }else{ cout << 'D' << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(((a=='H')+(b=='H'))%2==0){ | ~^~~~~ | | | | | char | std::string {aka 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, 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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if(((a=='H')+(b=='H'))%2==0){ | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::__cxx11::basic_string<char>' is not derived fr
s665178633
p03777
C
#include<iostream> using namespace std; int main(){ int i,j,n,N; char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<"H"; }else{ cout<<"D"; } }else{ if(b=='H'){ cout<<"D"; }else{ cout<<"H"; } } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s757109906
p03777
C++
#include<iostream> using namespace std; int main(){ char a, b; cin >> a >> b; if(a == 'D'){ if(b == 'H'){ cout << "D" << endl; } else { cout << "H" << enld; } } else { if(b == 'H'){ cout << "H" << endl; } else { cout << "D" << endl; } } }
a.cc: In function 'int main()': a.cc:12:22: error: 'enld' was not declared in this scope 12 | cout << "H" << enld; | ^~~~
s475092754
p03777
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=((i*(i+1))/2) - N; if(l1 >= 0){ k = i; break;} } cout <<k;
a.cc: In function 'int main()': a.cc:16:12: error: expected '}' at end of input 16 | cout <<k; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s291058574
p03777
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=i*(i+1) - N; if(l1 >= 0){ k = i; break;} cout <<k; }
a.cc: In function 'int main()': a.cc:17:4: error: expected '}' at end of input 17 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s073403817
p03777
C++
#include<iostream> using namespace std; int main(){ char a, b; cin >> a >> b; if(a=='H')cout << b << endl; else{ if(b=='H')cout << 'D' << endl; else cout << 'H' << endl; } } }
a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s002489757
p03777
C
#include <stdio.h> int main (){ char a,b; int p,q; scanf ("%c%c",&a,&b); if(a=='H'){ p=0; } else (a=='D'){ p=1; } if(b=='H'){ q=0; } else (b=='D'){ q=1; } if(p+q%2==0){ printf ("H"); } else { printf ("D"); } return 0; }
main.c: In function 'main': main.c:9:16: error: expected ';' before '{' token 9 | else (a=='D'){ | ^ | ;
s979733757
p03777
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ str a,b; cin >> a >> b; if(a==b)cout<<"H";else cout <<"D"; return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'str' was not declared in this scope; did you mean 'std'? 12 | str a,b; | ^~~ | std a.cc:13:12: error: 'a' was not declared in this scope 13 | cin >> a >> b; | ^ a.cc:13:17: error: 'b' was not declared in this scope 13 | cin >> a >> b; | ^
s796492903
p03777
C++
#include <iostream> using namespace std; int main() { char a, b; cin >> a >> b; if (a == 'H') { cout << b << end; } else if (a == 'D') { if (b == 'H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:8:15: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << b << end; | ~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 | operator<<(nullptr_t) | ^~~~~~~~ /usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t' 306 | operator<<(nullptr_t) |
s402594536
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ if(b.equals("D")){System.out.print("D");} if(b.equals("H")){System.out.print("H");} } }if(a.equals("D")){ if(b.equals("H")){System.out.print("D");} if(b.equals("D")){System.out.print("H");} } } }
Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:13: error: <identifier> expected }if(a.equals("D")){ ^ Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:19: error: class, interface, enum, or record expected } ^ 4 errors
s461421726
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ if(b.equals("D")){system.out.print("D");} if(b.equals("H")){system.out.print("H");} } }if(a.equals("D")){ if(b.equals("H")){system.out.print("D");} if(b.equals("D")){system.out.print("H");} } } }
Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:13: error: <identifier> expected }if(a.equals("D")){ ^ Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:19: error: class, interface, enum, or record expected } ^ 4 errors
s840249842
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ system.out.print(b); }if(a.equals("D")){ if(b.equals("H")){system.out.print("D");} if(b.equals("D")){system.out.print("H");} } } }
Main.java:10: error: package system does not exist system.out.print(b); ^ Main.java:12: error: package system does not exist if(b.equals("H")){system.out.print("D");} ^ Main.java:13: error: package system does not exist if(b.equals("D")){system.out.print("H");} ^ 3 errors
s951523318
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.charAt(0)=='H'){ system.out.print(b.charAt(0)); }if(a.charAt(0)=='D'){ if(b.charAt(0)=='D'){ system.out.print('H'); }if(b.charAt(0)=='H'){ system.out.print('D'); } } } }
Main.java:10: error: package system does not exist system.out.print(b.charAt(0)); ^ Main.java:13: error: package system does not exist system.out.print('H'); ^ Main.java:15: error: package system does not exist system.out.print('D'); ^ 3 errors
s219346346
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); }if(b=='H'){ system.out.print('D'); } } } }
Main.java:9: error: bad operand types for binary operator '==' if(a=='H'){ ^ first type: String second type: char Main.java:10: error: package system does not exist system.out.print(b); ^ Main.java:11: error: bad operand types for binary operator '==' }if(a=='D'){ ^ first type: String second type: char Main.java:12: error: bad operand types for binary operator '==' if(b=='D'){ ^ first type: String second type: char Main.java:13: error: package system does not exist system.out.print('H'); ^ Main.java:14: error: bad operand types for binary operator '==' }if(b=='H'){ ^ first type: String second type: char Main.java:15: error: package system does not exist system.out.print('D'); ^ 7 errors
s363534400
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char a = sc.nextCara(); char b = sc.nextCara(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); }if(b=='H'){ system.out.print('D'); } } } }
Main.java:6: error: cannot find symbol char a = sc.nextCara(); ^ symbol: method nextCara() location: variable sc of type Scanner Main.java:7: error: cannot find symbol char b = sc.nextCara(); ^ symbol: method nextCara() location: variable sc of type Scanner Main.java:10: error: package system does not exist system.out.print(b); ^ Main.java:13: error: package system does not exist system.out.print('H'); ^ Main.java:15: error: package system does not exist system.out.print('D'); ^ 5 errors
s494971119
p03777
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char a = sc.nextCara(); char b = sc.nextCara(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); }if(b=='H'){ system.out.print('D'); } } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:4:29: error: 'String' has not been declared 4 | public static void main(String[] args) { | ^~~~~~ a.cc:4:38: error: expected ',' or '...' before 'args' 4 | public static void main(String[] args) { | ^~~~ a.cc:20:2: error: expected ';' after class definition 20 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:5:9: error: 'Scanner' was not declared in this scope 5 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:6:18: error: 'sc' was not declared in this scope 6 | char a = sc.nextCara(); | ^~ a.cc:10:9: error: 'system' was not declared in this scope 10 | system.out.print(b); | ^~~~~~ a.cc:13:12: error: 'system' was not declared in this scope 13 | system.out.print('H'); | ^~~~~~ a.cc:15:12: error: 'system' was not declared in this scope 15 | system.out.print('D'); | ^~~~~~
s878433684
p03777
C++
#include <iostream> char a,b; int main(){ cin >> a >> b; cout << (a==b? "H":"D") << endl; }
a.cc: In function 'int main()': a.cc:4:3: 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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout << (a==b? "H":"D") << 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:5:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 5 | cout << (a==b? "H":"D") << 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) | ^~~~
s879078024
p03777
C++
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define ff first #define ss second #define sz size #define FOR(i,a,b) for(int i=a;i<b;i++) #define FORN(i,a,b) for(int i=a;i<=b;i++) #define FORRN(i,a,b) for (int i = (a); i >= (b); i--) #define FORR(i,a,b) for (int i = (a); i > (b); i--) typedef unsigned long long ull; typedef long long ll; int main(){ ios_base::sync_with_stdio(false); //Fast I/O cin.tie(0); cout.tie(0); //freopen("input.in","r",stdin); //freopen("output.out","w",stdout); string a,b; cin >> a >> b; if(a=='H' && b=='H') cout << "H\n"; else if(a=='H' && b=='D') cout << "D\n"; else if(a=='D' && b=='H') cout << "D\n"; else cout << "H"; return 0; }
a.cc: In function 'int main()': a.cc:26:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 26 | if(a=='H' && b=='H') | ~^~~~~ | | | | | char | std::string {aka 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:26:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:26:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:26:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 26 | if(a=='H' && b=='H') | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 26 | if(a=='H' && b=='H') | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 26 | if(a=='H' && b=='H') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 26 | if(a=='H' && b=='H') | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, 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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 26 | if(a=='H' && b=='H') | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 26 | if(a=='H' && b=='H') | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:26:11: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 26 | if(a=='H' && b=='H') |
s594427278
p03777
C
#include<stdio.h> char A, B; int main(){ a=getchar(); getchar(); b=getchar(); if(a==b){ putchar('H'); }else{ putchar('D'); } }
main.c: In function 'main': main.c:4:3: error: 'a' undeclared (first use in this function) 4 | a=getchar(); | ^ main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in main.c:6:3: error: 'b' undeclared (first use in this function) 6 | b=getchar(); | ^
s576737047
p03777
C++
#include<iostream> using namespace std; char a,b int main() { cin>>a>>b; if(a==b) cout<<'H'<<endl; else cout<<'D'<<endl; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s428127774
p03777
C++
#include<iostream> using namespace std; int main(){ string str1; cin >> str1; if(str[0] == 'H'){ string str2; cin >> str2; if(str2[0] == 'H'){ cout << "H" << endl; } else{ cout << "D" << endl; } } else{ string str2; cin >> str2; if(str2[0] == 'H'){ cout << "D" << endl; } else{ cout << "H" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: 'str' was not declared in this scope; did you mean 'str1'? 8 | if(str[0] == 'H'){ | ^~~ | str1
s017964881
p03777
C
#include<stdio.h> int main(){ char a[2], b[2]; int judge; scanf("%s %s", a, b); if(a[0] == 'H'){ if(b[0] == 'H'){ judge = 1; } else { judge = 0; } } else { if(b[0] == 'H'){ judge = 0; } else { judge = 1; } } if(judge == 1){ printf("H\n"); } else { printf("D"\n); } return 0; }
main.c: In function 'main': main.c:26:15: error: stray '\' in program 26 | printf("D"\n); | ^ main.c:26:15: error: expected ')' before 'n' 26 | printf("D"\n); | ~ ^~ | )
s695518476
p03777
C++
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<'H'; return 0; } else { cout<<'D'; return 0; } } else{ if(b='H'){ cout<<'D'; return0; } else cout<<'H'; } return 0; }
a.cc: In function 'int main()': a.cc:19:1: error: 'return0' was not declared in this scope 19 | return0; | ^~~~~~~
s735712454
p03777
C++
#include <iostram> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<'H'; return 0; } else { cout<<'D'; return 0; } } else{ if(b='H'){ cout<<'D'; return0; } else cout<<'H'; } return 0; }
a.cc:1:10: fatal error: iostram: No such file or directory 1 | #include <iostram> | ^~~~~~~~~ compilation terminated.
s435414441
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a='H' && b='H'){cout<<'H'<<endl;} if(a='D' && b='H'){cout<<'D'<<endl;} if(a='H' && b='D'){cout<<'D'<<endl;} if(a='D' && b='D'){cout<<'H'<<endl;} }
a.cc: In function 'int main()': a.cc:8:12: error: lvalue required as left operand of assignment 8 | if(a='H' && b='H'){cout<<'H'<<endl;} | ~~~~^~~~ a.cc:9:10: error: lvalue required as left operand of assignment 9 | if(a='D' && b='H'){cout<<'D'<<endl;} | ~~~~^~~~ a.cc:10:12: error: lvalue required as left operand of assignment 10 | if(a='H' && b='D'){cout<<'D'<<endl;} | ~~~~^~~~ a.cc:11:12: error: lvalue required as left operand of assignment 11 | if(a='D' && b='D'){cout<<'H'<<endl;} | ~~~~^~~~
s734195269
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; cout << (a == b) ? 'H' : 'D' << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:34: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (a == b) ? 'H' : 'D' << endl; | ~~~~^~~~~~~
s433900599
p03777
C++
#include<bits/stdc++.h> #include<string> using namespace std; string a, b; int main(){ cin >> a >> b; if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ cout << "H" << endl; } else if((a = 'H' && b = 'D') || (a = 'D' && b = 'H')){ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator&&' (operand types are 'char' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ~~~ ^~ ~ | | | | char std::string {aka std::__cxx11::basic_string<char>} a.cc:7:15: note: candidate: 'operator&&(bool, bool)' (built-in) 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ~~~~^~~~ a.cc:7:15: note: no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 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:415:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:18: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:18: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:18: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:18: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:18: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const valarray<_Tp>&)' 1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed: a.cc:7:18: note: mismatched types 'const std::valarray<_Tp>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed: a.cc:7:18: note: mismatched types 'const std::valarray<_Tp>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed: a.cc:7:18: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ a.cc:7:37: error: no match for 'operator&&' (operand types are 'char' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ~~~ ^~ ~ | | | | char std::string {aka std::__cxx11::basic_string<char>} a.cc:7:37: note: candidate: 'operator&&(bool, bool)' (built-in) 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ~~~~^~~~ a.cc:7:37: note: no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:40: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:40: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'char' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed: a.cc:7:40: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ^ /usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun
s946831884
p03777
C++
#include<bits/stdc++.h> #include<string> using namespace std; string a, b; int main(){ cin >> a >> b; if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ cout << "H" << endl; } else if((a == 'H' && b == 'D') || (a == 'D' && b == 'H')){ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ~ ^~ ~~~ | | | | | char | std::string {aka 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:12: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, 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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:12: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ^~~ 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:629:5: note: candidate: 'template<class _CharT, class _Traits> conste
s498780305
p03777
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> using namespace std; #define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i ) #define rep(i,n) REP(i,0,n) typedef long long ll; typedef pair<int,int> pint; typedef pair<ll,int> pli; const int inf=1e9+7; const ll longinf=1LL<<60 ; const ll mod=1e9+7 ; using namespace std; int main(){ char a,b; cin >> a >> b; if(a==b) cout << 'H' << endl; else << 'D' << endl; return 0;}
a.cc: In function 'int main()': a.cc:31:12: error: expected primary-expression before '<<' token 31 | else << 'D' << endl; | ^~
s290305416
p03777
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using veci = vector<int>; using vecll = vector<ll>; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #define FOR(i,a,b) for(int i = (a);i < (b); ++i) #define REP(i,n) for(int i= 0;i<(int)(n);++i) #define pb push_back veci enum_div(int n){ veci ret; ret.pb(1); for(int i=1;i*i<n;i++){ if(n%i==0){ ret.pb(i); if(i != n/i){ret.pb(n/i);} } } ret.pb(n); return ret; } int gcb(int a,int b){return ((b == 0)? a : gcb(b,a%b));} int gcd(int a,int b){return (a*b) / gcb(a,b);} int main(){ char a,b; cin >> a >> b; if( (a=='H'&& b='H') || (a=='D'&& b=='D') ){ cout << "H" << endl; }else{ cout << "D" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:33:16: error: lvalue required as left operand of assignment 33 | if( (a=='H'&& b='H') || (a=='D'&& b=='D') ){ | ~~~~~~^~~~
s357096395
p03777
C
#include <stdio.h> int main() { char a,b; char H,D; scanf("%c %c",&a,&b); if ( a=='H' ) { if (b=='H'){ printf("H\n",); } else { printf("D\n"); } }else if (a=='D') { if (b=='H') { printf("D\n"); } else { printf("H\n"); } } return 0; }
main.c: In function 'main': main.c:10:29: error: expected expression before ')' token 10 | printf("H\n",); | ^
s603037445
p03777
C
#include <stdio.h> int main() { int a,b; int H,D; scanf("%d %d",&a,&b); if ( a==‘H ’ ) { if (b==‘H ’){ printf("H\n"); } else { printf("D\n"); } }else if (a==‘D ’) { if (b==‘H ’) { printf("D\n"); } else { printf("H\n"); } } return 0; }
main.c: In function 'main': main.c:8:13: error: stray '\342' in program 8 | if ( a==<U+2018>H <U+2019> ) { | ^~~~~~~~ main.c:8:16: error: stray '\342' in program 8 | if ( a==<U+2018>H <U+2019> ) { | ^~~~~~~~ main.c:9:19: error: stray '\342' in program 9 | if (b==<U+2018>H <U+2019>){ | ^~~~~~~~ main.c:9:22: error: stray '\342' in program 9 | if (b==<U+2018>H <U+2019>){ | ^~~~~~~~ main.c:13:27: error: stray '\342' in program 13 | } }else if (a==<U+2018>D <U+2019>) { | ^~~~~~~~ main.c:13:30: error: stray '\342' in program 13 | } }else if (a==<U+2018>D <U+2019>) { | ^~~~~~~~ main.c:14:23: error: stray '\342' in program 14 | if (b==<U+2018>H <U+2019>) { | ^~~~~~~~ main.c:14:26: error: stray '\342' in program 14 | if (b==<U+2018>H <U+2019>) { | ^~~~~~~~
s545784419
p03777
C++
#import<iostream> main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;} | ^~~~ a.cc: In function 'int main()': a.cc:2:46: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'char') 2 | main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;} | ~~~~~~~~~~~~~~^~ | | | | | char | std::basic_ostream<char> a.cc:2:46: note: candidate: 'operator^(int, int)' (built-in) 2 | main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;} | ~~~~~~~~~~~~~~^~ a.cc:2:46: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68, 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/cstddef:146:3: note: candidate: 'constexpr std::byte std::operator^(byte, byte)' 146 | operator^(byte __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:146:18: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte' 146 | operator^(byte __l, byte __r) noexcept | ~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:94:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator^(_Ios_Fmtflags, _Ios_Fmtflags)' 94 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:94:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags' 94 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:144:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator^(_Ios_Openmode, _Ios_Openmode)' 144 | operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:144:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode' 144 | operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:191:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator^(_Ios_Iostate, _Ios_Iostate)' 191 | operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:191:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate' 191 | operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~^~~
s871931370
p03777
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include<bits/stdc++.h> #include <utility> #define ALL(obj) (obj).begin(), (obj).end() #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define RFOR(i,a,b) for(int i = (a); (b) <= i; i--) #define REP(i,n) for(int i = 0; i < (n); i++) #define RREP(i,n) for(int i = n; n <= i; i--) #define ABS(a) ((a < 0) ? ((-1)*(a)) : (a)) #define elif else if #define MOD 1000000007 #define INF (1<<29) using namespace std; using ll = long long; map <int ,int> mpa,mpb; typedef pair<ll, ll> P; priority_queue<P, vector<P>, greater<P>> pque; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); char a,b; cin >> a >> b; if((a=="H" && b=="H") || (a=="D" && b=="D")){ cout << 'H' << endl; }else{ cout << 'D' << endl; } return 0; }
a.cc: In function 'int main()': a.cc:40:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") || (a=="D" && b=="D")){ | ~^~~~~ a.cc:40:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") || (a=="D" && b=="D")){ | ~^~~~~ a.cc:40:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") || (a=="D" && b=="D")){ | ~^~~~~ a.cc:40:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") || (a=="D" && b=="D")){ | ~^~~~~
s960341134
p03777
C++
#include <iostream> using namespace std; int main() { char a,b,ans; int x,y; cin>>a>>b; x=a-65; y=b-65; if (x==y) ans="H"; else ans="D"; cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | if (x==y) ans="H"; | ^~~ | | | const char* a.cc:11:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | else ans="D"; | ^~~ | | | const char*
s692021570
p03777
C
main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~ 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:16: error: 'a' redeclared as different kind of symbol 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^ main.c:1:1: note: previous definition of 'a' with type 'int' 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~ main.c:1:18: error: 'b' redeclared as different kind of symbol 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^ main.c:1:1: note: previous definition of 'b' with type 'int' 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~ main.c:1:20: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} main.c:1:20: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~~ main.c:1:20: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:41: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~ main.c:1:41: note: include '<stdio.h>' or provide a declaration of 'puts'
s913061656
p03777
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { char a,b; cin >> a >> b; if(a == 'H') cout << b << endl; else (a == 'D'){ if(b == 'H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before '{' token 10 | else (a == 'D'){ | ^ | ;
s518486004
p03777
C++
#include<iostream> #include<cmath> #include<stdio.h> using namespace std; int main() { char a,b; cin>>a>>b; if(a==b) cout<<"H"; else cout<<"D";- }
a.cc: In function 'int main()': a.cc:13:1: error: expected primary-expression before '}' token 13 | } | ^
s235051931
p03777
C++
#include<iostream> using namespace std; int main(void) { char a, b; cin >> a >> b; if (a == 'H') { cout << b << endl; } else { if (b == 'H') { cout << D << endl; } else { cout << H << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:15:33: error: 'D' was not declared in this scope 15 | cout << D << endl; | ^ a.cc:18:33: error: 'H' was not declared in this scope 18 | cout << H << endl; | ^
s611937823
p03777
C++
#include <iostream> #include <cstdio> using namespace std; int main() { char a,b; cin<<a<<b; if(a==b)printf("H"); else printf("D"); return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 7 | cin<<a<<b; | ~~~^~~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:7:8: note: candidate: 'operator<<(int, int)' (built-in) 7 | cin<<a<<b; | ~~~^~~ a.cc:7:8: 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:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ In file included from /usr/include/c++/14/bits/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:7:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 7 | cin<<a<<b; | ^~~ In file included from /usr/include/c++/14/bits/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:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed 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:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream: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:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin<<a<<b; | ^ /usr/include/c++/14/ostream: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 = char]': a.cc:7:10: required from here 7 | 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) | ^~~~~~~~
s456547113
p03777
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); if(a.charAt(0)=='H'){ System.out.print(b); } else{ String ans; if(b.charAt('H')) ans = "D"; else ans = "H"; System.out.println(ans); } } }
Main.java:13: error: incompatible types: char cannot be converted to boolean if(b.charAt('H')) ans = "D"; ^ 1 error
s085118555
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a >> b; if(a=="H" && b=="H") cout << "H"; if(a=="H" && b=="D") cout << "D"; if(a=="D" && b=="H") cout << "D"; if(a=="D" && b=="D") cout << "H"; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H"; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H"; | ~^~~~~ a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D"; | ~^~~~~ a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D"; | ~^~~~~ a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D"; | ~^~~~~ a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D"; | ~^~~~~ a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H"; | ~^~~~~ a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H"; | ~^~~~~
s928207863
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a >> b; if(a=="H" && b=="H") cout << "H" endl; if(a=="H" && b=="D") cout << "D" endl; if(a=="D" && b=="H") cout << "D" endl; if(a=="D" && b=="D") cout << "H" endl; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" endl; | ~^~~~~ a.cc:8:37: error: expected ';' before 'endl' 8 | if(a=="H" && b=="H") cout << "H" endl; | ^~~~~ | ; a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" endl; | ~^~~~~ a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" endl; | ~^~~~~ a.cc:9:37: error: expected ';' before 'endl' 9 | if(a=="H" && b=="D") cout << "D" endl; | ^~~~~ | ; a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" endl; | ~^~~~~ a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" endl; | ~^~~~~ a.cc:10:37: error: expected ';' before 'endl' 10 | if(a=="D" && b=="H") cout << "D" endl; | ^~~~~ | ; a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" endl; | ~^~~~~ a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" endl; | ~^~~~~ a.cc:11:37: error: expected ';' before 'endl' 11 | if(a=="D" && b=="D") cout << "H" endl; | ^~~~~ | ;
s945443632
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" << endl; else if(a=="H" && b=="D") cout << "D" << endl; else if(a=="D" && b=="H") cout << "D" << endl; else if(a=="D" && b=="D") cout << "H" << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:9:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:10:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~ a.cc:11:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~
s073798239
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" << endl; else if(a=="H" && b=="D") cout << "D" << endl; else if(a=="D" && b=="H") cout << "D" << endl; else if(a=="D" && b=="D") cout << "H" << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:9:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:10:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~ a.cc:11:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~
s962393364
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" << endl; if(a=="H" && b=="D") cout << "D" << endl; if(a=="D" && b=="H") cout << "D" << endl; if(a=="D" && b=="D") cout << "H" << endl; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" << endl; | ~^~~~~ a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" << endl; | ~^~~~~ a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" << endl; | ~^~~~~ a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~ a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" << endl; | ~^~~~~
s739284525
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" <<endl; if(a=="H" && b=="D") cout << "D" <<endl; if(a=="D" && b=="H") cout << "D" <<endl; if(a=="D" && b=="D") cout << "H" <<endl; }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" <<endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H" <<endl; | ~^~~~~ a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" <<endl; | ~^~~~~ a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(a=="H" && b=="D") cout << "D" <<endl; | ~^~~~~ a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" <<endl; | ~^~~~~ a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a=="D" && b=="H") cout << "D" <<endl; | ~^~~~~ a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" <<endl; | ~^~~~~ a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(a=="D" && b=="D") cout << "H" <<endl; | ~^~~~~
s258316339
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { cin>>n>>m; if (n==m) cout<<"H"<<endl; else cout<<"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'? 5 | cin>>n>>m; | ^ | yn a.cc:5:13: error: 'm' was not declared in this scope; did you mean 'tm'? 5 | cin>>n>>m; | ^ | tm
s224146702
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=="H") {co(n); } else {if(n=="H") co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggested alternatives: 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | #define ci(i,n) cin>>i>>n | ^~~ a.cc:13:2: note: in expansion of macro 'ci' 13 | ci(i,n); | ^~ /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:13:5: error: 'i' was not declared in this scope; did you mean 'it'? 13 | ci(i,n); | ^ a.cc:6:22: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:13:7: error: 'n' was not declared in this scope 13 | ci(i,n); | ^ a.cc:6:25: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s154445513
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=="H") {co(n); } else {if(n=="H") co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggested alternatives: 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | #define ci(i,n) cin>>i>>n | ^~~ a.cc:13:2: note: in expansion of macro 'ci' 13 | ci(i,n); | ^~ /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:13:5: error: 'i' was not declared in this scope; did you mean 'it'? 13 | ci(i,n); | ^ a.cc:6:22: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:13:7: error: 'n' was not declared in this scope 13 | ci(i,n); | ^ a.cc:6:25: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s365403997
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=='H') {co(n); } else {if(n=='H') co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggested alternatives: 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included 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: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:6:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | #define ci(i,n) cin>>i>>n | ^~~ a.cc:13:2: note: in expansion of macro 'ci' 13 | ci(i,n); | ^~ /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:13:5: error: 'i' was not declared in this scope; did you mean 'it'? 13 | ci(i,n); | ^ a.cc:6:22: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:13:7: error: 'n' was not declared in this scope 13 | ci(i,n); | ^ a.cc:6:25: note: in definition of macro 'ci' 6 | #define ci(i,n) cin>>i>>n | ^ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:15:2: note: in expansion of macro 'co' 15 | {co(n); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:19:2: note: in expansion of macro 'co' 19 | co("D"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | #define co(ans) cout<<ans<<endl | ^~~~ a.cc:21:2: note: in expansion of macro 'co' 21 | co("H"); | ^~ /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s885993411
p03777
C++
#include<stdio.h> int main() { char a,b; scanf("%c %c",&a,&b); if(a==b)printf("D\n"); else printf("H\n") return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: expected ';' before 'return' 7 | else printf("H\n") | ^ | ; 8 | return 0; | ~~~~~~
s127675623
p03777
C++
#include <bits/stdc++.h> using namespace std; string a, b; int main(){ con>>a>>b; if(a == b){ cout<<"H"<<endl; }else{ cout<<"D"<<endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'con' was not declared in this scope; did you mean 'cos'? 6 | con>>a>>b; | ^~~ | cos
s620120907
p03777
C++
#include<iostream> using namespace std; char a,b int main() { cin>>a>>b; if(a==b)cout<<"H"<<endl; else cout<<"D"<<endl; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s396699064
p03777
C++
#pr\ #include <cstdio> #include <cstdlib> using namespace std; char a,b; int main() { scanf("%c %c",&a,&b); if(a==b) puts("H"); else puts("D"); return 0; }
a.cc:1:2: error: invalid preprocessing directive #pr 1 | #pr\ 2 | #include <cstdio> a.cc: In function 'int main()': a.cc:8:5: error: 'scanf' was not declared in this scope 8 | scanf("%c %c",&a,&b); | ^~~~~ a.cc:10:9: error: 'puts' was not declared in this scope 10 | puts("H"); | ^~~~ a.cc:12:9: error: 'puts' was not declared in this scope 12 | puts("D"); | ^~~~
s087401874
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if (a=='H'){ cout << b << endl; } else { if (b=='H'){ cout << a << endl; } else { cout << b << endl; } } } #include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if (a=='H'){ cout << b << endl; } else { if (b=='H'){ cout << a << endl; } else { cout << "H" << endl; } } }
a.cc:22:5: error: redefinition of 'int main()' 22 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s864232471
p03777
C++
#include <iostream> int main(void){ char a,b; cin >> a >> b; cout << (a-b?'D':'H') << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << (a-b?'D':'H') << 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:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout << (a-b?'D':'H') << 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) | ^~~~
s980109886
p03777
C++
#include<bits/stdc++.h> char a,b; int main() { std::cin>>a>>b; if(a!=b)std::cout<<"D"<<endl; else std::cout<<"H"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if(a!=b)std::cout<<"D"<<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, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | std::cout<<"H"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s934009070
p03777
C++
#include<bits/stdc++.h> string a,b; int main() { std::cin>>a>>b; if(a!=b)std::cout<<"D"<<endl; else std::cout<<"H"<<endl; return 0; }
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'? 2 | string a,b; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:5:15: error: 'a' was not declared in this scope 5 | std::cin>>a>>b; | ^ a.cc:5:18: error: 'b' was not declared in this scope 5 | std::cin>>a>>b; | ^ a.cc:6:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if(a!=b)std::cout<<"D"<<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, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | std::cout<<"H"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s990291064
p03777
C++
#include<bits/stdc++.h> using namespace std; char ch,ch1; int main() { cin>>ch>>ch1; if(ch==ch1)cuot<<'H';else cout<<'D'; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'cuot' was not declared in this scope 7 | if(ch==ch1)cuot<<'H';else cout<<'D'; | ^~~~
s440510995
p03777
C++
#include<iostream> using namespace std; int main(void) { string a, b; cin >> a >> b; string ans; if (a=='H') cout << b << endl; else if (b=='D') cout << 'H' << endl; else cout << 'D' << endl; }
a.cc: In function 'int main()': a.cc:9:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if (a=='H') cout << b << endl; | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 9 | if (a=='H') cout << b << endl; | ^~~ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 9 | if (a=='H') cout << b << endl; | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if (a=='H') cout << 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 9 | if (a=='H') cout << 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/string_view:644: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>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:9:10: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3755: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>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:9:10: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:9:10: note: mismatched types 'const _CharT*' and 'char' 9 | if (a=='H') cout << b << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:9:10: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 9 | if (a=='H') cout << 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:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>' 9 | if (a=='H') cout << b << endl; | ^~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:9:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 9 | if (a=='H') cout << b << endl; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33, from /usr/include/c++/14/bits/allocator.h:46: /usr/include/c++/14/bits/new_allocator.h:215:9: note: candidate: 'template<class _Up> bool std::operator==(const __new_allocator<c
s709658914
p03777
C++
#include <bits/stdc++.h> #define o(output) cout << output << endl using namespace std; string s,t,u; int a,b,c,d; int l[13]={0,1,3,1,2,1,2,1,1,2,1,2,1}; char A,B,C; priority_queue<int,vector<int>,greater<int> >small; int main(){ cin >>A>>B; if(A-B=0)o("H"); else o("D"); }
a.cc: In function 'int main()': a.cc:15:7: error: lvalue required as left operand of assignment 15 | if(A-B=0)o("H"); | ~^~
s312753392
p03777
C++
#include <iostream> using namespace std; int main() { char a; char b; cin >> a; cin >> b; if (a == 'D'){ if (b == 'D'){ cout << "H" << endl;} else{ cout << "D" << endl;} else{ if (b == 'D'){ cout << "D" << endl;} else{ cout << "H" << endl;} return 0; }
a.cc: In function 'int main()': a.cc:14:5: error: expected '}' before 'else' 14 | else{ | ^~~~ a.cc:9:18: note: to match this '{' 9 | if (a == 'D'){ | ^ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s313807168
p03777
C++
#include <iostream> using namespace std; int main() { char at, top; cin >> at >> top; if (at == 'H') cout << top << endl; else { cout << top == 'H' ? 'D' : 'H' << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'char') 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | char | std::basic_ostream<char> a.cc:7:17: note: candidate: 'operator==(int, int)' (built-in) 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ~~~~~~~~~~~~^~~~~~ a.cc:7:17: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' 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:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << top == 'H' ? 'D' : 'H' << 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | cout << top == 'H' ? 'D' : 'H' << 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/string_view:644: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>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:7:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3755: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>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:7:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 7 | cout << top == 'H' ? 'D' : 'H' << 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:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ^~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:7:20: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
s586380352
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b; if(a=='H'&&b=='H'){ c='H'; } else if(a=='H'&&b=='D'){ c='D' } else if(a=='D'&&b=='H'){ c='D' } else{ c='H' } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:11:10: error: expected ';' before '}' token 11 | c='D' | ^ | ; 12 | } | ~ a.cc:14:10: error: expected ';' before '}' token 14 | c='D' | ^ | ; 15 | } | ~ a.cc:17:10: error: expected ';' before '}' token 17 | c='H' | ^ | ; 18 | } | ~
s121504933
p03777
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <functional> #include <queue> #include <set> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) using namespace std; typedef long long int lli; int main(){ char a.b; cin>>a>>b; if(a=='H'&&b=='H')cout<<"H"; if(a=='H'&&b=='D')cout<<"D"; if(a=='D'&&b=='H')cout<<"D"; if(a=='D'&&b=='D')cout<<"H"; }
a.cc: In function 'int main()': a.cc:15:15: error: expected initializer before '.' token 15 | char a.b; | ^ a.cc:16:14: error: 'a' was not declared in this scope 16 | cin>>a>>b; | ^ a.cc:16:17: error: 'b' was not declared in this scope 16 | cin>>a>>b; | ^