criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
int main(){
	char a[2],b[2];
	cout<<"Enter (H) OR (D) for a and b\n";
	cin>>a>>b;
	if((a=='H' && b=='H') || (a=='D' && b=='D')){
		cout<<"H\n";
		cout<<" TopCoDeer is honest.\n";
		}
		else{
		cout<<"D\n";
		cout<<"TopCoDeer is dishonest.\n";
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |             ~^~~~~
a.cc:7:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                       ~^~~~~
a.cc:7:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                                   ~^~~~~
a.cc:7:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                                             ~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	char a[],b[];
	cout<<"Enter (H) OR (D) for a and b\n";
	cin>>a>>b;
	if((a=='H' && b=='H') || (a=='D' && b=='D')){
		cout<<"H\n";
		cout<<" TopCoDeer is honest.\n";
		}
		else{
		cout<<"D\n";
		cout<<"TopCoDeer is dishonest.\n";
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: storage size of 'a' isn't known
    4 |         char a[],b[];
      |              ^
a.cc:4:18: error: storage size of 'b' isn't known
    4 |         char a[],b[];
      |                  ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	char a[]={H,D},b[]={H,D};
	cout<<"Enter (H) OR (D) for a and b\n";
	cin>>a>>b;
	if((a=='H' && b=='H') || (a=='D' && b=='D')){
		cout<<"H\n";
		cout<<" TopCoDeer is honest.\n";
		}
		else{
		cout<<"D\n";
		cout<<"TopCoDeer is dishonest.\n";
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: 'H' was not declared in this scope
    4 |         char a[]={H,D},b[]={H,D};
      |                   ^
a.cc:4:21: error: 'D' was not declared in this scope
    4 |         char a[]={H,D},b[]={H,D};
      |                     ^
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |             ~^~~~~
a.cc:7:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                       ~^~~~~
a.cc:7:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                                   ~^~~~~
a.cc:7:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if((a=='H' && b=='H') || (a=='D' && b=='D')){
      |                                             ~^~~~~
Language: C++

#include <iostream>
int main()
{
  char a,b;
  cin >>a>>b;
  
  if(a=='H')
  {
    if(b=='H')
      cout << "H";
    else
      cout << "D";
  }
  else if (a=='D')
  {
    if(b=='D')
      cout << 'D';
    else
      cout << 'H';
      
  }
}

Compiler output:
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:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |       cout << "H";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       cout << "D";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |       cout << 'D';
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |       cout << 'H';
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 char a,b;
scanf("%c%c",&a &b);
if(a==b){
printf("H");
}
else{
printf("D");
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: invalid operands of types 'char*' and 'char' to binary 'operator&'
    5 | scanf("%c%c",&a &b);
      |              ~~ ^~
      |              |   |
      |              |   char
      |              char*
Language: C++

// o
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } }

Compiler output:
a.cc:2:21: warning: extra tokens at end of #include directive
    2 | #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } }
      |                     ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

Alice started holding down her button 0 second after the start-up of the robot, and released her button 75 second after the start-up.
Bob started holding down his button 25 second after the start-up, and released his button 100 second after the start-up.
Therefore, the time when both of them were holding down their buttons, is the 50 seconds from 25 seconds after the start-up to 75 seconds after the start-up

Compiler output:
a.cc:1:1: error: 'Alice' does not name a type
    1 | Alice started holding down her button 0 second after the start-up of the robot, and released her button 75 second after the start-up.
      | ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
char a,b;
cin>>a>>b;
if((a=="H")&&(b=="H"))
{
cout<<"H";
}
if((a=="D")&&(b=="H")){
cout<<"H";
}
else
{
cout<<"D";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if((a=="H")&&(b=="H"))
      |     ~^~~~~
a.cc:6:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if((a=="H")&&(b=="H"))
      |               ~^~~~~
a.cc:10:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if((a=="D")&&(b=="H")){
      |     ~^~~~~
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if((a=="D")&&(b=="H")){
      |               ~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
char a,b;
cin>>a>>b;
if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){
cout<<"H";
}
else
{
cout<<"D";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){
      |      ~^~~~~
a.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){
      |                ~^~~~~
a.cc:6:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){
      |                            ~^~~~~
a.cc:6:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){
      |                                      ~^~~~~
Language: C++

#include<iostream>
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
	cout<<'D';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected '}' before 'else'
    8 | else if(a=='D'&&b=='D')
      | ^~~~
a.cc:6:27: note: to match this '{'
    6 |         if(a=='H'&&b=='H'){
      |                           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	char a,b;
	cin>>a>>b;
	if(a=='H'&&b=='H')
	cout<<'H';
	if(a=='D'&&b=='D')
	cout<<'H';
	else
	cout<<'D'
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'return'
   11 |         cout<<'D'
      |                  ^
      |                  ;
   12 |         return 0;
      |         ~~~~~~
Language: C++

Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest. In this game, an honest player always tells the truth, and an dishonest player always tell lies. You are given two characters a and b as the input. Each of them is either H or D, and carries the following information:

If a=H, AtCoDeer is honest; if a=D, AtCoDeer is dishonest. If b=H, AtCoDeer is saying that TopCoDeer is honest; if b=D, AtCoDeer is saying that TopCoDeer is dishonest.

Given this information, determine whether TopCoDeer is honest.

Compiler output:
a.cc:1:1: error: 'Two' does not name a type
    1 | Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest. In this game, an honest player always tells the truth, and an dishonest player always tell lies. You are given two characters a and b as the input. Each of them is either H or D, and carries the following information:
      | ^~~
a.cc:3:29: error: expected unqualified-id before 'if'
    3 | If a=H, AtCoDeer is honest; if a=D, AtCoDeer is dishonest. If b=H, AtCoDeer is saying that TopCoDeer is honest; if b=D, AtCoDeer is saying that TopCoDeer is dishonest.
      |                             ^~
a.cc:3:113: error: expected unqualified-id before 'if'
    3 | If a=H, AtCoDeer is honest; if a=D, AtCoDeer is dishonest. If b=H, AtCoDeer is saying that TopCoDeer is honest; if b=D, AtCoDeer is saying that TopCoDeer is dishonest.
      |                                                                                                                 ^~
Language: C

#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
int main(){
char a,b;
cin >>a>>b;
if (a=='H'){
    if (b=='H')
        cout<<"H"<<endl;
    else if(b=='D')
        cout<<"D"<<endl;
      
}else if (a=='D'){
    if (b=='D')
        cout<<"H"<<endl;
    else if(b=='H')
        cout<<"D"<<endl;
}

return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
int main() {
    using namespace std;
char a,b;
cin>>a>>b;
if(a=='H'||a=='D'||b=='H'||b=='D'){
    if(b=='H'){
        printf("%c",a);
    }else {
        if(a=='H'){
            printf("D");
        }else{
            printf("H");
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:2:12: note: to match this '{'
    2 | int main() {
      |            ^
Language: 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 == 'H' && b == 'D')
	{
		cout << 'D'
	}
	else if ( a == 'D' && b == 'H')
	{
		cout << 'D' ;
	}
	else 
	cout << 'H' ;
		return 0 ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: expected ';' before '}' token
   17 |                 cout << 'D'
      |                            ^
      |                            ;
   18 |         }
      |         ~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main(void){
    // Your code here!
   char a, b;
   if(a == 'H'){
       if(b == "H"){
           cout << "H" << endl;
       } else {
           cout << "D" << endl;
       }
   } else {
       if(b == "H"){
           cout << "D" << endl;
       } else {
           cout << "H" << endl;
       }
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |        if(b == "H"){
      |           ~~^~~~~~
a.cc:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |        if(b == "H"){
      |           ~~^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <string>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(x) sort(x.begin(),x.end())
#define REVE(x) reverse(x.begin(),x.end())
#define all(x) (x).begin(),(x).end()
#define fst first
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define sw swap
using LL = long long;
using ULL = unsigned long long;
#define FOR(i, m, n) for(int i = m;i < n;i++)
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c;
    cin >> a>>b;
    if(a==H){
       if(b==H){
         cout << "H";
       }else{
         "D";
       }
    }else{
      if(b==H)
      cout << "D";
    }else{
      cout << "H";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: 'H' was not declared in this scope
   30 |     if(a==H){
      |           ^
a.cc:39:6: error: 'else' without a previous 'if'
   39 |     }else{
      |      ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <string>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(x) sort(x.begin(),x.end())
#define REVE(x) reverse(x.begin(),x.end())
#define all(x) (x).begin(),(x).end()
#define fst first
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define sw swap
using LL = long long;
using ULL = unsigned long long;
#define FOR(i, m, n) for(int i = m;i < n;i++)
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c;
    cin >> a>>b;
    if(a==H){
       if(b==H){
         cout << "H";
       }else{
         "D";
       }
    }else{
      if(b==H)
      cout << "D"
    }else{
      cout << "H"
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: 'H' was not declared in this scope
   30 |     if(a==H){
      |           ^
a.cc:38:18: error: expected ';' before '}' token
   38 |       cout << "D"
      |                  ^
      |                  ;
   39 |     }else{
      |     ~             
a.cc:39:6: error: 'else' without a previous 'if'
   39 |     }else{
      |      ^~~~
a.cc:40:18: error: expected ';' before '}' token
   40 |       cout << "H"
      |                  ^
      |                  ;
   41 |     }
      |     ~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <string>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(x) sort(x.begin(),x.end())
#define REVE(x) reverse(x.begin(),x.end())
#define all(x) (x).begin(),(x).end()
#define fst first
#define mp make_pair
#define pb push_back
#define pob pop_back
#define sw swap
using LL = long long;
using ULL = unsigned long long;
#define FOR(i, m, n) for(int i = m;i < n;i++)
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
int main(){
char a,b;
cin >> a >> b;
cout << a==H?b==H?"H":"D":b==H?"D":"H";
 return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: 'H' was not declared in this scope
   27 | cout << a==H?b==H?"H":"D":b==H?"D":"H";
      |            ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main() {
	string a,b; cin >> a >> b;
  if ( a = b) cout <<"H"<<endl;
  else cout<<"D"<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(b)' from 'std::__cxx11::basic_string<char>' to 'bool'
    6 |   if ( a = b) cout <<"H"<<endl;
      |        ~~^~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  char a,b;
  cin >>a>>b;
  if (a=='D'&&b=='D') {
    cout <<"H"<<endl;
  }
  if (a=='D'&&b=='H') {
    cout <<"D"<<endl;
  }
  if (a==H) {
    cout <<b<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'H' was not declared in this scope
   12 |   if (a==H) {
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  char a,b;
  cin >>a>>b;
  if (a==D&&b==D) {
    cout <<"H"<<endl;
  }
  if (a==D&&b==H) {
    cout <<"D"<<endl;
  }
  if (a==H) {
    cout <<b<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'D' was not declared in this scope
    6 |   if (a==D&&b==D) {
      |          ^
a.cc:9:10: error: 'D' was not declared in this scope
    9 |   if (a==D&&b==H) {
      |          ^
a.cc:9:16: error: 'H' was not declared in this scope
    9 |   if (a==D&&b==H) {
      |                ^
a.cc:12:10: error: 'H' was not declared in this scope
   12 |   if (a==H) {
      |          ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll          long long
#define mp	    make_pair
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define MOD        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define gcd(a,b)    __gcd((a),(b))
#define lcm(a,b)    ((a)*(b)) / gcd((a),(b))
#define rep(i,a,b)  for(int i=a;i<b;i++)
ll mult(ll a,ll b, ll p=MOD){return ((a%p)*(b%p))%p;}
ll multbig(ll a,ll b,ll mod){
    if(a==0 or b==0) return 0;
    if(a==1 or b==1) return (a*b)%mod;
    ll cur=multbig(a,b/2,mod);
    cur=(2*cur)%mod;
    if(b%2) cur=(cur+a)%mod;
    return cur;
}
ll add(ll a, ll b, ll p=MOD){return (a%p + b%p)%p;}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1LL) {if (k & 1LL) r = mult(r,n,p); n = mult(n,n,p);} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}
ll inv_euclid(ll a, ll m = MOD){ll m0 = m;ll y = 0, x = 1;if (m == 1)return 0;while (a > 1){ll q = a / m;ll t = m;m = a % m, a = t;t = y;y = x - q * y;x = t;}if (x < 0)x += m0;return x;}
#define N	55
void solve(){
	char a, b;
	cin>>a>>b;
	if(a=='H')
		cout<<b<<endl;
	else{
		if(b=='H') cout<<a<<endl;
		else cout<<'H'<<endl;
	}
}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
     t =1;
//     cin>>t;
    while(t--){
        solve();
    }
    return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
int main(){
  char a, b;
  scanf("%c%c", &a, &b);
  if(a==b)printf('H');
  else printf("D");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    5 |   if(a==b)printf('H');
      |                  ^~~
      |                  |
      |                  char
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string 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;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'H' was not declared in this scope
    8 |   if (a == H && b == H ){
      |            ^
a.cc:11:30: error: 'D' was not declared in this scope
   11 |     else if ( a == H && b == D ){
      |                              ^
Language: C++

#include <bits/stdc++.h>
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;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'H' was not declared in this scope
    8 |   if (a == H && b == H ){
      |            ^
a.cc:11:30: error: 'D' was not declared in this scope
   11 |     else if ( a == H && b == D ){
      |                              ^
Language: C++

#include <bits/stdc++.h>
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;
    }
}
 
  cout <<(N*800)-((N/15)*200) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'H' was not declared in this scope
    8 |   if (a == H && b == H ){
      |            ^
a.cc:11:30: error: 'D' was not declared in this scope
   11 |     else if ( a == H && b == D ){
      |                              ^
a.cc: At global scope:
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout <<(N*800)-((N/15)*200) << endl;
      |   ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  char a, b;
  cin >> a >> b;
  if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){
    cout << 'H' << endl;
  }
  else {
    cout << 'D' << endl;
  }
}
    

Compiler output:
a.cc:6:33: error: extended character ¥ is not valid in an identifier
    6 |   if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){
      |                                 ^
a.cc: In function 'int main()':
a.cc:6:33: error: 'a\U000000a5b' was not declared in this scope
    6 |   if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){
      |                                 ^~~
Language: C++

#include <bits/stdc++.h>
using  namespace  std;
using ll=long long;
int main(){
  char a,b;
  cin>>a>>b;
  if(a=='D'){
    if(b=='D')cout<<'H'<<endl;
    else cout<<'D'<<endl;
  }
  else cour<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'cour' was not declared in this scope
   11 |   else cour<<b<<endl;
      |        ^~~~
Language: C++

#include <bits/stdc++.h>
using  namespace  std;
using ll=long long;
int main(){
  bool h=true;
  char a,b;
  cin>>a>>b;
  if(a=='D'){
    if(b=='D')cout<<'H'<<endl;
    else cout<<'D'<<endl;
  }
  else cour<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'cour' was not declared in this scope
   12 |   else cour<<b<<endl;
      |        ^~~~
Language: C++

#include<iostream>
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;
    }
}






Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if ((a=="H" && b=="H") ||(a=="D" && b=="D")){
      |          ~^~~~~
a.cc:6:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if ((a=="H" && b=="H") ||(a=="D" && b=="D")){
      |                    ~^~~~~
a.cc:6:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if ((a=="H" && b=="H") ||(a=="D" && b=="D")){
      |                               ~^~~~~
a.cc:6:42: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if ((a=="H" && b=="H") ||(a=="D" && b=="D")){
      |                                         ~^~~~~
Language: C++

#include<bits/std++.h>
using namespace std;
int main(){
  char a,b;
  if(b=='H'){
    cout<<a<<end;:
  }
  
  else　if(b=='D'&&a=='D'){
    cout<<'H'<<endl;
  }

  else if(b=='D'&&a=='H'){
cout<<'D'<<endl;
  }
}



Compiler output:
a.cc:1:9: fatal error: bits/std++.h: No such file or directory
    1 | #include<bits/std++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    //文字列a
    int b;
    //文字列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 == "D"){
        cout << "H" << endl;
    } else if (a == "D" && b == "H"){
        cout << "D" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (a == "H" && b == "H"){
      |         ~~^~~~~~
a.cc:11:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (a == "H" && b == "H"){
      |                     ~~^~~~~~
a.cc:13:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     } else if (a == "H" && b == "D"){
      |                ~~^~~~~~
a.cc:13:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     } else if (a == "H" && b == "D"){
      |                            ~~^~~~~~
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     } else if (a == "D" && b == "D"){
      |                ~~^~~~~~
a.cc:15:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     } else if (a == "D" && b == "D"){
      |                            ~~^~~~~~
a.cc:17:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     } else if (a == "D" && b == "H"){
      |                ~~^~~~~~
a.cc:17:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     } else if (a == "D" && b == "H"){
      |                            ~~^~~~~~
Language: C++

#inlcude<bits/stdc++.h>
using namespace std;

int main(){
  
  char a,b; cin >> a >> b;
  
  if(b == 'H'){
    if(a == 'H'){
      cout << 'H' << endl;
    }
    else if(b == 'D'){
      cout << 'D' << endl;
    }
  }
  
  else if(b == 'D'){
    if(a == 'H'){
      cout << 'D' << endl;
    }
    else if(b == 'D'){
      cout << 'H' << endl;
    }
  }
  
  return 0;
}
  
  

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:13: error: 'cin' was not declared in this scope
    6 |   char a,b; cin >> a >> b;
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlcude<bits/stdc++.h>
a.cc:10:7: error: 'cout' was not declared in this scope
   10 |       cout << 'H' << endl;
      |       ^~~~
a.cc:10:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:22: error: 'endl' was not declared in this scope
   10 |       cout << 'H' << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlcude<bits/stdc++.h>
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout << 'D' << endl;
      |       ^~~~
a.cc:13:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |       cout << 'D' << endl;
      |                      ^~~~
a.cc:13:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:19:7: error: 'cout' was not declared in this scope
   19 |       cout << 'D' << endl;
      |       ^~~~
a.cc:19:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:22: error: 'endl' was not declared in this scope
   19 |       cout << 'D' << endl;
      |                      ^~~~
a.cc:19:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:22:7: error: 'cout' was not declared in this scope
   22 |       cout << 'H' << endl;
      |       ^~~~
a.cc:22:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:22: error: 'endl' was not declared in this scope
   22 |       cout << 'H' << endl;
      |                      ^~~~
a.cc:22:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
#include <cstdlib>
#include <string>
#include <algorithm>
using namespace std;

int comp(const void* a, const void* b){
	return *(int*)a - *(int*)b;
}

int main() {
	char a, b;
	cin >> a >> b;
	if(a == 'H'){
		if(b == 'H'){
			cout << "H" << endl;
		}else{
			cout << "D" << endl;
		}
	}else{
		if(b == 'H'){
			cout << "D" << endl;
		}else{
			cout << "H" << endl;
		}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: C++

#include <algorithm>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>

using namespace std;
using LLONG = long long;

int main()
{
    LLONG N;
    cin >> N;
    LLONG power = 1;
    for (LLONG i = 1; i <= N; ++i)
    {
        power *= i;
        power %= 1000000007;
    }
    cout << power << endl;

    return 0;
}#include <algorithm>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>

using namespace std;
using LLONG = long long;

int main()
{
    char a, b;
    cin >> a >> b;
    if (a == b)
    {
        cout << 'H' << endl;
    }
    else
    {
        cout << 'D' << endl;
    }

    return 0;
}

Compiler output:
a.cc:27:2: error: stray '#' in program
   27 | }#include <algorithm>
      |  ^
a.cc:27:3: error: 'include' does not name a type
   27 | }#include <algorithm>
      |   ^~~~~~~
a.cc:40:5: error: redefinition of 'int main()'
   40 | int main()
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main()
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    char a,b;
    cin >> a >> b;
    char ans;
    if(a == 'H'){
        ans = b;
    }else{
        if(b == 'H'){
            ans = 'D'
        }else{
            ans = 'H'
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '}' token
   12 |             ans = 'D'
      |                      ^
      |                      ;
   13 |         }else{
      |         ~             
a.cc:14:22: error: expected ';' before '}' token
   14 |             ans = 'H'
      |                      ^
      |                      ;
   15 |         }
      |         ~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  char a,b;
  cin>>a>>b;
  if(a == 'H'){
    if(b == 'H'){
      cout<<"H"<<endl;
      return 0;
    } else{
      cout<<"D"<<endl;
      return 0;
    }else {
      if(b =='H'){
        cout<<"D"<<endl;
        return 0;
      } else{
        cout <<"H"<<endl;
        return 0;
      }
    }
  }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected '}' before 'else'
   14 |     }else {
      |      ^~~~
a.cc:7:15: note: to match this '{'
    7 |   if(a == 'H'){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  char c,d;
  cin>>c>>d;
  if(c!=d) cout<<"D"<<endl;
  else cour<<"H"<<endl;
}
	


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'cour' was not declared in this scope
    9 |   else cour<<"H"<<endl;
      |        ^~~~
Language: C++

#include <stdio.h>

int main()
{
	char i,j,k;
	scanf("%c",&i);
	scanf("%c", &j);
	scanf_("%c", &k);
	if (i == 'H') {
		printf("%c\n",k);
	}
	else {
		if (k == 'H') {
			printf("D\n");
		}
		else {
			printf("H\n");
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_("%c", &k);
      |         ^~~~~~
      |         scanf
Language: C++

#include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    char a,b,x;
    cin >> a >> b;
    if(a=='H') x=b;
    else if(a=='D'&&b=='H') x='D';
    else x='H'
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected ';' before 'cout'
   13 |     else x='H'
      |               ^
      |               ;
   14 |     cout << x << endl;
      |     ~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  char a, b;
  cin >> a >> b;

  if(a == b) cout << 'H'
  else cout << 'D'; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before 'else'
    8 |   if(a == b) cout << 'H'
      |                         ^
      |                         ;
    9 |   else cout << 'D';
      |   ~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <list>
#include <queue>
using namespace std;

int inf = (1 << 30);
int mod = 1e9 + 7;
int64_t inf64 = (1LL << 60);

template <typename T>
T gcd(T a, T b) {
    if(b == 0) return a;
    else return gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
    T g = gcd(a, b);
    return a / g * b;
}

bool check(vector<int> a, int index, int key){
    if(a[index] >= key) return true;
    else return false;
}

int lower_bound(vector<int> a, int key){
    int left = -1, right = a.size();
    while(right - left > 1){
        int mid = left + (left + right) / 2;
        if(check(a, mid, key)) right = mid;
        else left = mid;
    }
    return right;
}

int main(){

    char 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;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:13: error: 'H' was not declared in this scope
   47 |     if(a == H && b == H) cout << "H" << endl;
      |             ^
a.cc:48:28: error: 'D' was not declared in this scope
   48 |     else if(a == H && b == D) cout << "D" << endl;
      |                            ^
Language: C++

#include <bits/stdc++.h>
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;
  }
}


Compiler output:
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") || (a == "D" && b == "D")){
      |       ~~^~~~~~
a.cc:8:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if((a == "H" && b == "H") || (a == "D" && b == "D")){
      |                   ~~^~~~~~
a.cc:8:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if((a == "H" && b == "H") || (a == "D" && b == "D")){
      |                                 ~~^~~~~~
a.cc:8:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if((a == "H" && b == "H") || (a == "D" && b == "D")){
      |                                             ~~^~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
  char a, b; cin >> a >> b;
  if(a == 'H')
  else if(b == 'H') b = 'D';
  else b = 'H';
  cout << b << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected primary-expression before 'else'
    8 |   else if(b == 'H') b = 'D';
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  char a, b; cin >> a >> b;
  if(a == 'H')
  else if(b == 'H') b = 'D';
  else b = 'H';
  cout << b << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before 'else'
    7 |   else if(b == 'H') b = 'D';
      |   ^~~~
Language: 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")
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: 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";
}

Compiler output:
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";
      |                     ~^~~~~
Language: 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;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'ednl' was not declared in this scope
   11 |       cout<<'D'<<ednl;
      |                  ^~~~
Language: 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;
}

Compiler output:
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';
      |                 ~~~~~~~^~~~
Language: C++

#include<iostream>

using namespace std;

int main(){
  char a,b;
  cin>>a>>b;
  cout<<(a==b?"H":"D")<<endl;
  retrun 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'retrun' was not declared in this scope
    9 |   retrun 0;
      |   ^~~~~~
Language: 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;
}


Compiler output:
a.cc:85:3: error: expected unqualified-id before 'return'
   85 |   return 0;
      |   ^~~~~~
a.cc:86:1: error: expected declaration before '}' token
   86 | }
      | ^
Language: 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;
}

Compiler output:
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")) {
      |                              ~^~~~~
Language: 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");
		}
	}
	
	
	
}



Compiler output:
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){
      |                       ^
Language: 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;
}

Compiler output:
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;
      |                    ^~~~
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: 'N' was not declared in this scope
   26 |     vector<int> A(N,0);
      |                   ^
Language: 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';
      }
}

Compiler output:
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() {
      |            ^
Language: 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;
}

Compiler output:
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;
      |                 ^
Language: 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;
}


Compiler output:
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;
      |                          ~~~^~~~~~
Language: 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");
  }
}

Compiler output:
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"){
      |       ~^~~~~
Language: 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;
}


Compiler output:
a.cc:4:10: error: expected unqualified-id before ')' token
    4 | int void(){
      |          ^