Language: Java

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

typedef long long ll;
typedef long double Double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

// chmax, chmin
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;
}

void solve(std::vector<long long> H) {}

int main() {
  std::vector<long long> H(2);
  for (int i = 0; i < 2; i++) {
    scanf("%lld", &H[i]);
  }
  solve(std::move(H));
  return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:4: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:5: error: class, interface, enum, or record expected
typedef long double Double;
^
Main.java:6: error: illegal character: '#'
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
^
Main.java:6: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
        ^
Main.java:6: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
                                  ^
Main.java:6: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
                                                ^
Main.java:9: error: '{' expected
template <class T> inline bool chmax(T &a, T b) {
                 ^
Main.java:10: error: illegal start of type
  if (a < b) {
  ^
Main.java:10: error: > or ',' expected
  if (a < b) {
           ^
Main.java:14: error: illegal start of type
  return 0;
  ^
Main.java:16: error: class, interface, enum, or record expected
template <class T> inline bool chmin(T &a, T b) {
^
Main.java:16: error: '{' expected
template <class T> inline bool chmin(T &a, T b) {
                 ^
Main.java:17: error: illegal start of type
  if (a > b) {
  ^
Main.java:17: error: <identifier> expected
  if (a > b) {
       ^
Main.java:17: error: <identifier> expected
  if (a > b) {
           ^
Main.java:21: error: illegal start of type
  return 0;
  ^
Main.java:24: error: unnamed classes are a preview feature and are disabled by default.
void solve(std::vector<long long> H) {}
^
  (use --enable-preview to enable unnamed classes)
Main.java:24: error: <identifier> expected
void solve(std::vector<long long> H) {}
              ^
Main.java:24: error: class, interface, enum, or record expected
void solve(std::vector<long long> H) {}
                      ^
Main.java:28: error: class, interface, enum, or record expected
  for (int i = 0; i < 2; i++) {
  ^
Main.java:28: error: class, interface, enum, or record expected
  for (int i = 0; i < 2; i++) {
                  ^
Main.java:28: error: class, interface, enum, or record expected
  for (int i = 0; i < 2; i++) {
                         ^
Main.java:30: error: class, interface, enum, or record expected
  }
  ^
Main.java:32: error: class, interface, enum, or record expected
  return 0;
  ^
Main.java:33: error: class, interface, enum, or record expected
}
^
27 errors