criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class ContestMain {

	public static void main(String[] args) {
		int[] group = {0,1,3,1,2,1,2,1,1,2,1,2,1};
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		try{
			String s = new String(in.readLine());
			String[] spStr = s.split(" ",0);
			int x = Integer.parseInt(spStr[0]);
			int y = Integer.parseInt(spStr[1]);
			if(group[x] == group[y]){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
			System.out.println();
		}catch(Exception e){}

	}

}

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

import java.util.Scanner;
import java.util.Arrays;
import java.util.List;

public class Grouping {

    static List<Integer> A;
    static List<Integer> B;
    static List<Integer> C;

    public static void main(String args[]) {

        A = Arrays.asList(1, 3, 5, 7, 8, 10, 12);
        B = Arrays.asList(4, 6, 9, 11);
        C = Arrays.asList(2);
 
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();

        String answer = isSameGroup(x, y) ? "Yes" : "No";
        System.out.println(answer);
    }

    private static boolean isSameGroup(int x, int y) {
        if ((A.contains(x) && A.contains(y))
           || (B.contains(x) && B.contains(y))
           || (C.contains(x) && C.contains(y))) {
            return true;
        } else {
            return false;
        }

    }
}

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

import java.util.Scanner;
import java.util.Arrays;

public class Class2 {
 public static void main (String[] args) {
  Scanner sc = new Scanner(System.in);
  String x = sc.next();
  String y = sc.next();
  String x = "1";
  String y = "2";
  String[] a = {"1","3","5","7","8","10","12"};
  String[] b = {"4","6","9","11"};
   if(x==y){
    System.out.print("Yes");
   }else if(x=="2" && y=="2"){
    System.out.print("Yes");
   }else if(Arrays.asList(a).contains(x)){
    if(Arrays.asList(a).contains(y)){
     System.out.print("Yes");
    }else{
     System.out.print("No");
    }
   }else if(Arrays.asList(b).contains(x)){
    if(Arrays.asList(b).contains(y)){
     System.out.print("Yes");
    }else{
   	 System.out.print("No");
    }
   }else {
    System.out.print("No");
   }
  }
}

Compiler output:
Main.java:4: error: class Class2 is public, should be declared in a file named Class2.java
public class Class2 {
       ^
Main.java:9: error: variable x is already defined in method main(String[])
  String x = "1";
         ^
Main.java:10: error: variable y is already defined in method main(String[])
  String y = "2";
         ^
3 errors
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main {
 public static void main (String[] args) {
  Scanner sc = new Scanner(System.in);
  int x = sc.nextInt();
  int y = sc.nextInt();
  String[] a = {"1","3","5","7","8","10","12"};
  String[] b = {"4","6","9","11"};
   if(x==y){
    System.out.print("Yes");
   }else if(x=="2" && y=="2"){
    System.out.print("Yes");
   }else if(Arrays.asList(a).contains(x)){
    if(Arrays.asList(a).contains(y)){
     System.out.print("Yes");
    }else{
     System.out.print("No");
    }
   }else if(Arrays.asList(b).contains(x)){
    if(Arrays.asList(b).contains(y)){
     System.out.print("Yes");
    }else{
   	 System.out.print("No");
    }
   }else {
    System.out.print("No");
   }
  }
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '=='
   }else if(x=="2" && y=="2"){
             ^
  first type:  int
  second type: String
Main.java:13: error: bad operand types for binary operator '=='
   }else if(x=="2" && y=="2"){
                       ^
  first type:  int
  second type: String
2 errors
Language: Java

package practice;
import java.util.Arrays;

public class Class2 {
 public static void main (String[] args) {
//  Scanner sc = new Scanner(System.in);
//  int x = sc.nextInt();
//  int y = sc.nextInt();
  String x = "1";
  String y = "2";
  String[] a = {"1","3","5","7","8","10","12"};
  String[] b = {"4","6","9","11"};
   if(x==y){
    System.out.print("Yes");
   }else if(x=="2" && y=="2"){
    System.out.print("Yes");
   }else if(Arrays.asList(a).contains(x)){
    if(Arrays.asList(a).contains(y)){
     System.out.print("Yes");
    }else{
     System.out.print("No");
    }
   }else if(Arrays.asList(b).contains(x)){
    if(Arrays.asList(b).contains(y)){
     System.out.print("Yes");
    }else{
   	 System.out.print("No");
    }
   }else {
    System.out.print("No");
   }
  }
}

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

import java.util.Scanner;

public class Main {
 public static void main (String[] args) {
  Scanner sc = new Scanner(System.in);
  int x = sc.nextInt();
  int y = sc.nextInt();
  int[] a = {1,3,5,7,8,10,12};
  int[] b = {4,6,9,11};
   if(x==y){
    System.out.print("Yes");
   }else if(x==2 && y==2){
    System.out.print("Yes");
   }else if(a.contains(x)){
    if(a.contains(y)){
     System.out.print("Yes");
    }
   }else if(b.contains(x)){
    if(b.contains(y)){
     System.out.print("Yes");
    }
   }else {
    System.out.print("No");
   }
  }
}

Compiler output:
Main.java:14: error: cannot find symbol
   }else if(a.contains(x)){
             ^
  symbol:   method contains(int)
  location: variable a of type int[]
Main.java:15: error: cannot find symbol
    if(a.contains(y)){
        ^
  symbol:   method contains(int)
  location: variable a of type int[]
Main.java:18: error: cannot find symbol
   }else if(b.contains(x)){
             ^
  symbol:   method contains(int)
  location: variable b of type int[]
Main.java:19: error: cannot find symbol
    if(b.contains(y)){
        ^
  symbol:   method contains(int)
  location: variable b of type int[]
4 errors
Language: Java

import java.util.Scanner;

public class Main {
 public static void main (String[] args) {
  Scanner sc = new Scanner(System.in);
  int x = sc.nextInt();
  int y = sc.nextInt();
  String[] a = {1,3,5,7,8,10,12};
  String[] b = {4,6,9,11};
   if(x==y){
    System.out.print("Yes");
   }else if(x==2 && y==2){
    System.out.print("Yes");
   }else if(a.contains(x)){
    if(a.contains(y)){
     System.out.print("Yes");
    }
   }else if(b.contains(x)){
    if(b.contains(y)){
     System.out.print("Yes");
    }
   }else {
    System.out.print("No");
   }
  }
}

Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                  ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                    ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                      ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                        ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                          ^
Main.java:8: error: incompatible types: int cannot be converted to String
  String[] a = {1,3,5,7,8,10,12};
                             ^
Main.java:9: error: incompatible types: int cannot be converted to String
  String[] b = {4,6,9,11};
                ^
Main.java:9: error: incompatible types: int cannot be converted to String
  String[] b = {4,6,9,11};
                  ^
Main.java:9: error: incompatible types: int cannot be converted to String
  String[] b = {4,6,9,11};
                    ^
Main.java:9: error: incompatible types: int cannot be converted to String
  String[] b = {4,6,9,11};
                      ^
Main.java:14: error: cannot find symbol
   }else if(a.contains(x)){
             ^
  symbol:   method contains(int)
  location: variable a of type String[]
Main.java:15: error: cannot find symbol
    if(a.contains(y)){
        ^
  symbol:   method contains(int)
  location: variable a of type String[]
Main.java:18: error: cannot find symbol
   }else if(b.contains(x)){
             ^
  symbol:   method contains(int)
  location: variable b of type String[]
Main.java:19: error: cannot find symbol
    if(b.contains(y)){
        ^
  symbol:   method contains(int)
  location: variable b of type String[]
15 errors
Language: Java

import java.util.Scanner;

public class Main {
 public static void main (String[] args) {
  Scanner sc = new Scanner(System.in);
  int x = sc.nextInt();
  int y = sc.nextInt();
  String[] a = {1,3,5,7,8,10,12};
  String[] b = {4,6,9,11};
   if(x==y){
    System.out.print("Yes");
   }else if(x==2 && y==2){
    System.out.print("Yes");
   }else if(a.contains(x)){
    if(a.contains(y)){
     System.out.print("Yes");
    }
   }else if(b.contains(x)){
    if(b.contains(y)){
     System.out.print("Yes");
    }
   }else {
    System.out.print("No");
   }
}

Compiler output:
Main.java:25: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <iostream>

using namespace std;

int judge(int x, int y, int[] a){
	int p;
	p = 0;
	for (size_t i = 0; i < sizeof(a); i++) {
		if (a[i] == x || a[i] == y) {
			p++;
		}
	}
	if (p == 2) {
		std::cout << "YES" << '\n';
		return 0;
	}
	return 1;
}

int main(int argc, char const *argv[]) {
	int x,y,p;
	int a[] = {1,3,5,7,8,10,12};
	int b[] = {4,6,9,11};
	std::cin >> x >> y;
	p = 0;
	p += judge(x, y, a);
	p += judge(x, y, b);
	if (p == 2) {
		std::cout << "NO" << '\n';
	}
	return 0;
}


Compiler output:
a.cc:5:31: error: expected ',' or '...' before 'a'
    5 | int judge(int x, int y, int[] a){
      |                               ^
a.cc: In function 'int judge(int, int, int*)':
a.cc:8:39: error: 'a' was not declared in this scope
    8 |         for (size_t i = 0; i < sizeof(a); i++) {
      |                                       ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,start,lim) for(lld i=start;i<lim;i++)
#define repd(i,start,lim) for(lld i=start;i>=lim;i--)
#define scan(x) scanf("%lld",&x)
#define print(x) printf("%lld ",x)
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define br printf("\n")
#define YES printf("YES\n")
#define NO printf("NO\n")
#define all(c) (c).begin(),(c).end()
using namespace std;
#define INF         1011111111
#define LLINF       1000111000111000111LL
#define EPS         (double)1e-10
#define MOD         1000000007
#define PI          3.14159265358979323
using namespace std;
typedef long double ldb;
typedef long long lld;
lld powm(lld base,lld exp,lld mod=MOD) {lld ans=1;while(exp){if(exp&1) ans=(ans*base)%mod;exp>>=1,base=(base*base)%mod;}return ans;}
typedef vector<lld> vlld;
typedef pair<lld,lld> plld;
typedef map<lld,lld> mlld;
typedef set<lld> slld;
#define N 1005
lld grp[]={0,1,3,1,2,1,2,1,1,2,1,2,1}
int main()
{
	
	lld n,m;
	cin>>n>>m;
	cout<<((grp[n]==grp[m])?"Yes":"No");
	return 0;
}

Compiler output:
a.cc:30:1: error: expected ',' or ';' before 'int'
   30 | int main()
      | ^~~
Language: C++

import Data.List

a1 = [4,6,9,11]

main = do
  [x,y] <- map read . words <$> getLine
  putStrLn $ solve x y

solve :: Int -> Int -> String
solve x y
  | tt x == tt y = "Yes"
  | otherwise = "No"

tt :: Int -> Int
tt 2 = 0
tt x
  | t == Nothing = 2
  | otherwise = 1
    where t = find (x==) a1





Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import Data.List
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);
 
String x = scanner.next();
String y = scanner.next();
 
if(x == 2 ) {
x = a;
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
x = b;
} else {
x = c;
}
 
if(y == 2 ) {
y = a;
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
y = b;
} else {
y = c;
}
 
if(x ==y) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
 

Compiler output:
Main.java:10: error: bad operand types for binary operator '=='
if(x == 2 ) {
     ^
  first type:  String
  second type: int
Main.java:11: error: cannot find symbol
x = a;
    ^
  symbol:   variable a
  location: class Main
Main.java:12: error: bad operand types for binary operator '=='
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
            ^
  first type:  String
  second type: int
Main.java:12: error: bad operand types for binary operator '=='
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
                      ^
  first type:  String
  second type: int
Main.java:12: error: bad operand types for binary operator '=='
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
                                ^
  first type:  String
  second type: int
Main.java:12: error: bad operand types for binary operator '=='
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
                                          ^
  first type:  String
  second type: int
Main.java:13: error: cannot find symbol
x = b;
    ^
  symbol:   variable b
  location: class Main
Main.java:15: error: cannot find symbol
x = c;
    ^
  symbol:   variable c
  location: class Main
Main.java:18: error: bad operand types for binary operator '=='
if(y == 2 ) {
     ^
  first type:  String
  second type: int
Main.java:19: error: cannot find symbol
y = a;
    ^
  symbol:   variable a
  location: class Main
Main.java:20: error: bad operand types for binary operator '=='
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
            ^
  first type:  String
  second type: int
Main.java:20: error: bad operand types for binary operator '=='
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
                      ^
  first type:  String
  second type: int
Main.java:20: error: bad operand types for binary operator '=='
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
                                ^
  first type:  String
  second type: int
Main.java:20: error: bad operand types for binary operator '=='
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
                                          ^
  first type:  String
  second type: int
Main.java:21: error: cannot find symbol
y = b;
    ^
  symbol:   variable b
  location: class Main
Main.java:23: error: cannot find symbol
y = c;
    ^
  symbol:   variable c
  location: class Main
16 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);

String x = scanner.next();
String y = scanner.next();

if(x == 2 ) {
x = a;
} else if(x == 4 || x == 6 || x == 9 || x == 11) {
x ==b;
} else {
x == c;
}

if(y == 2 ) {
y = a;
} else if(y == 4 || y == 6 || y == 9 || y == 11) {
y ==b;
} else {
y == c;
}

if(x ==y) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}



Compiler output:
Main.java:13: error: not a statement
x ==b;
  ^
Main.java:15: error: not a statement
x == c;
  ^
Main.java:21: error: not a statement
y ==b;
  ^
Main.java:23: error: not a statement
y == c;
  ^
4 errors
Language: C++

// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

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

// void debug(vector<int> *v)
// {
// 	cout << "debug :";
// 	for (int i = 0; i<v->size(); i++)
// 		cout << " " << v->at(i);
// 	cout << endl;
// }

int vector_finder(vector<int> vec, int number) {
	auto itr = find(vec.begin(), vec.end(), number);
	size_t index = distance(vec.begin(), itr);
	if (index != vec.size()) {
		return 1;
	}
	else {
		return 0;
	}
}

int main() {
	vector<int> group1{ 1,3,5,7,8,10,12 };
	vector<int> group2{ 4,6,9,11 };
	vector<int> group3{ 2 };

	int x, y;
	cin >> x >> y;

	if (vector_finder(group1, x) == 1 && vector_finder(group1, y) == 1) {
		cout << "Yes" << endl;
	}
	else if (vector_finder(group2, x) == 1 && vector_finder(group2, y) == 1) {
		cout << "Yes" << endl;
	}
	else if (vector_finder(group3, x) == 1 && vector_finder(group3, y) == 1) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	//debug(&group1);
	//debug(&group2);
	//debug(&group3);

	return 0;
}


Compiler output:
a.cc: In function 'int vector_finder(std::vector<int>, int)':
a.cc:17:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   17 |         auto itr = find(vec.begin(), vec.end(), number);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:4:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:17:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   17 |         auto itr = find(vec.begin(), vec.end(), number);
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x,y;
  int a[13] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
  cin >> x >> y;

  if (a[x] == a[y]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0;
      |   ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x,y;
  int a[13] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
  cin >> x >> y;

  if(a[x] == a[y]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0;
      |   ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x,y;
  int a[13] = {-1,0,2,0,1,0,10,0,1,0,1,0};
  cin >> x >> y;

  if(a[x] == a[y]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0;
      |   ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x,y;
  int a[] = {-1,0,2,0,1,0,10,0,1,0,1,0};
  cin >> x >> y;

  if(a[x] == a[y]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0;
      |   ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int a[] = {-1,0,2,0,1,0,10,0,1,0,1,0};
int main(){
  int x,y;
  cin >> x >> y;

  if(a[x] == a[y]){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'return0' was not declared in this scope
   14 |   return0;
      |   ^~~~~~~
Language: C++

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

void debug(vector<int> *v)
{
	cout << "debug :";
	for (int i = 0; i<v->size(); i++)
		cout << " " << v->at(i);
	cout << endl;
}

int vector_finder(std::vector<int> vec, int number) {
	auto itr = std::find(vec.begin(), vec.end(), number);
	size_t index = std::distance(vec.begin(), itr);
	if (index != vec.size()) {
		return 1;
	}
	else {
		return 0;
	}
}

int main(int argc, char const *argv[]) {
	vector<int> group1{ 1,3,5,7,8,10,12 };
	vector<int> group2{ 4,6,9,11 };
	vector<int> group3{ 2 };

	int x, y;
	cin >> x >> y;

	if (vector_finder(group1, x) == 1 && vector_finder(group1, y) == 1) {
		cout << "Yes" << endl;
	}
	else if (vector_finder(group2, x) == 1 && vector_finder(group2, y) == 1) {
		cout << "Yes" << endl;
	}
	else if (vector_finder(group3, x) == 1 && vector_finder(group3, y) == 1) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	//debug(&group1);
	//debug(&group2);
	//debug(&group3);

	return 0;
}


Compiler output:
a.cc: In function 'int vector_finder(std::vector<int>, int)':
a.cc:14:29: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   14 |         auto itr = std::find(vec.begin(), vec.end(), number);
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:14:29: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   14 |         auto itr = std::find(vec.begin(), vec.end(), number);
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

int a[] = {-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0};
int main(void) {
	int x, y;
	cin >> x >> y;

	if(a[x] == a[y]) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> x >> y;
      |         ^~~
a.cc:7:17: error: 'cout' was not declared in this scope
    7 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:7:34: error: 'endl' was not declared in this scope
    7 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:9:33: error: 'endl' was not declared in this scope
    9 |                 cout << "No" << endl;
      |                                 ^~~~
Language: C++

int a[] = {-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0}
int main(void) {
	int x, y;
	cin >> x >> y;

	if(a[x] == a[y]) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc:2:1: error: expected ',' or ';' before 'int'
    2 | int main(void) {
      | ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <numeric>

using namespace std;

int main() {
  long long n;
  cin >> n;
  vector<long long> a;
  for(long long i=0; i<3*n; i++) {
    long long j;
    cin >> j;
    a.push_back(j);
  }
  for(long long i=0; i<n; i++) {
    auto left_min = min_element(a.begin(), a.begin()+n+1);
    auto right_max = max_element(a.end()-n-1, a.end());
    long long left_diff = a.at(n) - *left_min;
    long long right_diff = *right_max - a.at(2*n-i-1);
    if(left_diff > right_diff) {
      a.erase(left_min);
    } else {
      a.erase(right_max);
    }
  }
  long long left_sum = accumulate(a.begin(), a.begin()+n, 0LL);
  long long right_sum = accumulate(a.begin()+n, a.end(), 0LL);
  long long score = left_sum - right_sum;
  cout << score << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<long long> a;
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <numeric>
  +++ |+#include <vector>
    4 | 
a.cc:10:10: error: expected primary-expression before 'long'
   10 |   vector<long long> a;
      |          ^~~~
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a.push_back(j);
      |     ^
a.cc:17:33: error: 'a' was not declared in this scope
   17 |     auto left_min = min_element(a.begin(), a.begin()+n+1);
      |                                 ^
a.cc:27:35: error: 'a' was not declared in this scope
   27 |   long long left_sum = accumulate(a.begin(), a.begin()+n, 0LL);
      |                                   ^
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
#include<set>
using namespace std;
int main(){
   int x, y;
   cin >> x >> y;
   set<int>s1, s2, s3;
   int a[] = {1, 3, 4, 7, 8, 10, 12}, b[] = {4, 6, 9, 11}, c[] = {2};
   for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]);
   for(int i = 0; i<strlen(b); ++i)s1.insert(b[i]);
   for(int i = 0; i<strlen(c); ++i)s1.insert(c[i]);
   if(s1.count(x) && s1.count(y) || s2.count(x) && s2.count(y) || s3.count(x) && s3.count(y))
       cout << "Yes"<< endl;
   else cout << "No" << endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: cannot convert 'int*' to 'const char*'
   11 |    for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]);
      |                            ^
      |                            |
      |                            int*
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:12:28: error: cannot convert 'int*' to 'const char*'
   12 |    for(int i = 0; i<strlen(b); ++i)s1.insert(b[i]);
      |                            ^
      |                            |
      |                            int*
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:13:28: error: cannot convert 'int*' to 'const char*'
   13 |    for(int i = 0; i<strlen(c); ++i)s1.insert(c[i]);
      |                            ^
      |                            |
      |                            int*
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String []args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		int n = sc.nextInt();
		Main soln = new Main();
		System.out.println((soln.jd(m,n))? 'Yes':'No');
	}

	private boolean jd(int m, int n) {
		if(m==2 || n==2) return false;
		return (grp(m)*grp(n)>0)? true:false;
	}

	private int grp(int k) {
		if(k==4 || k==6 || k==9 || k==11) return 1;
		else return -1;
	}
}

Compiler output:
Main.java:9: error: unclosed character literal
		System.out.println((soln.jd(m,n))? 'Yes':'No');
		                                   ^
Main.java:9: error: not a statement
		System.out.println((soln.jd(m,n))? 'Yes':'No');
		                                     ^
Main.java:9: error: ';' expected
		System.out.println((soln.jd(m,n))? 'Yes':'No');
		                                       ^
Main.java:9: error: unclosed character literal
		System.out.println((soln.jd(m,n))? 'Yes':'No');
		                                            ^
Main.java:9: error: not a statement
		System.out.println((soln.jd(m,n))? 'Yes':'No');
		                                          ^
5 errors
Language: Java

public class Hoge{
	public static void main(String[] args){
	
	int x = Integer.parseInt(args[0]);
	int y = Integer.parseInt(args[1]);
	int group1[] = new int[10];
	int group2[] = new int[10];
 	int x_group = 0;
	int y_group = 0;
	
	for(int i=0;i < 7;i++){
		if(x == group1[i]){
			x_group = 1;
		}else if(x == group2[i]){
			x_group = 2;
		}else{
			x_group = 3;
		}
	}
	
	for(int i=0;i < 7;i++){
		if(y == group1[i]){
			y_group = 1;
		}else if(y == group2[i]){
			y_group = 2;
		}else{
			y_group = 3;
		}
	}
	
	if(x_group == y_group){
		System.out.println("yes");
	}else{
		System.out.println("no");
	}
	
	}
}

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

public class Hoge{
	public static void main(String[] args){
	
	int x = Integer.parseInt(args[0]);
	int x = Integer.parseInt(args[0]);
	int group1[10] = {1,3,5,7,8,10,12};
	int group2[10] = {4,6,9,11};
	int x_group;
	int y_group;
	
	for(int i=0;i=7;i++){
		if(x == group1[i]){
			x_group = 1;
		}else if(x == group2[i]){
			x_group = 2;
		}else{
			x_group = 3;
		}
	}
	
	for(int i=0;i=7;i++){
		if(y == group1[i]){
			y_group = 1;
		}else if(y == group2[i]){
			y_group = 2;
		}else{
			y_group = 3;
		}
	}
	
	if(x_group == y_group){
		System.out.println("yes");
	}else{
		System.out.println("no");
	}
	
	}
}

Compiler output:
Main.java:6: error: ']' expected
	int group1[10] = {1,3,5,7,8,10,12};
	           ^
Main.java:6: error: not a statement
	int group1[10] = {1,3,5,7,8,10,12};
	                  ^
Main.java:6: error: ';' expected
	int group1[10] = {1,3,5,7,8,10,12};
	                   ^
Main.java:7: error: ']' expected
	int group2[10] = {4,6,9,11};
	           ^
Main.java:7: error: not a statement
	int group2[10] = {4,6,9,11};
	                  ^
Main.java:7: error: ';' expected
	int group2[10] = {4,6,9,11};
	                   ^
6 errors
Language: Java

public class Hoge{
	public static void main(String[] args){
	
	int x = Integer.parseInt(args[0]);
	int x = Integer.parseInt(args[0]);
	int group1[7] = {1,3,5,7,8,10,12};
	int group2[4] = {4,6,9,11};
	int x_group;
	int y_group;
	
	for(int i=0;i=7;i++){
		if(x == group1[i]){
			x_group = 1;
		}else if(x == group2[i]){
			x_group = 2;
		}else{
			x_group = 3;
		}
	}
	
	for(int i=0;i=7;i++){
		if(y == group1[i]){
			y_group = 1;
		}else if(y == group2[i]){
			y_group = 2;
		}else{
			y_group = 3;
		}
	}
	
	if(x_group == y_group){
		System.out.println("yes");
	}else{
		System.out.println("no");
	}
	
	}
}

Compiler output:
Main.java:6: error: ']' expected
	int group1[7] = {1,3,5,7,8,10,12};
	           ^
Main.java:6: error: not a statement
	int group1[7] = {1,3,5,7,8,10,12};
	                 ^
Main.java:6: error: ';' expected
	int group1[7] = {1,3,5,7,8,10,12};
	                  ^
Main.java:7: error: ']' expected
	int group2[4] = {4,6,9,11};
	           ^
Main.java:7: error: not a statement
	int group2[4] = {4,6,9,11};
	                 ^
Main.java:7: error: ';' expected
	int group2[4] = {4,6,9,11};
	                  ^
6 errors
Language: C


#include "stdafx.h"

#include <stdio.h>

int main(void)
{
	int x = 0;
	int y = 0;
	int i = 0;

	int group_1[] = { 1,3,5,7,8,10,12 };
	int group_2[] = { 4,6,9,11 };

	printf("x,yの値を入力\n");
	scanf("%d%d", &x, &y);

	switch (x)
	{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:

			for (i = 0; i < 7; i++)
			{
				if (y == group_1[i])
				{
					printf("yes\n");
					return 0;
				}
				else if (i == 6)
				{
					printf("no\n");
					return 0;
				}
			}

		case 4:
		case 6:
		case 9:
		case 11:

			for (i = 0; i < 4; i++)
			{
				if (y == group_2[i])
				{
					printf("yes\n");
					return 0;
				}
				else if (i == 6)
				{
					printf("no\n");
					return 0;
				}
			}

		default:
			printf("no\n");
			return 0;

//		break;
	}

}

Compiler output:
main.c:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C


#include "stdafx.h"

#include <stdio.h>
#include <stdlib.h>



int main(void)
{
	int x = 0;
	int y = 0;
	int i = 0;

	int group_1[] = { 1,3,5,7,8,10,12 };
	int group_2[] = { 4,6,9,11 };

	printf("x,yの値を入力\n");
	scanf("%d%d", &x, &y);

	switch (x)
	{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:

			for (i = 0; i < 7; i++)
			{
				if (y == group_1[i])
				{
					printf("yes\n");
					system("pause");
					return 0;
				}
				else if (i == 6)
				{
					printf("no\n");
					system("pause");
					return 0;
				}
			}

		case 4:
		case 6:
		case 9:
		case 11:

			for (i = 0; i < 4; i++)
			{
				if (y == group_2[i])
				{
					printf("yes\n");
					system("pause");
					return 0;
				}
				else if (i == 6)
				{
					printf("no\n");
					system("pause");
					return 0;
				}
			}

		default:
			printf("no\n");
			system("pause");
			return 0;

//		break;
	}

}

Compiler output:
main.c:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

import java.util.HashSet;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		HashSet<Integer> group1 = new HashSet<Integer>();
		HashSet<Integer> group2 = new HashSet<Integer>();
		HashSet<Integer> group3 = new HashSet<Integer>();

		group1.add(1);
		group1.add(3);
		group1.add(5);
		group1.add(7);
		group1.add(8);
		group1.add(10);
		group1.add(12);

		group2.add(4);
		group2.add(6);
		group2.add(9);
		group2.add(11);

		group3.add(2);


		HashSet<Integer> agroup = null;

		if(group1.contains(a)){
			agroup = group1;
		}else if(group2.contains(a)){
			agroup = group2;
		}else if(group3.contains(a)){
			agroup = group3;
		}

		String yorn = "NO";
		if(agroup.contains(b)){
			yorn = "YES";
		}

		System.out.println(yorn);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.HashSet;
      | ^~~~~~
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.util.Scanner;
      | ^~~~~~
a.cc:2: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++

import java.util.HashSet;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		HashSet<Integer> group1 = new HashSet<Integer>();
		HashSet<Integer> group2 = new HashSet<Integer>();
		HashSet<Integer> group3 = new HashSet<Integer>();

		group1.add(1);
		group1.add(3);
		group1.add(5);
		group1.add(7);
		group1.add(8);
		group1.add(10);
		group1.add(12);

		group2.add(4);
		group2.add(6);
		group2.add(9);
		group2.add(11);

		group3.add(2);


		HashSet<Integer> agroup = null;

		if(group1.contains(a)){
			agroup = group1;
		}else if(group2.contains(a)){
			agroup = group2;
		}else if(group3.contains(a)){
			agroup = group3;
		}

		String yorn = "NO";
		if(agroup.contains(b)){
			yorn = "YES";
		}

		System.out.println();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.HashSet;
      | ^~~~~~
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.util.Scanner;
      | ^~~~~~
a.cc:2: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 "stdafx.h"
#include <stdio.h>

int main()
{
	int a[] = { 0,1,3,1,2,1,2,1,1,2,1,2,1 };
	int x, y;
	
	scanf("%d", &x);
	scanf("%d", &y);

	if (a[x] == a[y]) {
		printf("Yes\n");
	}
	else { printf("No\n"); }

	return 0;
}

Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include "stdafx.h"
#include <stdio.h>

int main()
{
	int a[] = { 0,1,3,1,2,1,2,1,1,2,1,2,1 };
	int x, y;
	
	scanf("%d", &x);
	scanf("%d", &y);

	if (a[x] == a[y]) {
		printf("YES\n");
	}
	else { printf("NO\n"); }

	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Todo {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();

		if (x == 2 && y == 2) {
			System.out.println("Yes");
		} else if ((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12) &&( y == 1 || y == 3 || y == 5
				|| y == 7 || y == 8 || y == 10 || y == 12)) {
			System.out.println("Yes");
		} else if ((x == 4 || x == 6 || x == 9 || x == 11) && (y == 4 || y == 6 || y == 9 || y == 11)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	}

}

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

#include<stdio.h>

int main(){
	int num[12]={0,2,0,1,,1,0,0,1,0,1,0};
	int x,y;
	scanf("%d%d",&x,&y);
	if(num[x]==num[y]) printf("Yes\n");
	else printf("No\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:30: error: expected expression before ',' token
    4 |         int num[12]={0,2,0,1,,1,0,0,1,0,1,0};
      |                              ^
Language: C++

#include <stdio.h>

int main(){
  int H,W;
  int square;
  scanf("%d %d",&H,&W);
  /*
    <=W=>
  ^
  |
  H
  |
  v
  */
  if(H%3==0 || W%3==0){
    printf("0\n");
    return 0;
  }
  //縦で分ける
  /*
  A B
  A C
  */
  square=(W/2)*H;//big
  square=square-(H*W-(W-(W/2))*H/2-square);//big - small
  //横
  /*
  A A
  B C
  */
  if((H/2)*W-(H*W-(H-(H/2))*W/2-((H/2)*W))<square)
    square=(H/2)*W-(H*W-(H-(H/2))*W/2-((H/2)*W);
  /*
  A
  B
  C
  */
  if(W<square)
    square=W;
  if(H<square)
    square=H;
  printf("%d",square);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:48: error: expected ')' before ';' token
   32 |     square=(H/2)*W-(H*W-(H-(H/2))*W/2-((H/2)*W);
      |                    ~                           ^
      |                                                )
Language: C++

# include <iostream>
# include <algorithm>
# include <vector>
using namespace std;
int main(){
  std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}};
  bool frag = true
  int x,y;
  cin >> x >> y;
  for(int i=0;i<3;i++){
    auto f1 = find(G[i].begin(),G[i].end(),x);
    auto f2 = find(G[i].begin(),G[i].end(),y);
    if (f1 != G[i].end() && f2 != G[i].end()) {
      cout << "Yes" << endl;
      frag = false;
    }
  }
  if(frag)
  cout << "No" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int x,y;
      |   ^~~
a.cc:9:10: error: 'x' was not declared in this scope
    9 |   cin >> x >> y;
      |          ^
a.cc:9:15: error: 'y' was not declared in this scope
    9 |   cin >> x >> y;
      |               ^
Language: C++

# include <iostream>
# include <algorithm>
# include <vector>
using namespace std;
int main(){
  std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}};
  bool frag = true
  int x,y;
  cin >> x >> y;
  for(int i=0;i<3;i++){
    auto f1 = find(G[i].begin(),G[i].end(),x);
    auto f2 = find(G[i].begin(),G[i].end(),y);
    if (f1 != G[i].end() && f2 != G[i].end()) {
      cout << "Yes" << endl;
      frag = false
    }
  }
  if(frag)
  cout << "No" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int x,y;
      |   ^~~
a.cc:9:10: error: 'x' was not declared in this scope
    9 |   cin >> x >> y;
      |          ^
a.cc:9:15: error: 'y' was not declared in this scope
    9 |   cin >> x >> y;
      |               ^
a.cc:15:19: error: expected ';' before '}' token
   15 |       frag = false
      |                   ^
      |                   ;
   16 |     }
      |     ~
Language: C++

# include <iostream>
# include <algorithm>
# include <vector>
using namespace std;
int main(){
  std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}};
  bool frag = true
  int x,y;
  cin >> x >> y;
  for(int i=0;i<3;i++){
    auto f1 = find(G[i].begin(),G[i].end(),x);
    auto f2 = find(G[i].begin(),G[i].end(),y);
    if (f1 != G[i].end() && f2 != G[i].end()) {
      cout << "Yes" << endl;
      flag = false
    }
  }
  if(frag)
  cout << "No" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int x,y;
      |   ^~~
a.cc:9:10: error: 'x' was not declared in this scope
    9 |   cin >> x >> y;
      |          ^
a.cc:9:15: error: 'y' was not declared in this scope
    9 |   cin >> x >> y;
      |               ^
a.cc:15:7: error: 'flag' was not declared in this scope; did you mean 'frag'?
   15 |       flag = false
      |       ^~~~
      |       frag
Language: C

#include <stdio.h>
long int returnGAP(long int w,long int h){
	long int ww, hh,s1,nowmin;
	if(w%3==0)return 0;
	ww =w/3;//以下Bなら
	hh = h/2;
	nowmin = (h-hh)*(w-ww) -(h*ww);
	s2 =(w-ww);
	if(s2>nowmin)nowmin=s2;
	ww++;
	s1 = (h*ww) -(hh*(w-ww));
	if(s1<nowmin)nowmin=s1;
	s2 =(w-ww);
	if(s2>s1 && s1==nowmin)nowmin=s2;
	return nowmin;
}

int main(void){
	long int k,l,x,y;
	scanf("%d %d",&k,&l);
	x =returnGAP(k,l);
	y =returnGAP(l,k);
	printf("%d",x>y? y:x);
	return 0;
}

Compiler output:
main.c: In function 'returnGAP':
main.c:8:9: error: 's2' undeclared (first use in this function); did you mean 's1'?
    8 |         s2 =(w-ww);
      |         ^~
      |         s1
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>


int main(void){

	int y,x;
	cin >> y >> x;

	int arr[13] = {0,1,2,1,3,1,3,1,1,3,1,3,1};

	if(arr[y] == arr[x])
		cout << "Yes" << endl;
	else
		cout << "No" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> y >> x;
      |         ^~~
      |         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:12:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |                 cout << "Yes" << 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:12:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |                 cout << "Yes" << 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:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                 cout << "No" << 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:14:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                 cout << "No" << endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <complex>
#include <vector>
#include <cstdio>
#include <cmath>
#include <time.h>
#define all(c) ((c).begin(),(c).end())
#define rall(c) (c).rbegin(),(c).rend()
#define sort(v,n) sort(v,v+n)
#define vsort(v) sort(v.begin(),v.end())
#define vvsort(v) sort(v.begin(),v.end(),greater<int>())
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 999999999
using namespace std;
const ll MOD = 1e9 + 7;
const double PI = acos(-1.0);
//---------------------------------------------------------------------------------------------//
int x, y;

int main() {
	cin >> x >> y;
	if (x == 2 || y == 2) { cout << "No" << endl; return 0 }
	int a[4] = { 4,6,9,11 };
	bool flag = 0;
	for (int i = 0; i < 4; i++) {
		if (x == a[i])flag = 1;
	}
	bool flagb = 0;
	for (int i = 0; i < 4; i++) {
		if (y == a[i])flagb = 1;
	}
	if ((flag == 1 && flagb == 1) || (flag == 0 && flagb == 0)) {
		cout << "Yes" << endl;
		return 0;
	}
	else {
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:63: error: expected ';' before '}' token
   35 |         if (x == 2 || y == 2) { cout << "No" << endl; return 0 }
      |                                                               ^~
      |                                                               ;
Language: C++

#include <iostream>
using namespace std;
int main(){
    int x,y;
    cin >> x >> y;
    if(x==1 || x==3 || x==5 || x==7 || x==8 || x==10 || x==12){
      if(y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12)printf("Yes"\n);
    }else if(x==4 || x==6 || x==9 || x==11){
      if(y==4 || y==6 || y==9 || y==11)printf("Yes\n");
    }else if(x==2 && y==2){
      printf("Yes\n");
    }else{
      printf("No\n");
    }
    return 0;
}
 

Compiler output:
a.cc:7:77: error: stray '\' in program
    7 |       if(y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12)printf("Yes"\n);
      |                                                                             ^
a.cc: In function 'int main()':
a.cc:7:77: error: expected ')' before 'n'
    7 |       if(y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12)printf("Yes"\n);
      |                                                                       ~     ^~
      |                                                                             )
Language: C++

#include <iostream>
#include<algorithm>
#include <vector>
#include <complex>
#include <map>
using namespace std;

int main() {
	int s1[7]={1,3,5,7,8,10,12};
	int s2[4]={4,6,9,11,13,13,13};
	int s3[2]={2,0,0,0,0,0,0};
	int x,y;
	cin>>x>>y;
	for(int i=0;i<7;++i){
		if(x==s1[i]&&y==s1[i]){cout<<"Yes"<<endl;}
		else if(x==s2[i]&&y==s2[i]){cout<<"Yes"<<endl;}
		else if(x==s3[i]&&y==s3[i]){cout<<"Yes"<<endl;}
		else{cout<<"No"<<endl;}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: too many initializers for 'int [4]'
   10 |         int s2[4]={4,6,9,11,13,13,13};
      |                                     ^
a.cc:11:33: error: too many initializers for 'int [2]'
   11 |         int s3[2]={2,0,0,0,0,0,0};
      |                                 ^