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

#include"iostream"
 
using namespace std;
int judge[2];
int main(){
 string s;
  cin>>s;
  for(char i:s)
     judge[i-'A']=1;
  bool ans=true;
  for(int i=0;i<2;i++)
     if(judge[i]==0)
         ans=false;
  if(flag)  cout<<"YES"<,endl;
  else   cout<<"NO"<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: 'flag' was not declared in this scope
   14 |   if(flag)  cout<<"YES"<,endl;
      |      ^~~~
a.cc:14:25: error: expected primary-expression before ',' token
   14 |   if(flag)  cout<<"YES"<,endl;
      |                         ^
Language: C++

#include"iostream"

using namespace std;
int judge[2];
int main(){
 string s;
  cin>>s;
  for(char i:s)
     judge[i-'A']=1;
  bool ans=true;
  for(int i=0;i<2;i++)
     if(judge[i]==0)
         ans=fasle;
  if(flag)  cout<<"YES"<,endl;
  else   cout<<"NO"<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'fasle' was not declared in this scope
   13 |          ans=fasle;
      |              ^~~~~
a.cc:14:6: error: 'flag' was not declared in this scope
   14 |   if(flag)  cout<<"YES"<,endl;
      |      ^~~~
a.cc:14:25: error: expected primary-expression before ',' token
   14 |   if(flag)  cout<<"YES"<,endl;
      |                         ^
Language: C++

#include <iostream>
#incldue <string>

int main()
{
  std::string s {};
  std::cin >> s;
  if(s == "AAA" or s == "BBB")
    std::cout << "NO";
  else std::cout << "YES";
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incldue; did you mean #include?
    2 | #incldue <string>
      |  ^~~~~~~
      |  include
Language: C++

#include <iostream>
#include <string>
#include <algorithms>

void A(std::string& s)
{
    if((std::adjacent_find(s.begin(), s.end(), [](auto a, auto b){return a != b;}) != s.end()))
        std::cout << "YES";
    else std::cout << "No";
}
int main()
{
     std::string s;
    std::cin >> s;
    A(s);
}

Compiler output:
a.cc:3:10: fatal error: algorithms: No such file or directory
    3 | #include <algorithms>
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main();
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  _main();
}
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

ll N, A, B;
//---------------------------------------------------------------------------------------------------
void _main() {
        std::cin >> N >> A >> B;

        ll len = A + B;
        ll ans = (N / len) * A + min(A, N % len);

        std::cout << ans << std::endl;
}


Compiler output:
a.cc:13:39: error: 'INT_MAX' was not declared in this scope
   13 | typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
      |                                       ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 |
Language: C++

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

int main()
{
    string s;
    cin >> s;

    if(s == "AAA" || s == "BBB")
    {
        cout << "No" << endl;
    }
    else
    {
        cout << "Yes" << endl;
    }<
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected primary-expression before '<' token
   16 |     }<
      |      ^
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
Language: C++

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

int main()
{
    string s;
    cin >> s;

    if(s == "AAA" || s === "BBB")
    {
        cout << "No" << endl;
    }
    else
    {
        count << "Yes" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before '=' token
    9 |     if(s == "AAA" || s === "BBB")
      |                          ^
a.cc:15:15: error: invalid operands of types '<unresolved overloaded function type>' and 'const char [4]' to binary 'operator<<'
   15 |         count << "Yes" << endl;
      |         ~~~~~~^~~~~~~~
Language: C

  int i;
  char s[4];
  char c;

  // 標準入力からの値取得
  scanf("%s\n", s);

  // 計算
  c = s[0];
  for (i = 0; s[i] != '\0'; i++) {
    if (c != s[i]) {
      break;
    }
  }

  // 出力
  if (i != 4)
    printf("Yes%d\n");
  else
    printf("No\n");
  return 0;

Compiler output:
main.c:6:9: error: expected declaration specifiers or '...' before string constant
    6 |   scanf("%s\n", s);
      |         ^~~~~~
main.c:6:17: error: expected declaration specifiers or '...' before 's'
    6 |   scanf("%s\n", s);
      |                 ^
main.c:9:3: warning: data definition has no type or storage class
    9 |   c = s[0];
      |   ^
main.c:9:3: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:9:3: error: conflicting types for 'c'; have 'int'
main.c:3:8: note: previous declaration of 'c' with type 'char'
    3 |   char c;
      |        ^
main.c:9:7: error: initializer element is not constant
    9 |   c = s[0];
      |       ^
main.c:10:3: error: expected identifier or '(' before 'for'
   10 |   for (i = 0; s[i] != '\0'; i++) {
      |   ^~~
main.c:10:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '!=' token
   10 |   for (i = 0; s[i] != '\0'; i++) {
      |                    ^~
main.c:10:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   10 |   for (i = 0; s[i] != '\0'; i++) {
      |                              ^~
main.c:17:3: error: expected identifier or '(' before 'if'
   17 |   if (i != 4)
      |   ^~
main.c:19:3: error: expected identifier or '(' before 'else'
   19 |   else
      |   ^~~~
main.c:21:3: error: expected identifier or '(' before 'return'
   21 |   return 0;
      |   ^~~~~~
Language: C++

import java.util.Scanner;

public class Main{

    public static void main(String[] args){

        Scanner scan = new Scanner(System.in);
        String str = scan.next();

        if(str.charAt(0)==str.charAt(1) && str.charAt(1)==str.charAt(2)){
            System.out.println("No");
        }
        else System.out.println("Yes");
    }
}


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

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string s; cin>>s;
  int check=0;
  for(int i=0;i<s.size();i++)
    if(s[i]=='A)check++;
       
   if(check==0||check==3)cout<<"No";
   else cout<<"Yes";
       
       return 0;
}

Compiler output:
a.cc:9:14: warning: missing terminating ' character
    9 |     if(s[i]=='A)check++;
      |              ^
a.cc:9:14: error: missing terminating ' character
    9 |     if(s[i]=='A)check++;
      |              ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:4: error: expected primary-expression before 'if'
   11 |    if(check==0||check==3)cout<<"No";
      |    ^~
a.cc:12:4: error: expected primary-expression before 'else'
   12 |    else cout<<"Yes";
      |    ^~~~
a.cc:11:37: error: expected ')' before 'else'
   11 |    if(check==0||check==3)cout<<"No";
      |                                     ^
      |                                     )
   12 |    else cout<<"Yes";
      |    ~~~~                              
a.cc:9:7: note: to match this '('
    9 |     if(s[i]=='A)check++;
      |       ^
Language: C++

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

int main() {
  string s;
  cin>>s;
  if(s==AAA||s==BBB)cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'AAA' was not declared in this scope
    7 |   if(s==AAA||s==BBB)cout<<"No"<<endl;
      |         ^~~
a.cc:7:17: error: 'BBB' was not declared in this scope
    7 |   if(s==AAA||s==BBB)cout<<"No"<<endl;
      |                 ^~~
Language: Java

import java.util.*;
public class A
{
public static void main(String []args)
{
   Scanner s=new Scanner(System.in);
   String st=s.next();
   char ch[]=st.toCharArray();
   char c=ch[0];
   boolean b=true;
   for(int i=1;i<st.length();i++)
   {
     if(ch[i]!=c)
     {
       b=false;
       break;
     }
   }
  if(b)
    System.out.println("NO");
  else
    System.out.println("YES");
}
}
    

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

#include<stdio.h>
int main(void)
{
  char s[3];
  scanf("%s",&s);
  if(s==AAA || s==BBB){
    puts("No");
  }
  else{
    puts("Yes");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'AAA' was not declared in this scope
    6 |   if(s==AAA || s==BBB){
      |         ^~~
a.cc:6:19: error: 'BBB' was not declared in this scope
    6 |   if(s==AAA || s==BBB){
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
|S|=3;
  cin >> S;
  
  if(S==A,A,A) {
    cout << "No" << endl;}
  if(S==B,B,B) {
    cout << "No" << endl;}
  else {
    cout << "Yes" << endl;}
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '|' token
    5 | |S|=3;
      | ^
a.cc:8:9: error: 'A' was not declared in this scope
    8 |   if(S==A,A,A) {
      |         ^
a.cc:10:9: error: 'B' was not declared in this scope
   10 |   if(S==B,B,B) {
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  |S|=3;
  cin >> S;
  
  if(S==AAA) {
    cout << "No" << endl;}
  if(S==BBB) {
    cout << "No" << endl;}
  else {
    cout << "Yes" << endl;}
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected primary-expression before '|' token
    5 |   |S|=3;
      |   ^
a.cc:8:9: error: 'AAA' was not declared in this scope
    8 |   if(S==AAA) {
      |         ^~~
a.cc:10:9: error: 'BBB' was not declared in this scope
   10 |   if(S==BBB) {
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  |S|==3;
  cin >> S;
  
  if(S==AAA) {
    cout << "No" << endl;}
  if(S==BBB) {
    cout << "No" << endl;}
  else {
    cout << "Yes" << endl;}
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected primary-expression before '|' token
    5 |   |S|==3;
      |   ^
a.cc:5:7: error: expected primary-expression before '=' token
    5 |   |S|==3;
      |       ^
a.cc:8:9: error: 'AAA' was not declared in this scope
    8 |   if(S==AAA) {
      |         ^~~
a.cc:10:9: error: 'BBB' was not declared in this scope
   10 |   if(S==BBB) {
      |         ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  string s;
  cin>>s;
  
  for(int i=0;i<3;i++){
  if(s[i]=="B"){
  b+=1;
    
  }
    else{
    a+=1;
     
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[i]=="B"){
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  string s;
  cin>>s;
  
  for(int i=0;i<3;i++){
  if(s[i]==int("B")){
  b+=1;
    
  }
    else{
    a+=1;
     
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
    9 |   if(s[i]==int("B")){
      |            ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  int *ptr;
  
  string s;
  cin>>s;
  ptr= &s;
  for(int i=0;i<3;i++){
  if(s[i]==int("B")){
  b+=1;
    ptr+=1;
  }
    else{
    a+=1;
      ptr+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int*' in assignment
    9 |   ptr= &s;
      |        ^~
      |        |
      |        std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:11:12: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
   11 |   if(s[i]==int("B")){
      |            ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  int *ptr;
  
  string s;
  cin>>s;
  ptr= &s;
  for(int i=0;i<3;i++){
  if(s[i]==int(B)){
  b+=1;
    ptr+=1;
  }
    else{
    a+=1;
      ptr+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int*' in assignment
    9 |   ptr= &s;
      |        ^~
      |        |
      |        std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:11:16: error: 'B' was not declared in this scope
   11 |   if(s[i]==int(B)){
      |                ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  int *ptr;
  
  string s;
  cin>>s;
  ptr= &s;
  for(int i=0;i<3;i++){
  if(*ptr=="B"){
  b+=1;
    ptr+=1;
  }
    else{
    a+=1;
      ptr+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int*' in assignment
    9 |   ptr= &s;
      |        ^~
      |        |
      |        std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:11:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(*ptr=="B"){
      |      ~~~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  int *ptr;
  
  string s;
  cin>>s;
  ptr= &s;
  for(int i=0;i<3;i++){
  if(ptr=="B"){
  b+=1;
    ptr+=1;
  }
    else{
    a+=1;
      ptr+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int*' in assignment
    9 |   ptr= &s;
      |        ^~
      |        |
      |        std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:11:9: error: comparison between distinct pointer types 'int*' and 'const char*' lacks a cast
   11 |   if(ptr=="B"){
      |      ~~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  string s;
  cin>>s;
  for(int i=0;i<3;i++){
  if(const s[i]=="B"){
  b+=1;
  }
    else{
    a+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: condition declares an array
    8 |   if(const s[i]=="B"){
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  string s;
  cin>>s;
  for(int i=0;i<3;i++){
  if(s[i]==B){
  b+=1;
  }
    else{
    a+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'B' was not declared in this scope
    8 |   if(s[i]==B){
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int a=0,b=0;
  string s;
  cin>>s;
  for(int i=0;i<3;i++){
  if(c[i]=="B"){
  b+=1;
  }
    else{
    a+=1;
    }
  }
  if (a>0 && b>0){
  cout<<"Yes";
  }
  else{
  cout<<"No";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'c' was not declared in this scope
    8 |   if(c[i]=="B"){
      |      ^
Language: Java

public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        char[] s = br.readLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            a += s[i] == 'A' ? 1 : 0;
            b += s[i] == 'B' ? 1 : 0;
        }
        System.out.println((a == 2 || b == 2) ? "Yes" : "No");
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

public static void main(String[] args) throws java.lang.Exception {
  BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
  char[] s = br.readLine().toCharArray();
  int a = 0;
  int b = 0;
  for (int i = 0; i < s.length; i++) {
    a += s[i] == 'A' ? 1 : 0;
    b += s[i] == 'B' ? 1 : 0;
  }
  System.out.println((a == 2 || b == 2) ? "Yes" : "No");
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws java.lang.Exception {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
char[] s = br.readLine().toCharArray();
int a = 0;
int b = 0;
for (int i = 0; i < s.length; i++) {
  a += s[i] == 'A' ? 1 : 0;
  b += s[i] == 'B' ? 1 : 0;
}
System.out.println((a == 2 || b == 2) ? "Yes" : "No");

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
for (int i = 0; i < s.length; i++) {
^
Main.java:5: error: class, interface, enum, or record expected
for (int i = 0; i < s.length; i++) {
                ^
Main.java:5: error: class, interface, enum, or record expected
for (int i = 0; i < s.length; i++) {
                              ^
Main.java:7: error: class, interface, enum, or record expected
  b += s[i] == 'B' ? 1 : 0;
  ^
Main.java:8: error: class, interface, enum, or record expected
}
^
6 errors
Language: Java

import java.util.*;
import java.lang.*;
import java.io.*;


public class RPS {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        char[] s = br.readLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            a += s[i] == 'A' ? 1 : 0;
            b += s[i] == 'B' ? 1 : 0;
        }
        System.out.println((a == 2 || b == 2) ? "Yes" : "No");
    }
}

Compiler output:
Main.java:6: error: class RPS is public, should be declared in a file named RPS.java
public class RPS {
       ^
1 error
Language: Java

import java.lang.*;
import java.io.*;


public class RPS {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        char[] s = br.readLine().toCharArray();
        int a = 0;
        int b = 0;
        for (int i = 0; i < s.length; i++) {
            a += s[i] == 'A' ? 1 : 0;
            b += s[i] == 'B' ? 1 : 0;
        }
        System.out.println((a == 2 || b == 2) ? "Yes" : "No");
    }
}

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

#include<bits/stdc++.h>

using namespace std;
int main()
{
  string s;
  cin>>s;
  bool a,b;
  a = b = false;
  for(int i = 0;i<3;i++)
      {
        if(s[i]=='A)
            a = true;
         else
            b = true;
           }
           if(a&b)
            cout<<"Yes";
           else
            cout<<"No";
           
           return 0 ;
           }

Compiler output:
a.cc:12:18: warning: missing terminating ' character
   12 |         if(s[i]=='A)
      |                  ^
a.cc:12:18: error: missing terminating ' character
   12 |         if(s[i]=='A)
      |                  ^~~
a.cc: In function 'int main()':
a.cc:12:16: error: lvalue required as left operand of assignment
   12 |         if(s[i]=='A)
a.cc:14:10: error: expected primary-expression before 'else'
   14 |          else
      |          ^~~~
a.cc:13:22: error: expected ')' before 'else'
   13 |             a = true;
      |                      ^
      |                      )
   14 |          else
      |          ~~~~         
a.cc:12:11: note: to match this '('
   12 |         if(s[i]=='A)
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int a[2]={0};
  for(int i=0;i<3;i++)
  {
    a[s[i]-'A']++;
  }
  if(a[0]==3||a[1]==3)
  {
    cout<<"No\n";
  }
  else
  {
    cout<<"Yes\n";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		if(str.charAt(0) == str.charAt(1) && str.charAt(1) == str.charAt(2) ) {
			System.out.println("No");

		}
		else {
			System.out.println("Yes");
		}

	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

	Scanner scan = new Scanner(System.in);
		String str = scan.next();
		if(str.charAt(0) == str.charAt(1) && str.charAt(1) == str.charAt(2) ) {
			System.out.println("No");

		}
		else {
			System.out.println("Yes");
		}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	Scanner scan = new Scanner(System.in);
	^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
		if(str.charAt(0) == str.charAt(1) && str.charAt(1) == str.charAt(2) ) {
		^
Main.java:6: error: class, interface, enum, or record expected
		}
		^
Main.java:9: error: class, interface, enum, or record expected
		}
		^
4 errors
Language: Java

package problems;

import java.util.Scanner;

public class Rails {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		if(str.charAt(0) == str.charAt(1) && str.charAt(1) == str.charAt(2) ) {
			System.out.println("No");

		}
		else {
			System.out.println("Yes");
		}

	}
}


Compiler output:
Main.java:5: error: class Rails is public, should be declared in a file named Rails.java
public class Rails {
       ^
1 error
Language: Java

package problems;

import java.util.Scanner;

public class Rails {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		if(str == "AAA") {
			System.out.println("No");
		}
		else if (str == "BBB") {
			System.out.println("No");
		}
		else {
			System.out.println("Yes");
		}

	}

}


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

#include<bits/stdc++.h>
using namespace std;
int main(void)
{
  String s;
  cin>>s;
  int n =s.length();
  if(n==1)
  {
    cout<<"No"<<endl;
    return 0;
  }
  for(int i =0;i<n-1;i++)
  {
      if(s[i]!=s[i+1])
      {
        cout<<"Yes"<<endl;
        return 0;
      }
  }
  cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String s;
      |   ^~~~~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
Language: C++

#include <iostream>
#include <string>
int main()
{
  string station;
  int flag=0;
  for(int i=1;i<3;i++)
  {
    if (station[i]==station[0])
    {
     cout<<"No";
      flag=1;
    }
  }
  if(flag==0)
  {
    cout<<"Yes";
  }
  
  
    
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string station;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:9: error: 'station' was not declared in this scope; did you mean 'static'?
    9 |     if (station[i]==station[0])
      |         ^~~~~~~
      |         static
a.cc:11:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |      cout<<"No";
      |      ^~~~
      |      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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<"Yes";
      |     ^~~~
      |     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>

int main(){
  	string s;
  	cin>>s;
  	bool a0=0,b0=0;
  	for(int i=0;i<s.size();i++){
    	if(s[i]=='A'){
        	a0 = 1;
        }else{
        	b0 = 1;
        }
    }
  	if(a0 && b0){
    	cout<<"Yes";
    }else{
    	cout<<"No";
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string s;
      |         ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 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/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>s;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:14: error: 's' was not declared in this scope
    5 |         cin>>s;
      |              ^
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout<<"Yes";
      |         ^~~~
      |         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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |         cout<<"No";
      |         ^~~~
      |         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<stdio.h>
int main(void)
{
  char bus[4];
  int i;
  
  for(i=0;i<2;i++)
  {
    scanf("%s",bus);
  }
  
   for(i=0;i<2;i++)
  {
    if(bus[0]!=bus[i])
    {
        printf("Yes")
        i=-1;
        break;
    }
  }
if(i!=-1)
  printf("No");
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected ';' before 'i'
   16 |         printf("Yes")
      |                      ^
      |                      ;
   17 |         i=-1;
      |         ~
Language: C++

#include <iostream>

int main(void){
  std::string s;
  std::cin >> s;
  int flag = 0;
  for(int i = 0; i < 3 && flag == 0; i++){
  	for(int j = i + 1; j < 3 && flag == 0; j++){
      if(s[i] != s[j])
        flag = 1;
  }
  if(flag == 1){
    std::cout << "Yes";
  }else{
    std::cout << "No";
  }
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()
#define fi first;
#define se second;
#define print(x,y) (cout << (x) << (y))
#define inf INT_MAX
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,bool> pib;
typedef vector<pii> vii;
typedef vector<pib> vib;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef pair<string,string> pss;
const int MOD = 1000000007;

int main(){
    boost;
   string s;
   cin >> s;
   if(s=="AAA" || s == "BBB") cout << "No" else cout << "Yes";
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:29:43: error: expected ';' before 'else'
   29 |    if(s=="AAA" || s == "BBB") cout << "No" else cout << "Yes";
      |                                           ^~~~~
      |                                           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()
#define fi first;
#define se second;
#define print(x,y) (cout << (x) << (y))
#define inf INT_MAX
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,bool> pib;
typedef vector<pii> vii;
typedef vector<pib> vib;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef pair<string,string> pss;
const int MOD = 1000000007;

int main(){
    boost;
   string s;
   cin >> s;
   if(s=="AAA" || s == "BBB") cout << "No" else cout << "Yes";

}



Compiler output:
a.cc: In function 'int main()':
a.cc:29:43: error: expected ';' before 'else'
   29 |    if(s=="AAA" || s == "BBB") cout << "No" else cout << "Yes";
      |                                           ^~~~~
      |                                           ;
Language: C++

#include<iostream>
#include<strings>
using namespace std;
int main()
{
string S[3];
  if (S[0]=S[1]&&S[1]=S[2])	
    cout << "No";
  else cout << "Yes";


}

Compiler output:
a.cc:2:9: fatal error: strings: No such file or directory
    2 | #include<strings>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<isotream>
#include<string>
using namespace std;
{
  
 string S[3];
 for (int i = 0; i>3; i++)
 {
   cin << S[i]
 }
  if (s[0]=s[1] && s[1}=s[2])
                     cout << "No";
  else cout << "Yes";
}

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

#include<iostream>
using namespace std;
int main(){
  std::string str;
  for(int i=0;i<str.size();i++){
    cin>>str;
  }
  if(str=="AAA"){
    cout<<"No;
  }
  else if(str=="BBB"){
    cout<<"No";
  }
  else{
    cout<<"Yes";
  }
  return 0;
}
    

Compiler output:
a.cc:9:11: warning: missing terminating " character
    9 |     cout<<"No;
      |           ^
a.cc:9:11: error: missing terminating " character
    9 |     cout<<"No;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before '}' token
   10 |   }
      |   ^
Language: C++

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

int main() {
  string s;
  cin  >> s;
  if (s.at(0) == s.at(1)) {
    if (s.at(1) == s.at(2)) {
      cout << "No" << endl;
    }
    else {
      cout << "Yes" << endl;
  }
  else {
    cout << "Yes" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected '}' before 'else'
   14 |   else {
      |   ^~~~
a.cc:7:27: note: to match this '{'
    7 |   if (s.at(0) == s.at(1)) {
      |                           ^
Language: C++

#include <bits/stdc++.h>
#define pi 3.14159
using namespace std;
typedef long long LL;
const LL MOD = 1e9 + 7;
const int N = 2e7 + 9, M = 1e7, OO = 0x3f3f3f3f;
#define AC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin.sync_with_stdio(0);
int main()
{
int n;
string s;
cin>>s;
n=s.size();
int acounter=0,bcounter=0;
for(i=0;i<n;++i){
    if(s[i]=='A'){
        acounter++;
    }
    else{
        bcounter++;
    }
}
if(acounter==0||bcounter==0){
    printf("Yes\n");
}
else{
    printf("No\n");
}




    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'i' was not declared in this scope
   15 | for(i=0;i<n;++i){
      |     ^
Language: C++

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


int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	int a,b;
	cin>>a>>b;
	for(int i = 0;i<1e3;i++){
		int first = i* 8/100 , second = i*10/100;
		if(a == first && b == second){
			cout<<i<<;
			return 0;
		}
	}
cout<<-1;		
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected primary-expression before ';' token
   13 |                         cout<<i<<;
      |                                  ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  char s[3],a[3]='AAA',b[3]='BBB';
  scanf("%s",s);
  if(strcmp(s,a)==0||strcmp(s,b)==0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:18: warning: multi-character character constant [-Wmultichar]
    4 |   char s[3],a[3]='AAA',b[3]='BBB';
      |                  ^~~~~
main.c:4:18: error: invalid initializer
main.c:4:29: warning: multi-character character constant [-Wmultichar]
    4 |   char s[3],a[3]='AAA',b[3]='BBB';
      |                             ^~~~~
main.c:4:29: error: invalid initializer
Language: C++

/*BINH :))*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long llu;
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define f  first
#define s  second
#define mp make_pair
#define pb push_back
#define ep emplace_back
#define sz(a) (int) a.size()
#define FOR(x,a,b) for (int x=a;x<=b;x++)
#define FOD(x,a,b) for (int x=a;x>=b;x--)
#define REP(x,a,b) for (int x=a;x<b;x++)
#define RED(x,a,b) for (int x=a;x>b;x--)
#define EL cout<<endl
#define max 1005
#define vi vector<int>
#define ii pair<int,int>
#define vii vector<ii>
void init(){
}
int main(){
    string s;
    cin>>s;
    int a=0,b=0;
    if(s[0]==s[1]&&s[1]==s[2])cout<<"NO";EL;
    else cout<<"YES";EL;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'else' without a previous 'if'
   30 |     else cout<<"YES";EL;
      |     ^~~~
Language: C++

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

int main()
{
  char v[3];
  
  for(int i=0;i<3;i++)
  {
  	cin >> v[i];
  }
  
  if(v[0]==v[1])
  {
	if(v[1]==v[2])
  	{
    	cout << "No" <<endl;
  	}
  else
  {
    cout <<"Yes"<<endl;
  }
    
    return 0;
    
}


Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main()
      | ~~~                 
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

int main()
{
  char v[3];
  
  for(int i=0;i<3;i++)
  {
  	cin >> v[i];
  }
  if(v[0]==v[1])
  {
	if(v[1]==v[2])
  	{
    	cout << "No" <<endl;
  	}
  else
  {
    cout <<"Yes"<<endl;
  }
    
    return 0;
    
}

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

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

int main() {
  string s;
  cin >> s;
  if (s[0] == s[1] && s[1] == s[2]){
    cout << "No" << endl;
  } else{
    cout << "Yes" << <endl;

  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected primary-expression before '<' token
   11 |     cout << "Yes" << <endl;
      |                      ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  if (s[0] == s[1] && s[1] == s[2]){
    cout << "No" << endl;
  } else{
    cout << "Yes" < <endl;

  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected primary-expression before '<' token
   11 |     cout << "Yes" < <endl;
      |                     ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  if (s[0] == s[1] == s[2]){
    cout << "No" << endl;
  } else{
    cout << "Yes" < <endl;

  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected primary-expression before '<' token
   11 |     cout << "Yes" < <endl;
      |                     ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  if (s[0] == s[1] == s[2]){
    cout << "No" << endl;
  } else{
    cout << "Yes" < <endl;
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected primary-expression before '<' token
   10 |     cout << "Yes" < <endl;
      |                     ^
Language: Java

function main(input) {

  if (input === 'AAA' || input === 'BBB') {
  	console.log('Yes');
    return;
  }
  console.log('No');
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


Compiler output:
Main.java:3: error: unclosed character literal
  if (input === 'AAA' || input === 'BBB') {
                ^
Main.java:3: error: unclosed character literal
  if (input === 'AAA' || input === 'BBB') {
                    ^
Main.java:3: error: not a statement
  if (input === 'AAA' || input === 'BBB') {
                  ^
Main.java:3: error: unclosed character literal
  if (input === 'AAA' || input === 'BBB') {
                                   ^
Main.java:3: error: unclosed character literal
  if (input === 'AAA' || input === 'BBB') {
                                       ^
Main.java:3: error: not a statement
  if (input === 'AAA' || input === 'BBB') {
                                     ^
Main.java:4: error: unclosed character literal
  	console.log('Yes');
  	            ^
Main.java:4: error: unclosed character literal
  	console.log('Yes');
  	                ^
Main.java:4: error: not a statement
  	console.log('Yes');
  	              ^
Main.java:7: error: unclosed character literal
  console.log('No');
              ^
Main.java:7: error: unclosed character literal
  console.log('No');
                 ^
Main.java:7: error: not a statement
  console.log('No');
                ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
function main(input) {
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: illegal start of expression
  if (input === 'AAA' || input === 'BBB') {
              ^
Main.java:3: error: illegal start of expression
  if (input === 'AAA' || input === 'BBB') {
                                 ^
Main.java:10: error: class, interface, enum, or record expected
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
             ^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                ^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                ^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                           ^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                              ^
Main.java:10: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                                   ^
22 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#include <iostream>
#include<map>
#include <algorithm>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  ll n, a, b;
  cin >> n >> a >> b;
  ll c = a + b;
  ll ans = a * (n / c);
  ll += min(n % c, a);
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected unqualified-id before '+=' token
   16 |   ll += min(n % c, a);
      |      ^~
Language: C++

#include<cstdio>
#include<utility>
#include<algorithm>
int const nax = 2e5 + 5, mod = 998244353;

struct P{
    int x, d;
    P () {}
    P (int x, int d) : x(x), d(d) {}
    bool operator < (const P &a) const {
        return x < a.x;
    }
    void read () {
        scanf("%d %d", &x, &d);
    }
};

inline void add (int &a, int b) {
    if ((a += b) >= mod) a -= mod;
}

int dp[nax];
int n;
std::pair<int, int> st[nax];
int top;
P p[nax];

int main () {
    scanf("%d", &n);
    for (int i = 1 ; i <= n ; ++ i)
        p[i].read();
    std::sort(p + 1, p + 1 + n);
    dp[n + 1] = 1;
    st[top = 1] = std::make_pair(n + 1, (int)2e9 + 1);
    for (int i = n ; i >= 1 ; -- i) {
        while (top > 0 && st[top].second < p[i].x + p[i].d) -- top;
      	dp[i] = dp[i + 1]
      	add(dp[i], dp[st[top].first]);
        st[++ top] = std::make_pair(i, p[i].x);
    }
    printf("%d\n", dp[1]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'add'
   37 |         dp[i] = dp[i + 1]
      |                          ^
      |                          ;
   38 |         add(dp[i], dp[st[top].first]);
      |         ~~~
Language: C++

import java.util.Scanner;
class abc
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    for(int i=0;i<s.length()-1;i++)
    {
		if(s.charAt(i)!=s.charAt(i+1))
        {
          System.out.println("YES");
            return;
        }
    }
    System.out.println("NO");
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String args[])
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String args[])
      |                           ^~~~~~
a.cc:18:2: error: expected ';' after class definition
   18 | }
      |  ^
      |  ;
a.cc: In static member function 'static void abc::main(int*)':
a.cc:6:5: error: 'Scanner' was not declared in this scope
    6 |     Scanner sc=new Scanner(System.in);
      |     ^~~~~~~
a.cc:7:5: error: 'String' was not declared in this scope
    7 |     String s=sc.next();
      |     ^~~~~~
a.cc:8:19: error: 's' was not declared in this scope
    8 |     for(int i=0;i<s.length()-1;i++)
      |                   ^
a.cc:12:11: error: 'System' was not declared in this scope
   12 |           System.out.println("YES");
      |           ^~~~~~
a.cc:16:5: error: 'System' was not declared in this scope
   16 |     System.out.println("NO");
      |     ^~~~~~
Language: C++

#include <iostream>

int main() {
	char* an[3] = {};
  	int b = an[0];
  	for (auto a : an) {
    	if (a != b) {
        	std::cout << "No";
          return;
        }
    }
  std::cout << "Yes";
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: invalid conversion from 'char*' to 'int' [-fpermissive]
    5 |         int b = an[0];
      |                 ~~~~^
      |                     |
      |                     char*
a.cc:7:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |         if (a != b) {
      |             ~~^~~~
a.cc:9:11: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |           return;
      |           ^~~~~~
a.cc:13:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   13 |   return;
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main() {
  string s;
  cin>>s;
  ll a=0,b=0;
  for(int i=0;i<3;i++)
  {
    if(s[i]=='A)
       a++;
       else
       b++;
       }
       if(a==0||b==0)
       cout<<"NO";
       else
       cout<<"YES";
       }

Compiler output:
a.cc:10:14: warning: missing terminating ' character
   10 |     if(s[i]=='A)
      |              ^
a.cc:10:14: error: missing terminating ' character
   10 |     if(s[i]=='A)
      |              ^~~
a.cc: In function 'int main()':
a.cc:12:8: error: expected primary-expression before 'else'
   12 |        else
      |        ^~~~
a.cc:11:12: error: expected ')' before 'else'
   11 |        a++;
      |            ^
      |            )
   12 |        else
      |        ~~~~ 
a.cc:10:7: note: to match this '('
   10 |     if(s[i]=='A)
      |       ^