criyle/codenet-compile-errors huggingface dataset:
Language: 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";
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(a=="H"&&b=="H")cout<<"H";
      |            ~^~~~~
a.cc:17:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(a=="H"&&b=="H")cout<<"H";
      |                    ~^~~~~
a.cc:18:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         if(a=="H"&&b=="D")cout<<"D";
      |            ~^~~~~
a.cc:18:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         if(a=="H"&&b=="D")cout<<"D";
      |                    ~^~~~~
a.cc:19:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if(a=="D"&&b=="H")cout<<"D";
      |            ~^~~~~
a.cc:19:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if(a=="D"&&b=="H")cout<<"D";
      |                    ~^~~~~
a.cc:20:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |         if(a=="D"&&b=="D")cout<<"H";
      |            ~^~~~~
a.cc:20:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |         if(a=="D"&&b=="D")cout<<"H";
      |                    ~^~~~~
Language: 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";
}

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

#include <iostream>
#include <algorithm>
#include <string>
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:9:25: error: expected ';' before '}' token
    9 | else cout << "D" << endl
      |                         ^
      |                         ;
   10 | }
      | ~
Language: C++

use std::env;
use std::io::*;
use std::str::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let s = stdin.bytes().map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}

fn main() {
    // main の引数
    /*
        引数なしのときargs.len() = 1;
    */
    let args: Vec<String> = env::args().collect();

    let a = read::<String>().chars().collect();
    let b = read::<String>().chars().collect();

    if a[0] == b[0] {
        println!("H");
    }else {
        println!("D");
    }
}

/*
AtCoder AtCoDeer
H H 1
H D 0
D H 0
D D 1
*/

Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::env;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::io::*;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::str::*;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read<T: FromStr>() -> T {
      | ^~
a.cc:14:1: error: 'fn' does not name a type
   14 | fn main() {
      | ^~
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  String a = sc.next();
  String b = sc.next();
  if(a == "H")System.out.println(b);
  else if(a == "D" && b == "H")System.println("D");
  else System.out.println("H");
}
}

Compiler output:
Main.java:8: error: cannot find symbol
  else if(a == "D" && b == "H")System.println("D");
                                     ^
  symbol:   method println(String)
  location: class System
1 error
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:28: error: expected ';' before '}' token
    6 |                 printf("H")
      |                            ^
      |                            ;
    7 |         }else{
      |         ~                   
main.c:8:28: error: expected ';' before '}' token
    8 |                 printf("D")
      |                            ^
      |                            ;
    9 |         }
      |         ~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String args[]) {
        FastReader sc = new FastReader();
        String a = sc.next();
        String b = sc.next();
        if (a.equals("H") && b.equals("H") || a.equals("D") && b.equals("D"))
            System.out.println("H");
        else
            System.out.println("D");
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.StringTokenizer;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define pb push_back
using namespace std;
const int INF = 1e9;
typedef long long ll;

int main(){
  int x,y;
  string s,t;
  cin >> s >> t;
  x = 1;
  if(s == "D")
    x *= -1;
  if(t == "D")
    x *= -1;
  if(x == 1)
    cout << "H" << endl;
  else
    cout << "D" << endl;
  
  return 0;

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

#include <stdio.h>

int main(void){char a, b;scanf("%c %c", &a, &b);if(a == 'H'){printf("%c\n", b);}else if(b == 'H'){printf("B\n");}else{printf("H"\n);}return 0;}

Compiler output:
a.cc:3:129: error: stray '\' in program
    3 | int main(void){char a, b;scanf("%c %c", &a, &b);if(a == 'H'){printf("%c\n", b);}else if(b == 'H'){printf("B\n");}else{printf("H"\n);}return 0;}
      |                                                                                                                                 ^
a.cc: In function 'int main()':
a.cc:3:129: error: expected ')' before 'n'
    3 | int main(void){char a, b;scanf("%c %c", &a, &b);if(a == 'H'){printf("%c\n", b);}else if(b == 'H'){printf("B\n");}else{printf("H"\n);}return 0;}
      |                                                                                                                             ~   ^~
      |                                                                                                                                 )
Language: C++

#include <iostream>
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: In function 'int main()':
a.cc:5:20: error: 'A' was not declared in this scope
    5 |   char a,b; cin >> A >> b;
      |                    ^
Language: C++

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

int main(void) {
    int a, b;
    bool ans;
    cin >> a >> b;
    ans = (b == 'H' ? true : false);
    if (a == 'D') ans != ans;
    cout << (ans == true ? "H" ? "D") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: expected ':' before ')' token
   10 |     cout << (ans == true ? "H" ? "D") << endl;
      |                                     ^
      |                                     :
a.cc:10:37: error: expected primary-expression before ')' token
a.cc:10:37: error: expected ':' before ')' token
   10 |     cout << (ans == true ? "H" ? "D") << endl;
      |                                     ^
      |                                     :
a.cc:10:37: error: expected primary-expression before ')' token
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;
//static const long long INF = 9223372000000000000;
//static const long long INF = 9223372000000000000/2;
//static const int INF = 1000010000;
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define np next_permutation
#define pq priority_queue
#define SZ(a) int((a).size())
#define LEN(a) int((a).length())
#define MAX(a,b,c) max((a),max((b),(c)))
#define MIN(a,b,c) min((a),min((b),(c)))
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REP1(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREP1(i,x) for(int i=((int)(x));i>0;i--)
//#define int ll

signed main(){
    char a,b;
    scanf("%c %c",&a,&b);
    (a==b) ? putc("H") : putc("D");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   42 |     (a==b) ? putc("H") : putc("D");
      |                   ^~~
      |                   |
      |                   const char*
a.cc:42:18: error: too few arguments to function 'int putc(int, FILE*)'
   42 |     (a==b) ? putc("H") : putc("D");
      |              ~~~~^~~~~
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:612:12: note: declared here
  612 | extern int putc (int __c, FILE *__stream) __nonnull ((2));
      |            ^~~~
a.cc:42:31: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   42 |     (a==b) ? putc("H") : putc("D");
      |                               ^~~
      |                               |
      |                               const char*
a.cc:42:30: error: too few arguments to function 'int putc(int, FILE*)'
   42 |     (a==b) ? putc("H") : putc("D");
      |                          ~~~~^~~~~
/usr/include/stdio.h:612:12: note: declared here
  612 | extern int putc (int __c, FILE *__stream) __nonnull ((2));
      |            ^~~~
Language: C++

int main(){
	char a,b;
	scanf("%c%c",&a,&b);
	if(a=='H'&&b=='H')printf("H\n");
	else if(a=='D'&&b=='D')printf("H\n");
	else printf("D\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%c%c",&a,&b);
      |         ^~~~~
a.cc:4:27: error: 'printf' was not declared in this scope
    4 |         if(a=='H'&&b=='H')printf("H\n");
      |                           ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:5:32: error: 'printf' was not declared in this scope
    5 |         else if(a=='D'&&b=='D')printf("H\n");
      |                                ^~~~~~
a.cc:5:32: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:6:14: error: 'printf' was not declared in this scope
    6 |         else printf("D\n");
      |              ^~~~~~
a.cc:6:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C

#include<stdio.h>

 int main(void){
 

    char a,b;

    scanf("%s %s",&a,&b);
 
    if( a == H || a == D && b == H || b == D ){
       if( a == H && b == H){
       printf("H");     
       }
       
       else if( a == H && b == D){
       printf("D");
       }
       
       else if( a == D && b == H){
       printf("D");
       }
   
       else if( a == D && b == D){
       printf("H");
       }
    }else{
         printf("error");
     }
 }

Compiler output:
main.c: In function 'main':
main.c:10:14: error: 'H' undeclared (first use in this function)
   10 |     if( a == H || a == D && b == H || b == D ){
      |              ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:24: error: 'D' undeclared (first use in this function)
   10 |     if( a == H || a == D && b == H || b == D ){
      |                        ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:6:23: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |     if(a=='H'&&b=='H')print("H\n");
      |                       ^~~~~
      |                       printf
Language: C++

MOD=1000000007

def solve():
    a,b=map(str,input().split())
    if a=='H':
        print(b)
    else:
        if b=='H':
            print('D')
        else:
            print('H')

if __name__ == "__main__":
    solve()

Compiler output:
a.cc:1:1: error: 'MOD' does not name a type
    1 | MOD=1000000007
      | ^~~
Language: C++

data = input().split()

if data[0] == 'D' :
    if data[1] == 'D' :
        data[1] = 'H'
    else :
        data[1] = 'D'
print(data[1])

Compiler output:
a.cc:1:1: error: 'data' does not name a type
    1 | data = input().split()
      | ^~~~
Language: C++


#include<iostream>
int main() {
  int W, a, b;
  std::cin >> W >> a >> b;

  int bigger = a => b ?? a : b;
  int smaller = a > b ?? b : a;

  if(bigger - (smaller + W) =< 0){
    std::cout << 0;
  }else{
    std::cout << bigger - (smaller + W);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before '>' token
    7 |   int bigger = a => b ?? a : b;
      |                   ^
a.cc:7:24: error: expected primary-expression before '?' token
    7 |   int bigger = a => b ?? a : b;
      |                        ^
a.cc:7:31: error: expected ':' before ';' token
    7 |   int bigger = a => b ?? a : b;
      |                               ^
      |                               :
a.cc:7:31: error: expected primary-expression before ';' token
a.cc:8:24: error: expected primary-expression before '?' token
    8 |   int smaller = a > b ?? b : a;
      |                        ^
a.cc:8:31: error: expected ':' before ';' token
    8 |   int smaller = a > b ?? b : a;
      |                               ^
      |                               :
a.cc:8:31: error: expected primary-expression before ';' token
a.cc:10:30: error: expected primary-expression before '<' token
   10 |   if(bigger - (smaller + W) =< 0){
      |                              ^
Language: C++

#include<iostream>
char rev(char c){
  if(c=='H'){
    return 'D'
  }else{
    return 'H'
  }
}

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

  if(a=='H'){
    std::cout << b;
  }else{
    std::cout << rev(b);
  }

  return 0;
}


Compiler output:
a.cc: In function 'char rev(char)':
a.cc:4:15: error: expected ';' before '}' token
    4 |     return 'D'
      |               ^
      |               ;
    5 |   }else{
      |   ~            
a.cc:6:15: error: expected ';' before '}' token
    6 |     return 'H'
      |               ^
      |               ;
    7 |   }
      |   ~
Language: C++

#include<iostream>
char rev(char c){
  if(c=='H'){
    return 'D'
  }else{
    return 'H'
  }
}

void main() {
  char a, b;
  std::cin >> a >> b;

  if(a=='H'){
    std::cout << b;
  }else{
    std::cout << rev(b);
  }
}


Compiler output:
a.cc: In function 'char rev(char)':
a.cc:4:15: error: expected ';' before '}' token
    4 |     return 'D'
      |               ^
      |               ;
    5 |   }else{
      |   ~            
a.cc:6:15: error: expected ';' before '}' token
    6 |     return 'H'
      |               ^
      |               ;
    7 |   }
      |   ~            
a.cc: At global scope:
a.cc:10:1: error: '::main' must return 'int'
   10 | void main() {
      | ^~~~
Language: C++

#include<iosteam>
char rev(char c){
  if(c=='H'){
    return 'D'
  }else{
    return 'H'
  }
}

void main() {
  char a, b;
  std::cin >> a >> b;

  if(a=='H'){
    std::cout << b;
  }else{
    std::cout << rev(b);
  }
}


Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
 
public 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.println(b);
    }else if(b = H) {
      System.out.println(D);
    }else {
      System.out.println(H);
    }
 
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
    if(a = H) {
           ^
  symbol:   variable H
  location: class Main
Main.java:10: error: incompatible types: String cannot be converted to boolean
    if(a = H) {
         ^
Main.java:12: error: cannot find symbol
    }else if(b = H) {
                 ^
  symbol:   variable H
  location: class Main
Main.java:12: error: incompatible types: String cannot be converted to boolean
    }else if(b = H) {
               ^
Main.java:13: error: cannot find symbol
      System.out.println(D);
                         ^
  symbol:   variable D
  location: class Main
Main.java:15: error: cannot find symbol
      System.out.println(H);
                         ^
  symbol:   variable H
  location: class Main
6 errors
Language: Java

import java.util.Scanner;
 
public 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.println(b);
    }else if(b = "H") {
      System.out.println("D");
    }else {
      System.out.println("H");
    }
 
  }
}

Compiler output:
Main.java:10: error: incompatible types: String cannot be converted to boolean
    if(a = "H") {
         ^
Main.java:12: error: incompatible types: String cannot be converted to boolean
    }else if(b = "H") {
               ^
2 errors
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main(String args[]) {
    
    Scanner sc = new Scanner(System.in);
    char a = sc.nextLine();
    char b = sc.nexrLine();
 
    if(a = "H") 
      System.out.println(b);
    else if(b = "H") 
      System.out.println("D");
    else 
      System.out.println("H");
    
 
  }
}

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to char
    char a = sc.nextLine();
                        ^
Main.java:8: error: cannot find symbol
    char b = sc.nexrLine();
               ^
  symbol:   method nexrLine()
  location: variable sc of type Scanner
Main.java:10: error: incompatible types: String cannot be converted to char
    if(a = "H") 
           ^
Main.java:10: error: incompatible types: char cannot be converted to boolean
    if(a = "H") 
         ^
Main.java:12: error: incompatible types: String cannot be converted to char
    else if(b = "H") 
                ^
Main.java:12: error: incompatible types: char cannot be converted to boolean
    else if(b = "H") 
              ^
6 errors
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main(String args[]) {
    
    Scanner sc = new Scanner(System.in);
    char a = sc.nextLine();
    char b = sc.nexrLine();
 
    if(a = "H") {
      System.out.println(b);
    }else if(b = "H") {
      System.out.println("D");
    }else {
      System.out.println("H");
    }
 
  }
}

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to char
    char a = sc.nextLine();
                        ^
Main.java:8: error: cannot find symbol
    char b = sc.nexrLine();
               ^
  symbol:   method nexrLine()
  location: variable sc of type Scanner
Main.java:10: error: incompatible types: String cannot be converted to char
    if(a = "H") {
           ^
Main.java:10: error: incompatible types: char cannot be converted to boolean
    if(a = "H") {
         ^
Main.java:12: error: incompatible types: String cannot be converted to char
    }else if(b = "H") {
                 ^
Main.java:12: error: incompatible types: char cannot be converted to boolean
    }else if(b = "H") {
               ^
6 errors
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main(String args[]) {
    
    Scanner sc = new Scanner(System.in);
    char a = sc.nextLine();
    char b = sc.nexrLine();
 
    if(a = "H") {
      System.out.println(b);
    }else if(b = "H") {
      System.out.println("D");
    else
      System.out.println("H");
    }

  }
}

Compiler output:
Main.java:14: error: 'else' without 'if'
    else
    ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String args[]) {
    
    Scanner sc = new Scanner(System.in);
    char a = sc.nextLine();
    char b = sc.nexrLine();

    if(a = "H") {
      System.out.println(b);
    }else if(b = "H") {
      System.out.println("D");
    else
      System.out.println("H");
  }
}

Compiler output:
Main.java:14: error: 'else' without 'if'
    else
    ^
Main.java:17: error: reached end of file while parsing
}
 ^
2 errors
Language: C

#include <stdio.h>
int main (void)
{
int a,b,in;
in=scanf("%d%d",&a,&b);
if("a==b"){
        
        printf("H");}
elif ("a=H && b=D"){
        printf("H");}
else
       {printf("D");}

return 0;

}        

Compiler output:
main.c: In function 'main':
main.c:9:1: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
    9 | elif ("a=H && b=D"){
      | ^~~~
main.c:9:20: error: expected ';' before '{' token
    9 | elif ("a=H && b=D"){
      |                    ^
      |                    ;
Language: C

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

return 0;

}        

Compiler output:
main.c: In function 'main':
main.c:5:1: error: 'in' undeclared (first use in this function); did you mean 'int'?
    5 | in=scanf("%d%d",&a,&b);
      | ^~
      | int
main.c:5:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
	string a,t;
	cin>>a>>t;
	if(a=="H"&&t=="H"){
		cout<<"H"<<endl;
		}
	if(a=="D"&&t=="H"){
		cout<<"D"<<endl;
	}
	if(a=="H"&&t=="D"){
	cout<<"D"<<endl;
	}
	if(a=="D"&&t=="D"){
	cout<<"H"<<endl;
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected '}' at end of input
   19 |         return 0;
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>

int main(){
	char 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:5:9: 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:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout<<"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:7:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |                 cout<<"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)
      |     ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout<<"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:10:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |                 cout<<"D"<<endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;
public class Sample {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scan = new Scanner(System.in);
	String a = scan.next();
	String b =scan.next();
	int c = 0;
	int d = 0;
	if(a.equals("H")){
		c =0;
	} else if(a.equals("D")){
		 c = 1;
	}
	if(b.equals("H")){
		 d = 0;
	}else if(b.equals("D")){
		 d = 1;
	}
	if((c+d)%2==0){
		System.out.println("H");
	}else{
		System.out.println("D");
	}
 }
}

Compiler output:
Main.java:2: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
       ^
1 error
Language: C++

#include <iostream>
#include <algorithm>

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';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |  cin >> a>> b;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:23: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |  if(a=='H' && b=='H') 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:8:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   if(a=='H' && b=='D') 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:9:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(a=='D' && b=='H') 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:10:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   if(a=='D' && b=='D') 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 <iostream>
#include <algorithm>

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';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |  cin >> a, b;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:23: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |  if(a=='H' && b=='H') 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:8:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   if(a=='H' && b=='D') 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:9:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(a=='D' && b=='H') 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:10:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   if(a=='D' && b=='D') 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 <cstdio>
#include <algorithm>
char a,b;

int main(){
  scanf("%s",&a);
  scanf("%s",&b);
  int x,y;
  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';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'cout' was not declared in this scope
    9 |   if(a=='H' && b=='H') cout << 'H';
      |                        ^~~~
a.cc:10:24: error: 'cout' was not declared in this scope
   10 |   if(a=='H' && b=='D') cout << 'D';
      |                        ^~~~
a.cc:11:24: error: 'cout' was not declared in this scope
   11 |   if(a=='D' && b=='H') cout << 'D';
      |                        ^~~~
a.cc:12:24: error: 'cout' was not declared in this scope
   12 |   if(a=='D' && b=='D') cout << 'H';
      |                        ^~~~
Language: C++

a,b = map(int, raw_input().split())
if a == "H":
	print b
if a == "D":
	if b == "H":
		print "D"
	else:
		print "H"

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b = map(int, raw_input().split())
      | ^
Language: C++

using System;
using System.Linq;
using System.Numerics;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Text.RegularExpressions;

namespace CsTest
{
    class Program
    {
        static void Main()
        {
            int[] ab = AtCoder.ReadInt32Array();
            int a = ab[0];
            int b = ab[1];
            
            Console.WriteLine(a == b ? 'H' : 'D');
        }
    }

    public class AtCoder
    {
        public static string[] ReadStringArray() => Console.ReadLine().Split(Array.Empty<char>(), StringSplitOptions.RemoveEmptyEntries);
        public static int[] ReadInt32Array() => ReadStringArray().Select(s => int.Parse(s)).ToArray();
        public static long[] ReadInt64Array() => ReadStringArray().Select(s => long.Parse(s)).ToArray();
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Numerics;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Text;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.IO;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'System'
    8 | using System.Diagnostics;
      |       ^~~~~~
a.cc:9:7: error: expected nested-name-specifier before 'System'
    9 | using System.Text.RegularExpressions;
      |       ^~~~~~
a.cc:23:6: error: expected ';' after class definition
   23 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void CsTest::Program::Main()':
a.cc:17:16: error: structured binding declaration cannot have type 'int'
   17 |             int[] ab = AtCoder.ReadInt32Array();
      |                ^~
a.cc:17:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:17:16: error: empty structured binding declaration
a.cc:17:19: error: expected initializer before 'ab'
   17 |             int[] ab = AtCoder.ReadInt32Array();
      |                   ^~
a.cc:18:21: error: 'ab' was not declared in this scope; did you mean 'a'?
   18 |             int a = ab[0];
      |                     ^~
      |                     a
a.cc:21:13: error: 'Console' was not declared in this scope
   21 |             Console.WriteLine(a == b ? 'H' : 'D');
      |             ^~~~~~~
a.cc: At global scope:
a.cc:25:5: error: expected unqualified-id before 'public'
   25 |     public class AtCoder
      |     ^~~~~~
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;}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'H' was not declared in this scope
    7 |     if(a==b){cout << H << endl;}
      |                      ^
a.cc:8:18: error: 'D' was not declared in this scope
    8 |     else{cout << D << endl;}
      |                  ^
Language: C++

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

Compiler output:
a.cc:25:1: error: 'Submission' does not name a type
   25 | Submission
      | ^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{     
      int a,b;
      cin>>a>>b;
      while(a!="H"||a!="D"||b!="H"||b!="D")
      {
           cin>>a>>b;
      }
      if(a=="H") 
      {
          cout<<b;
      }
      if(a=="D")
      {
            if(b=="H")
            {  cout<< a; }
             else
            {cout<<"H";} 
 
       }
       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 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |             ~^~~~~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                     ~^~~~~
a.cc:7:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                             ~^~~~~
a.cc:7:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                                     ~^~~~~
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if(a=="H")
      |          ~^~~~~
a.cc:15:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       if(a=="D")
      |          ~^~~~~
a.cc:17:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |             if(b=="H")
      |                ~^~~~~
a.cc:23:17: error: expected '}' at end of input
   23 |        return 0;
      |                 ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++


#include<iostream>
int main()
{     
      int a,b;
      cin>>a>>b;
      while(a!="H"||a!="D"||b!="H"||b!="D")
      {
           cin>>a>>" ">>b;
      }
      if(a=="H") 
      {
          cout<<b;
      }
      if(a=="D")
      {
            if(b=="H")
            {  cout<< a; }
             else
            {cout<<"H";} 
 
       }
       return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |       cin>>a>>b;
      |       ^~~
      |       std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |             ~^~~~~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                     ~^~~~~
a.cc:7:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                             ~^~~~~
a.cc:7:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |       while(a!="H"||a!="D"||b!="H"||b!="D")
      |                                     ~^~~~~
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if(a=="H")
      |          ~^~~~~
a.cc:13:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |           cout<<b;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       if(a=="D")
      |          ~^~~~~
a.cc:17:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |             if(b=="H")
      |                ~^~~~~
a.cc:18:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |             {  cout<< a; }
      |                ^~~~
      |                std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |             {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++

     while(a!="H"||a!="D"||b!="H"||b!="D")
      {
           cin>>a>>" ">>b;
      }
      if(a=="H") 
      {
          cout<<b;
      }
      if(a=="D")
      {
            if(b=="H")
            {  cout<< a; }
             else
            {cout<<"H";} 
 
       }
 

Compiler output:
a.cc:1:6: error: expected unqualified-id before 'while'
    1 |      while(a!="H"||a!="D"||b!="H"||b!="D")
      |      ^~~~~
a.cc:5:7: error: expected unqualified-id before 'if'
    5 |       if(a=="H")
      |       ^~
a.cc:9:7: error: expected unqualified-id before 'if'
    9 |       if(a=="D")
      |       ^~
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std
int main()
{
   int  a,b,w;
   cin>>w>>a>>b;
   cout<<min(fabs(b-a),fabs(b-a-w));
   return 0;
}

Compiler output:
a.cc:4:20: error: expected ';' before 'int'
    4 | using namespace std
      |                    ^
      |                    ;
    5 | int main()
      | ~~~
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
using namespace
int main()
{
   int  a,b,w;
   cin>>w>>a>>b;
   cout<<max(fabs(b-a),fabs(b-a-w));
   return 0;
}

Compiler output:
a.cc:5:1: error: expected identifier before 'int'
    5 | int main()
      | ^~~
a.cc:4:16: error: expected ';' before 'int'
    4 | using namespace
      |                ^
      |                ;
    5 | int main()
      | ~~~             
a.cc: In function 'int main()':
a.cc:8:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |    cin>>w>>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:9:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |    cout<<max(fabs(b-a),fabs(b-a-w));
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |    cout<<max(fabs(b-a),fabs(b-a-w));
      |          ^~~
      |          std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: 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:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |       cout<<b<<endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |       cout<<b<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     else if (b=='H') cout<<"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:8:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     else if (b=='H') cout<<"D"<<endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |             else cout<<"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:9:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |             else cout<<"H"<<endl;
      |                             ^~~~
      |                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~