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

#include <iostream>
#include <cmath>
#include <iomanip>

#define NUM_S 6

class Dice {
public:
	Dice(const int n[NUM_S]);

	int roll(char);
	int rollF();
	int rollR();
	int rollL();
	int rollB();
	int rollCwise();

	int getTop();
	int getF();
	int getR();
	int getL();
	int getB();
	int getBottom();

	void show();

private:
	int top, front, right, left, back, bottom;
};
using namespace std;


int main(void){
	int surface[NUM_S];
	int q, top, front;
	
	for (int i = 0; i < NUM_S; i++) {
		cin >> surface[i];
	}

	Dice dice(surface);

	cin >> q;

	for (int i = 0; i < q; i++) {
		cin >> top >> front;
		if (dice.getR() == top || dice.getL() == top) dice.rollR;
		while (dice.rollF() != top) {
			cout << 0;
		}
		while (dice.getF() != front) {
			dice.rollCwise();
			cout << 1;
		}
		cout << dice.getR() << "\n";
	}

	return 0;
}


Dice::Dice(const int n[NUM_S]) {
	top = n[0];
	front = n[1];
	right = n[2];
	left = n[3];
	back = n[4];
	bottom = n[5];
}

int Dice::roll(char c) {
	if (c == 'S') {
		return rollF();
	}
	else if (c == 'E') {
		return rollR();
	}
	else if (c == 'W') {
		return rollL();
	}
	else if (c == 'N') {
		return rollB();
	}
}

int Dice::rollF() {
	int buf = top;
	top = back;
	back = bottom;
	bottom = front;
	front = buf;
	return top;
}

int Dice::rollR() {
	int buf = top;
	top = left;
	left = bottom;
	bottom = right;
	right = buf;
	return top;
}

int Dice::rollL() {
	int buf = top;
	top = right;
	right = bottom;
	bottom = left;
	left = buf;
	return top;
}

int Dice::rollB() {
	int buf = top;
	top = front;
	front = bottom;
	bottom = back;
	back = buf;
	return top;
}

int Dice::rollCwise() {
	int buf = left;
	left = front;
	front = left;
	left = back;
	back = buf;
}

int Dice::getTop() {
	return top;
}

int Dice::getF() {
	return front;
}

int Dice::getR() {
	return right;
}


int Dice::getL() {
	return left;
}


int Dice::getB() {
	return back;
}


int Dice::getBottom() {
	return bottom;
}


void Dice::show() {
	cout << top << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:68: error: invalid use of non-static member function 'int Dice::rollR()'
   47 |                 if (dice.getR() == top || dice.getL() == top) dice.rollR;
      |                                                               ~~~~~^~~~~
a.cc:13:13: note: declared here
   13 |         int rollR();
      |             ^~~~~
a.cc: In member function 'int Dice::rollCwise()':
a.cc:128:1: warning: no return statement in function returning non-void [-Wreturn-type]
  128 | }
      | ^
a.cc: In member function 'int Dice::roll(char)':
a.cc:84:1: warning: control reaches end of non-void function [-Wreturn-type]
   84 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

class Cube {
public:
	int f[6];
	Cube() {}
	void roll_z() { roll(1, 2, 4, 3); }
	void roll_y() { roll(0, 2, 5, 3); }
	void roll_x() { roll(0, 1, 5, 4); }
	void roll(int i, int j, int k, int l) {
		int t = f[i]; f[i] = f[j], f[j] = f[k]; f[k] = f[l]; f[l] = t;
	}
};

int getRight(Cube c1, int f1, int f2) {
	for (int i = 0; i < 6; i++) {
		for (int j = 0; j < 4; j++) {
			if (c1, f[0] = f1&&c1.f[1] = f2)return c1, f[2];
			c1.roll_z();
		}
		if (i % 2 == 0)c1.roll_y;
		else c1.roll_x;
	}
	return -1;
}

int main() {
	Cube c;
	int f1, f2;

	for (int i = 0; i < 6; i++)cin >> c.f[i];
	int q; cin >> q;

	for (int i = 0; i < q; i++) {
		cin >> f1 >> f2;
		cout << getRight(c, f1, f2) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int getRight(Cube, int, int)':
a.cc:19:33: error: 'f' was not declared in this scope
   19 |                         if (c1, f[0] = f1&&c1.f[1] = f2)return c1, f[2];
      |                                 ^
a.cc:19:42: error: lvalue required as left operand of assignment
   19 |                         if (c1, f[0] = f1&&c1.f[1] = f2)return c1, f[2];
      |                                        ~~^~~~~~~~~
a.cc:22:35: error: invalid use of non-static member function 'void Cube::roll_y()'
   22 |                 if (i % 2 == 0)c1.roll_y;
      |                                ~~~^~~~~~
a.cc:9:14: note: declared here
    9 |         void roll_y() { roll(0, 2, 5, 3); }
      |              ^~~~~~
a.cc:23:25: error: invalid use of non-static member function 'void Cube::roll_x()'
   23 |                 else c1.roll_x;
      |                      ~~~^~~~~~
a.cc:10:14: note: declared here
   10 |         void roll_x() { roll(0, 1, 5, 4); }
      |              ^~~~~~
Language: C++

#include<iostream>
using namespace std;

class Cube {
public:
	int f[6];
	Cube() {}
	void roll_z() { roll(1, 2, 4, 3); }
	void roll_y() { roll(0, 2, 5, 3); }
	void roll_x() { roll(0, 1, 5, 4); }
	void roll(int i, int j, int k, int l) {
		int t = f[i]; f[i] = f[j], f[j] = f[k]; f[k] = f[l]; f[l] = t;
	}
};

bool equal(Cube c1, Cube c2) {
	for (int i = 0; i < 6; i++) {
		for (int j = 0; j < 4; j++) {
			if (eq(c1, c2))return true;
			c1.roll_z;
		}
		if (i % 2 == 0)c1.roll_y;
		else c1.roll_x;
	}
	return false;
}

int main() {
	Cube c1, c2;

	for (int i = 0; i < 6; i++)cin >> c1.f[i];
	for (int i = 0; i < 6; i++)cin >> c2.f[i];

	if (equal(c1, c2))cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;

}

Compiler output:
a.cc: In function 'bool equal(Cube, Cube)':
a.cc:19:29: error: 'eq' was not declared in this scope
   19 |                         if (eq(c1, c2))return true;
      |                             ^~
a.cc:20:28: error: invalid use of non-static member function 'void Cube::roll_z()'
   20 |                         c1.roll_z;
      |                         ~~~^~~~~~
a.cc:8:14: note: declared here
    8 |         void roll_z() { roll(1, 2, 4, 3); }
      |              ^~~~~~
a.cc:22:35: error: invalid use of non-static member function 'void Cube::roll_y()'
   22 |                 if (i % 2 == 0)c1.roll_y;
      |                                ~~~^~~~~~
a.cc:9:14: note: declared here
    9 |         void roll_y() { roll(0, 2, 5, 3); }
      |              ^~~~~~
a.cc:23:25: error: invalid use of non-static member function 'void Cube::roll_x()'
   23 |                 else c1.roll_x;
      |                      ~~~^~~~~~
a.cc:10:14: note: declared here
   10 |         void roll_x() { roll(0, 1, 5, 4); }
      |              ^~~~~~
Language: C++

#include<iostream>
using namespace std;

class Cube {
public:
	int f[6];
	Cube() {}
	void roll_z() { roll(1, 2, 4, 3); }
	void roll_y() { roll(0, 2, 5, 3); }
	void roll_x() { roll(0, 1, 5, 4); }
	void roll(int i, int j, int k, int l) {
		int t = f[i]; f[i] = f[j], f[j] = f[k]; f[k] = f[l]; f[l] = t;
	}
};

int getRight(Cube c1, int f1, int f2) {
	for (int i = 0; i < 6; i++) {
		for (int j = 0; j < 4; j++) {
			if (c1, f[0] == f1&&c1.f[1] == f2)return c1, f[2];
			c1.roll_z();
		}
		if (i % 2 == 0)c1.roll_y();
		else c1.roll_x();
	}
	return -1;
}

int main() {
	Cube c;
	int f1, f2;

	for (int i = 0; i < 6; i++)cin >> c.f[i];
	int q; cin >> q;

	for (int i = 0; i < q; i++) {
		cin >> f1 >> f2;
		cout << getRight(c, f1, f2) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int getRight(Cube, int, int)':
a.cc:19:33: error: 'f' was not declared in this scope
   19 |                         if (c1, f[0] == f1&&c1.f[1] == f2)return c1, f[2];
      |                                 ^
Language: C++

#include<stdio.h>
typedef struct {
	char direction[100];
	int num1,num2,num3,num4,num5,num6;
}DICE_t;
int main(){
	DICE_t a;
	scanf("%d %d %d %d %d %d",&a.num1,&a.num2,&a.num3,&a.num4,&a.num5,&a.num6);
	int n,x,y,dummy;
	scanf("%d",&n);
	for(int times=0;times<n;times++){
	while(1){
		scanf("%d %d",&x,&y);
		if(a.num1!=x){
			a.direction='NE'
		}
		else if(a.num1==x&&a.num2!=y){
			a.direction='SEN'
		}
		else if(a.num1==x&&a.num2==y)break;
	    for(int i=0;a.direction[i]!=0;i++){
	        if(a.direction[i]=='N'){
		        dummy=a.num5;
	        	a.num5=a.num1;
	        	a.num1=a.num2;
	        	a.num2=a.num6;
	        	a.num6=dummy;
	        }
	        else if(a.direction[i]=='S'){
		         dummy=a.num6;
	        	a.num6=a.num2;
	        	a.num2=a.num1;
	        	a.num1=a.num5;
	        	a.num5=dummy;
	        }
	        else if(a.direction[i]=='E'){
		        dummy=a.num4;
	        	a.num4=a.num6;
	        	a.num6=a.num3;
	        	a.num3=a.num1;
	        	a.num1=dummy;
	        }
	        else if(a.direction[i]=='W'){
	            dummy=a.num1;
	        	a.num1=a.num3;
	        	a.num3=a.num6;
	        	a.num6=a.num4;
	        	a.num4=dummy;
	        }
        }
	}
	printf("%d",a.num3);
	}
	
	return 0;
}

Compiler output:
a.cc:15:37: warning: multi-character character constant [-Wmultichar]
   15 |                         a.direction='NE'
      |                                     ^~~~
a.cc:18:37: warning: multi-character character constant [-Wmultichar]
   18 |                         a.direction='SEN'
      |                                     ^~~~~
a.cc: In function 'int main()':
a.cc:15:36: error: incompatible types in assignment of 'int' to 'char [100]'
   15 |                         a.direction='NE'
      |                         ~~~~~~~~~~~^~~~~
a.cc:18:36: error: incompatible types in assignment of 'int' to 'char [100]'
   18 |                         a.direction='SEN'
      |                         ~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;
class Cube{
public:
int f[6];
Cube(){}
void roll_z(){ roll(1,2,4,3);}
void roll_y(){ roll(0,2,5,3);}
void roll_x(){ roll(0,1,5,4);}
void roll(int i,int j,int k,int l){
int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
}
};
int getRight(Cube c1,int f1,int f2){
for(int i=0,i<6;i++){
for(int j=0;j<4;j++){
if(c1.f[0]==f1&&c1.f[1]==f2)return c1.f[2];
c1.roll_z();
}
if(i%2==0) c1.roll_y();
else c1.roll_x();
}
return -1;
}
int main(){
Cube c;
int f1,f2;
for(int i=0;i<6;i++) cin >>c.f[i];
int q; cin >>q;
for(int i=0;i<q;i++){
cin >>f1 >>f2;
cout <<getRight(c,f1,f2) <<endl;
}
return 0;
}
return 0;
}

Compiler output:
a.cc: In function 'int getRight(Cube, int, int)':
a.cc:15:14: error: expected ';' before '<' token
   15 | for(int i=0,i<6;i++){
      |              ^
      |              ;
a.cc:15:14: error: expected primary-expression before '<' token
a.cc: At global scope:
a.cc:36:1: error: expected unqualified-id before 'return'
   36 | return 0;
      | ^~~~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
class Cube{
public:
int f[6];
Cube(){}
void roll_z(){ roll(1,2,4,3);}
void roll_y(){ roll(0,2,5,3);}
void roll_x(){ roll(0,1,5,4);}
void roll(int i,int j,int k,int l){
int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
}
};
int getRight(Cube c1,int f1,int f2){
for(int i=0,i<6;i++){
for(int j=0;j<4;j++){
if(c1.f[0]==f1&&c1.f[1]==f2)return c1.f[2];
c1.roll_z();
}
if(i%2==0) c1.roll_y();
else c1.roll_x();
}
return -1;
}
int main(){
Cube c;
int f1,f2;
for(int i=0;i<6;i++) cin >>c.f[i];
int q; cin >>q;
for(int i=0;i<q;i++){
cin >>f1 >>f2;
cout <<getRight(c,f1,f2) <<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int getRight(Cube, int, int)':
a.cc:15:14: error: expected ';' before '<' token
   15 | for(int i=0,i<6;i++){
      |              ^
      |              ;
a.cc:15:14: error: expected primary-expression before '<' token
Language: C++

#include <iostream>
#include <string>

using namespace std;
class Dice{
public:
int dice[6];

int getAns(){return dice[2];}

int a(){return dice[0];}

int b(){return dice[1];}

void input(){
	for (int i = 0;i < 6;i++ ){
		cin >> dice[i];
	}
}

void moveS(){
	int dice2[6];
	int index_list[6] = {4,0,2,3,5,1};
	for (int i = 0 ; i < 6 ; i++ ){
		int idx = index_list[i];
		dice2[i] = dice[idx];
	}
	for (int i = 0 ; i < 6 ; ++i){
		dice[i] = dice2[i];
	}
}


void moveW(){
	int dice2[6];
	int index_list[6] = {2,1,5,0,4,3};
	for (int i = 0 ; i < 6 ; i++ ){
		int idx = index_list[i];
		dice2[i] = dice[idx];
	}
	for (int i = 0 ; i < 6 ; ++i ){
		dice[i] = dice2[i];
	}
}

void moveX(){
	int dice2[6];
	int index_list[6] = {0,3,1,4,2,5};
	for (int i = 0 ; i < 6 ; i++ ){
		int idx = index _list[i];
		dice2[i] = dice[idx];
	}
	for(int i = 0 ; i < 0 ; ++i ){
		dice[i] = dice2[i];
	}
}


};

int main(){
	Dice dice;
	dice.input();
	int p,a,b;
	cin >> p;
	for (int i = 0 ; i < p ; i++ ){
		cin >> a >> b;
		for (int j = 0 ; j < 4 ; j++ ){
			dice.moveS();
			if (a == dice.a() && b == dice.b()){
				cout << dice.getAns() << endl;

			}break;
		}

		for (int j = 0 ; j < 4 ; j++ ){
			dice.moveW();
			if (a == dice.a() && b == dice.b()){
				cout << dice.getAns() << endl;
			}break;
		}

		for (int j = 0 ; j < 4 ; j++ ){
			dice.moveX();
			if (a == dice.a() && b == dice.b()){
				cout << dice.getAns() << endl;
			}break;
		}

	}

	return 0;
}

Compiler output:
a.cc: In member function 'void Dice::moveX()':
a.cc:50:27: error: 'index' was not declared in this scope; did you mean 'idx'?
   50 |                 int idx = index _list[i];
      |                           ^~~~~
      |                           idx
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d[6],q,a,b;

 for(int i=0;i<6;i++){
  cin >> d[i] ;
 }

 cin >> q ;

 for(int i=0;i<q;i++){
  cin >> a >> b ;
  while(1){
   if(d[0]==a)break;
   else{
    tmp=d[0];
    d[0]=d[3];
    d[3]=d[5];
    d[5]=d[2];
    d[2]=tmp;
   }
  }
  while(1){
   if(d[1]==b)break;
   else{
    tmp=d[0];
    d[0]=d[1];
    d[1]=d[5];
    d[5]=d[4];
    d[4]=tmp;
   }
  }
  cout << d[3] << endl ;
 }
 return 0;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   18 |     tmp=d[0];
      |     ^~~
      |     tm
a.cc:28:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   28 |     tmp=d[0];
      |     ^~~
      |     tm
Language: C++

#include <iostream>
using namespace std;

int main(){
 int d[6],q,a,b,j=0;

 for(int i=0;i<6;i++){
  cin >> d[i] ;
 }

 cin >> q ;

 for(int i=0;i<q;i++){
  cin >> a >> b ;
  while(1){
   if(d[1]==b)break;
   tmp=d[0];
   d[0]=d[3];
   d[3]=d[5];
   d[5]=d[2];
   d[2]=tmp;
   if(j==4){
    tmp=d[0];
    d[0]=d[1];
    d[1]=d[5];
    d[5]=d[4];
    d[4]=tmp;
   }
  j++;
  }
  while(1){
   if(d[0]==a)break;
   tmp=d[0];
   d[0]=d[2];
   d[2]=d[5];
   d[5]=d[3];
   d[3]=tmp;
  }

  cout << d[3] << endl ;
 }
 return 0;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:4: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   17 |    tmp=d[0];
      |    ^~~
      |    tm
a.cc:33:4: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   33 |    tmp=d[0];
      |    ^~~
      |    tm
Language: C++

#include <iostream>
using namespace std;

class Cube{
public:
  int f[6];
  Cube(){}
  void roll_z(){ roll(1, 2, 4, 3);}
  void roll_y(){ roll(0, 2, 5, 3);}
  void roll_x(){ roll(0, 1, 5, 4);}
  void roll(int i, int j, int k, int l){
    int t = f[i]; f[i] = f[j]; f[j]= f[k]; f[k] = f[l]; f[l] = t;
  }
};

int getRight(Cube c1, int f1, int f2){
  for ( int i = 0; i < 6; i++ ){
    for ( int j = 0; j < 4; j++ ){
      if (c1.f[0] == f1 && c1.f[1] == f2 ) return c1.f[2];
      c1.roll_z();
    }
    if (i % 2 == 0 ) c1.roll_y();
    else c1.roll_x();
  }
  return -1;
}

int main(){
  Cube c;
  int f1, f2;

  for (int i = 0; i <6; i++ ) cin >> c.f[i];
  int q; cin >> q;

  for (int i = 0; i < q; i++ )
    cin >> f1 >> f2;
    cout << getRight(c, f1, f2 ) << endl;
  }

  return 0;
}


  for ( int i = 0; i < com.size(); i++ ) c.move(com[i]);



  cout << c.f[0] << endl;

  return 0;
}

Compiler output:
a.cc:40:3: error: expected unqualified-id before 'return'
   40 |   return 0;
      |   ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
a.cc:44:3: error: expected unqualified-id before 'for'
   44 |   for ( int i = 0; i < com.size(); i++ ) c.move(com[i]);
      |   ^~~
a.cc:44:20: error: 'i' does not name a type
   44 |   for ( int i = 0; i < com.size(); i++ ) c.move(com[i]);
      |                    ^
a.cc:44:36: error: 'i' does not name a type
   44 |   for ( int i = 0; i < com.size(); i++ ) c.move(com[i]);
      |                                    ^
a.cc:48:3: error: 'cout' does not name a type
   48 |   cout << c.f[0] << endl;
      |   ^~~~
a.cc:50:3: error: expected unqualified-id before 'return'
   50 |   return 0;
      |   ^~~~~~
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
Language: C++








#include<stdc++.h>
using namespace std;
int s[7];
void solve(int n,int m)
{
	if(n==s[5]&&m==s[4]||n==s[3]&&m==s[5]||n==s[2]&&m==s[3]||n==s[4]&&m==s[2])
		cout<<s[1]<<endl;
	if(n==s[3]&&m==s[2]||n==s[5]&&m==s[3]||n==s[4]&&m==s[5]||n==s[2]&&m==s[4])
		cout<<s[6]<<endl;
	if(n==s[1]&&m==s[4]||n==s[3]&&m==s[1]||n==s[6]&&m==s[3]||n==s[4]&&m==s[6])
		cout<<s[2]<<endl;
	if(n==s[4]&&m==s[1]||n==s[1]&&m==s[3]||n==s[3]&&m==s[6]||n==s[6]&&m==s[4])
		cout<<s[5]<<endl;
	if(n==s[1]&&m==s[2]||n==s[5]&&m==s[1]||n==s[6]&&m==s[5]||n==s[2]&&m==s[6])
		cout<<s[3]<<endl;
	if(n==s[2]&&m==s[1]||n==s[1]&&m==s[5]||n==s[5]&&m==s[6]||n==s[6]&&m==s[2])
		cout<<s[4]<<endl;


}
int main()
{
	int n,m,q;
for(int i=1;i<=6;i++)
		cin>>s[i];
cin>>q;
for(int i=0;i<q;i++)
	{	cin>>n>>m;
		solve(n,m);

}
return 0;

	

}

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

int p_r(dice d,int up,int front){
    auto rgen = std::bind(
        std::uniform_int_distribution<>(0,3),std::mt19937(time(nullptr))
    );
    char dir[]={'N','E','W','S'};
    while(up!=d[0]||front!=d[1]){
        d.mov(dir[rgen()]);
    }
    return d[2];
}

Compiler output:
a.cc:1:9: error: 'dice' was not declared in this scope
    1 | int p_r(dice d,int up,int front){
      |         ^~~~
a.cc:1:16: error: expected primary-expression before 'int'
    1 | int p_r(dice d,int up,int front){
      |                ^~~
a.cc:1:23: error: expected primary-expression before 'int'
    1 | int p_r(dice d,int up,int front){
      |                       ^~~
a.cc:1:32: error: expression list treated as compound expression in initializer [-fpermissive]
    1 | int p_r(dice d,int up,int front){
      |                                ^
Language: C++

d=input().split()
n={0:(1,2,4,3,1),1:(0,3,5,2,0),2:(0,1,5,4,0),3:(1,0,4,5,1),4:(0,2,5,3,0),5:(1,3,4,2,1)}
for _ in range(int(input())):
 t,f=[d.index(s) for s in input().split()]
 n=n[int(t)]
 print(d[n[n.index(int(f))+1]])


Compiler output:
a.cc:1:1: error: 'd' does not name a type
    1 | d=input().split()
      | ^
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for _ in range(int(input())):
      | ^~~
Language: C++

nt main(){
	int a[6],num,x,y;
	for(int i=0;i<6;i++)cin>>a[i];
	cin>>num;
	for(int i=0;i<num;i++){
		cin>>x>>y;
		if(x==a[0]&&y==a[1]||x==a[1]&&y==a[5]||x==a[5]&&y==a[4]||x==a[4]&&y==a[0]){
			cout<<a[2]<<endl;
		}

		if(x==a[1]&&y==a[0]||x==a[5]&&y==a[1]||x==a[4]&&y==a[5]||x==a[0]&&y==a[4]){
			cout<<a[3]<<endl;
		}

		if(x==a[3]&&y==a[1]||x==a[1]&&y==a[2]||x==a[2]&&y==a[4]||x==a[4]&&y==a[3]){
			cout<<a[0]<<endl;
		}

		if(x==a[1]&&y==a[3]||x==a[2]&&y==a[1]||x==a[4]&&y==a[2]||x==a[3]&&y==a[4]){
			cout<<a[5]<<endl;
		}

		if(x==a[0]&&y==a[3]||x==a[3]4&&y==a[5]||x==a[5]&&y==a[2]||x==a[2]&&y==a[0]){
			cout<<a[1]<<endl;
		}

		if(x==a[3]&&y==a[0]||x==a[5]&&y==a[3]||x==a[2]&&y==a[5]||x==a[0]&&y==a[2]){
			cout<<a[4]<<endl;
		}		
	
	}
}
		if(x==a[3]&&y==a[0]||x==a[5]&&y==a[3]||x==a[2]&&y==a[5]||x==a[0]&&y==a[2]){
			cout<<a[4]<<endl;
		}		
	
	}
}


Compiler output:
a.cc:1:1: error: 'nt' does not name a type; did you mean 'int'?
    1 | nt main(){
      | ^~
      | int
a.cc:33:17: error: expected unqualified-id before 'if'
   33 |                 if(x==a[3]&&y==a[0]||x==a[5]&&y==a[3]||x==a[2]&&y==a[5]||x==a[0]&&y==a[2]){
      |                 ^~
a.cc:37:9: error: expected declaration before '}' token
   37 |         }
      |         ^
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i < n; ++i)

class dice {
  private:
    int f[6];
  public:
    dice(int *a){
      int i;
      rep(i, 6) f[i] = a[i];
    }
    void n(){
      int t;
      t = f[0];
      f[0] = f[1];
      f[1] = f[5];
      f[5] = f[4];
      f[4] = t;
    }
    void s() {
      int t;
      t = f[0];
      f[0] = f[4];
      f[4] = f[5];
      f[5] = f[1];
      f[1] = t;
    }
    void w() {
      int t;
      t = f[0];
      f[0] = f[2];
      f[2] = f[5];
      f[5] = f[3];
      f[3] = t;
    }
    void e() {
      int t;
      t = f[0];
      f[0] = f[3];
      f[3] = f[5];
      f[5] = f[2];
      f[2] = t;
    }
    int print(int num) {
      return f[num];
    }
};

int main(void) {
  int a[6], i, q, j;
  char s[150];
  rep(i, 6) scanf("%d", &a[i]);
  dice d(a);
  int q;
  for(i = 0; i < q; ++i) {
    int t, s;
    scnaaf("%d%d", &t, &s);
    if(d.print(1) == t) d.n();
    else if(d.print(2) == t) d.w();
    else if(d.print(3) == t) d.e();
    else if(d.print(4) == t) d.s();
    else if(d.print(5) == t) d.n(), d.n();
    if(d.print(1) == s) printf("%d\n", d.print(2));
    else if(d.print(2) == s) printf("%d\n", d.print(4));
    else if(d.print(3) == s) printf("%d\n", d.print(1));
    else if(d.print(4) == s) printf("%d\n", d.print(3));
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:7: error: redeclaration of 'int q'
   55 |   int q;
      |       ^
a.cc:51:16: note: 'int q' previously declared here
   51 |   int a[6], i, q, j;
      |                ^
a.cc:58:5: error: 'scnaaf' was not declared in this scope; did you mean 'scanf'?
   58 |     scnaaf("%d%d", &t, &s);
      |     ^~~~~~
      |     scanf
Language: C++

#include<bits/stdc++.h>
using namespace std;
/*
if(x=='N')
	{m1=d2;m2=d6;m6=d5;m5=d1;
	}
if(x=='S')
	{m1=d5;m5=d6;m6=d2;m2=d1;
	}
if(x=='W')
	{m3=d6;m6=d4;m4=d1;m1=d3;
	}
if(x=='E')
	{m6=d3;m3=d1;m1=d4;m4=d6;
	}
*/
int main(){
//DICE input
int d1,d2,d3,d4,d5,d6;
int x1,x2,x3,x4,x5,x6;
cin>>x1>>x2>>x3>>x4>>x5>>x6;
d1=x1,d2=x2,d3=x3,d4=x4,d5=x5,d6=x6;
int m1,m2,m3,m4,m5,m6;
//END DICE input
int a,x,y;
cin>>a;
for(int i=0;i<a;i++)
{
//DICE replace original
d1=x1;d2=x2;d3=x3;d4=x4;d5=x5;d6=x6;
//END DICE replace
//memory replace
m1=d1;m2=d2;m3=d3;m4=d4;m5=d5;m6=d6;
//
cin>>x>>y;
while(1)
{
for(int i3=0; i3<6 ; i3++)
	{
	for(int i2=0;i2<4;i2++)
		{
		m1=d1;m2=d2;m3=d3;m4=d4;m5=d5;m6=d6;
		m3=d6;m6=d4;m4=d1;m1=d3;
		d1=m1;d2=m2;d3=m3;d4=m4;d5=m5;d6=m6;
		if(d1==x && d2==y) {cout<<d3<<endl; break;}
		cout<<d1<<d2<<d3<<d4<<d5<<d6<<endl;
		}
	if(d1==x && d2==y) break;
	if(i3%2==0)
	{m1=d1;m2=d2;m3=d3;m4=d4;m5=d5;m6=d6;
	m3=d6;m6=d4;m4=d1;m1=d3;
	d1=m1;d2=m2;d3=m3;d4=m4;d5=m5;d6=m6;}
	if(i3%2==1)
	{m1=d1;m2=d2;m3=d3;m4=d4;m5=d5;m6=d6;
	m1=d2;m2=d6;m6=d5;m5=d1;
	d1=m1;d2=m2;d3=m3;d4=m4;d5=m5;d6=m6;}
	if(i3==5) cout<<"mitukattemasennde\n";
	}	
}

return 0;
}


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

#include <iostream>
#include <string>
using namespace std;
struct Dice{
    int s[6];
    void roll(char c){
        int tmp;
        if(c=='N'){
            tmp=s[0];
            s[0]=s[1];
            s[1]=s[5];
            s[5]=s[4];
            s[4]=tmp;
        }
        if(c=='E'){
            tmp=s[0];
            s[0]=s[3];
            s[3]=s[5];
            s[5]=s[2];
            s[2]=tmp;
        }
        if(c=='W'){
            tmp=s[0];
            s[0]=s[2];
            s[2]=s[5];
            s[5]=s[3];
            s[3]=tmp;
        }
        if(c=='S'){
            tmp=s[0];
            s[0]=s[4];
            s[4]=s[5];
            s[5]=s[1];
            s[1]=tmp;
        }
        if(c=='R'){
            tmp=s[1];
            s[1]=s[2];
            s[2]=s[4];
            s[4]=s[3];
            s[3]=tmp;
        }
    }
    int top(){
        return s[0];
    }
    int right(){
        return s[2];
    }
    int left(){
        return s[3];
    }
    int front(){
        return s[1];
    }
};


int main(void){
    Dice d;
    int n,a,b;
    
    for(int i=0; i<6; i++) cin>>d.s[i];
    cin>>n;
    for(int i=0; i<n; i++){
        cin>>t>>f;
        if(d.left()==t) d.roll('E');
        if(d.right()==t) d.roll('W');
        while(d.top()!=t) d.roll('N');
        while(d.front()!=f) d.roll('R');
        cout<<d.right()<<endl;
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:66:14: error: 't' was not declared in this scope
   66 |         cin>>t>>f;
      |              ^
a.cc:66:17: error: 'f' was not declared in this scope
   66 |         cin>>t>>f;
      |                 ^
Language: C++

#include <iostream>
using namespace std;

class Cube{
public;
 int f[6];
 Cube(){}
  void roll_z(){roll(1,2,4,3);}//
  void roll_y(){roll(0,2,5,3);}// to W
  void roll_x(){roll(0,1,5,4);}// to N
  void roll(int i, int j, int k, int l){
   int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
  }
 };

int getRight(Cube c1, int f1, int f2){
 for(int i=0; i<6; i++){
  for(int j=0; j<4; j++){
   if(c1.f[0]==f1 && c1.f[1]==f2) return c1.f[2];
   c1.roll_x();
  }
  if(i%2==0) c1.roll_y();
  else c1.roll_x();
 }
 return -1;
}
int main(){
 Cube c;
 int f1, f2;
 for(int i=0; i<6; i++) cin >> c.f[i];
 int q; cin>>q;
 for(int i=0; i<q; i++){
  cin >>f1 >>f2;
  cout << getRight (c, f1, f2) << endl;
 }
 return 0;
}
 


Compiler output:
a.cc:5:7: error: expected ':' before ';' token
    5 | public;
      |       ^
      |       :
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
 int n, x[100], y[100];
 cin >> n;
 for(int i=0; i<n; i++) cin >> x[i];
 for(int i=0; i<n; i++) cin >> y[i];

 double d[4];
 for(int i=0; i<4; i++){
  for(int i=0; i<n; i++){
   d[p] += pow(fabs(x[i]-y[i]), p);
  }
  d[p]=pow(d[p], 1.0/p);
 }
 for(int i=0; i<n; i++){
  d[0]=(d[0] < fabs(x[i]-y[i])?fabs(x[i]-y[i]):d[0]);
 }
 printf("%lf\n", d[1]);
 printf("%lf\n", d[2]);
 printf("%lf\n", d[3]);
 printf("%lf\n", d[0]);
 return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: 'p' was not declared in this scope
   15 |    d[p] += pow(fabs(x[i]-y[i]), p);
      |      ^
a.cc:17:5: error: 'p' was not declared in this scope
   17 |   d[p]=pow(d[p], 1.0/p);
      |     ^
Language: C++

#include <iostream>
using namespace std;

class Cube{
public;
 int f[6];
 Cube(){}
 void roll_z(){roll(1,2,4,3);} //
 void roll_y(){roll(0,2,5,3);} // to W
 void roll_x(){roll(0,1,5,4);} // to N
 void roll(int i, int j, int k, int l){
  int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
 }
};

int getRight(Cube c1, int f1, int f2){
 for(int i=0; i<6; i++){
  for(int j=0; j<4; j++){
   of(c1.f[0]==f1 && c1.f[1]==f2) return c1.f[2];
   c1.roll_z();
  }
  if(i%2==0) c1.roll_y();
  else c1.roll_x();
 }
 return -1;
}

int main(){
 Cube c;
 int f1, f2;
 for(int i=0; i<6; i++) cin >> c.f[i];
 int q; cin >> q;
 for(int i=0; i<q; i++){
  cin >> f1 >> f2;
  cout << getRight(c, f1, f2) << endl;
 }
 return 0;
}
 


Compiler output:
a.cc:5:7: error: expected ':' before ';' token
    5 | public;
      |       ^
      |       :
a.cc: In function 'int getRight(Cube, int, int)':
a.cc:19:4: error: 'of' was not declared in this scope
   19 |    of(c1.f[0]==f1 && c1.f[1]==f2) return c1.f[2];
      |    ^~
Language: C++

#include <iostream>
using namespace std;

class Cube{
public;
 int f[6];
 Cube(){}
 void roll_z(){roll(1,2,4,3);} //
 void roll_y(){roll(0,2,5,3);} // to W
 void roll_x(){roll(0,1,5,4);} // to N
 void roll(int i, int j, int k, int l){
  int t=f[i]; f[i]=f[j]; f[j]=f[k]; f[k]=f[l]; f[l]=t;
 }
};

int getRight(Cube c1, int f1, int f2){
 for(int i=0; i<6; i++){
  for(int j=0; j<4; j++){
   if(c1.f[0]==f1 && c1.f[1]==f2) return c1.f[2];
   c1.roll_z();
  }
  if(i%2==0) c1.roll_y();
  else c1.roll_x();
 }
 return -1;
}

int main(){
 Cube c;
 int f1, f2;
 for(int i=0; i<6; i++) cin >> c.f[i];
 int q; cin >> q;
 for(int i=0; i<q; i++){
  cin >> f1 >> f2;
  cout << getRight(c, f1, f2) << endl;
 }
 return 0;
}
 


Compiler output:
a.cc:5:7: error: expected ':' before ';' token
    5 | public;
      |       ^
      |       :
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

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

		int fst_top = sc.nextInt();
		int fst_front = sc.nextInt();
		int fst_left = sc.nextInt();
		int fst_right = sc.nextInt();
		int fst_back = sc.nextInt();
		int fst_bottom = sc.nextInt();

		int snd_top = sc.nextInt();
		int snd_front = sc.nextInt();
		int snd_left = sc.nextInt();
		int snd_right = sc.nextInt();
		int snd_back = sc.nextInt();
		int snd_bottom = sc.nextInt();

		boolean ok = false;
		for (int v = 0; v <= 4; v++) {

			for (int t = 0; t < 4; t++) {
				//System.out.println(fst_top + " " + fst_front + " " + fst_left + " " + fst_right + " " + fst_back + " " + fst_bottom);
				
				if(fst_top == snd_top && fst_front == snd_front && fst_left == snd_left && 
						fst_right == snd_right && fst_back == snd_back && fst_bottom == snd_bottom){
					ok = true;
				}
				
				int tmp = fst_bottom;
				fst_bottom = fst_right;
				fst_right = fst_top;
				fst_top = fst_left;
				fst_left = tmp;
			}

			int tmp = fst_bottom;
			fst_botto		m = fst_front;
			fst_front = fst_top;
			fst_top = fst_back;
			fst_back = tmp;
		}

		System.out.println(ok ? "Yes" : "No");
	}
}

Compiler output:
Main.java:44: error: cannot find symbol
			fst_botto		m = fst_front;
			^
  symbol:   class fst_botto
  location: class Main
1 error
Language: Java

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



public class Java{
	public static void main(String[] args){

		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String str;
		String[] dice;
		int[] compare_dice=new int[6];
		int[] int_dice=new int[6];
		int count=0;

		try{

			str=reader.readLine();
			dice=str.split(" ");//{1,2,3,4,5,6}={dice[0], dice[1], ... ,dice[5]}={???, S, E, W, N, ???}
			for(int i=0;i<6;i++){
				int_dice[i]=Integer.parseInt(dice[i]);
			}

			str=reader.readLine();
			dice=str.split(" ");//{1,2,3,4,5,6}={dice[0], dice[1], ... ,dice[5]}={???, S, E, W, N, ???}
			for(int i=0;i<6;i++){
				compare_dice[i]=Integer.parseInt(dice[i]);
			}



			if(int_dice[0]!=compare_dice[0]){
				for(int j=0;j<3;j++){
				 roll('S', int_dice);
				 if(int_dice[0]==compare_dice[0])break;
				}
				if(int_dice[0]!=compare_dice[0]){
					for(int j=0;j<3;j++){
						roll('E', int_dice);
						if(int_dice[0]==compare_dice[0])break;
					}
				}
			}//?????¢????????????????????????


			if(int_dice[1]!=compare_dice[1]){

				for(int k=0;k<3;k++){
					rotate(int_dice);
					if(int_dice[1]==compare_dice[1])break;
				}
			}//?????¢????????????????????????



			for(int i=0;i<6;i++){
				if(int_dice[i]==compare_dice[i]){
					count++;
				}
			}

			if(count==6){System.out.println("Yes");}else{
				System.out.println("No");
			}






		}catch(IOException e){
			System.out.print(e);
		}
	}

	private static void rotate(int[] int_dice){
		//?¨????????????¢???????????????????????????
		int x=int_dice[3];
		int_dice[3]=int_dice[4];
		int_dice[4]=int_dice[2];
		int_dice[2]=int_dice[1];
		int_dice[1]=x;
	}

	private static void roll(char ch, int[] int_dice){
		int[] dice_for_change=new int[6];

		switch(ch){

		case 'S':
	    {
	    	dice_for_change[0]=int_dice[4];
	    	dice_for_change[1]=int_dice[0];
	    	dice_for_change[2]=int_dice[2];
	    	dice_for_change[3]=int_dice[3];
	    	dice_for_change[4]=int_dice[5];
	    	dice_for_change[5]=int_dice[1];

	    	}
		break;

		case 'E':
	    {
	    	dice_for_change[0]=int_dice[3];
	    	dice_for_change[1]=int_dice[1];
	    	dice_for_change[2]=int_dice[0];
	    	dice_for_change[3]=int_dice[5];
	    	dice_for_change[4]=int_dice[4];
	    	dice_for_change[5]=int_dice[2];

	    	}
		break;

		case 'N':
	    {//??????
	    	dice_for_change[0]=int_dice[1];
	    	dice_for_change[1]=int_dice[5];
	    	dice_for_change[2]=int_dice[2];
	    	dice_for_change[3]=int_dice[3];
	    	dice_for_change[4]=int_dice[0];
	    	dice_for_change[5]=int_dice[4];
        	}
		break;

		case 'W':
	    {
	    	dice_for_change[0]=int_dice[2];
	    	dice_for_change[1]=int_dice[1];
	    	dice_for_change[2]=int_dice[5];
	    	dice_for_change[3]=int_dice[0];
	    	dice_for_change[4]=int_dice[4];
	    	dice_for_change[5]=int_dice[3];
        	}
		break;
		}//switch
		for(int k=0;k<6;k++){
	    	int_dice[k]=dice_for_change[k];

		}//??¢?????????????????£??\


	}

}

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

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

public class Bekkai1 {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in));

		String[] d1labeldata = br.readLine().split(" ");
		String[] d2labeldata = br.readLine().split(" ");

		Dice d1 = new Dice(d1labeldata);
		Dice d2 = new Dice(d2labeldata);

		int top;
		for (top = 0; top < 6; top++) {
			if ( d1.label[0].equals(d2.label[top]) ) break;
		}

		//System.out.println(top);

		switch (top) {
		case 0:
			break;
		case 1:
			d2.koroN();
			break;
		case 2:
			d2.koroW();
			break;
		case 3:
			d2.koroE();
			break;
		case 4:
			d2.koroS();
			break;
		case 5:
			d2.koroN().koroN();
			break;
		default:
			System.out.println("No");
		}

		int front;
		for (front = 1; front <= 4; front++) {
			if ( d1.label[1].equals(d2.label[front]) ) break;
		}

		//System.out.println(front);

		switch (front) {
		case 1:
			break;
		case 2:
			d2.kaitenTokei();
			break;
		case 3:
			d2.kaitenHanTokei();
			break;
		case 4:
			d2.kaitenTokei().kaitenTokei();
			break;
		default:
			System.out.println("No");
		}

		if ( d1.label[2].equals(d2.label[2]) ) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

	static class Dice {
		String[] label;

		Dice(String[] labeldata) {
			label = new String[labeldata.length];

			for (int i = 0; i < labeldata.length; i++) {
				label[i] = labeldata[i];
			}
		}

		Dice koroN() {
			String temp;
			temp = label[0];
			label[0] = label[1];
			label[1] = label[5];
			label[5] = label[4];
			label[4] = temp;
			return this;
		}

		Dice koroS() {
			String temp;
			temp = label[0];
			label[0] = label[4];
			label[4] = label[5];
			label[5] = label[1];
			label[1] = temp;
			return this;
		}

		Dice koroE() {
			String temp;
			temp = label[0];
			label[0] = label[3];
			label[3] = label[5];
			label[5] = label[2];
			label[2] = temp;
			return this;
		}

		Dice koroW() {
			String temp;
			temp = label[0];
			label[0] = label[2];
			label[2] = label[5];
			label[5] = label[3];
			label[3] = temp;
			return this;
		}

		Dice kaitenTokei() {
			String temp;
			temp = label[1];
			label[1] = label[2];
			label[2] = label[4];
			label[4] = label[3];
			label[3] = temp;
			return this;
		}

		Dice kaitenHanTokei() {
			String temp;
			temp = label[1];
			label[1] = label[3];
			label[3] = label[4];
			label[4] = label[2];
			label[2] = temp;
			return this;
		}

	}

}

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

import java.util.*;
import Dice.*;

public class Main42ocopy{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int[] d = new int[6];
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice1 = new Dice(d);
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice2 = new Dice(d);
		int numT = dice1._d[TOP];
		int numS = dice1._d[SOUTH];
		boolean flg;
		dice2.setTop(numT);
		if(dice2.setSouth(numS)){
			if((dice1._d[NORTH] == dice2._d[NORTH]) && (dice1._d[EAST] == dice2._d[EAST]) && 
				(dice1._d[WEST] == dice2._d[WEST]) && (dice1._d[BOTTOM] == dice2._d[BOTTOM])){
				flg = true;
			} else{
				flg = false;
			}
		} else{
			flg = false;
		}
		System.out.println(flg? "Yes" : "No");
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public int show(int side){ // ??????????????????????????????
		return _d[side);
	}

	public void setTop(int num){
		if(_d[SOUTH] == num){
			rollNorth();
		} else if(_d[EAST] == num){
			rollWest();
		} else if(_d[WEST] == num){
			rollEast();
		} else if(_d[NORTH] == num){
			rollSouth();
		} else if(_d[BOTTOM] == num){
			rollNorth();
			rollNorth();
		}
	}

	public boolean setSouth(int num){
		for(int i = 0; i < 3; i++){
			if(_d[SOUTH] != num){
				rollRight();
			} else{
				return true;
			}
		}
		return false;
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:50: error: ']' expected
		return _d[side);
		              ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int[] d = new int[6];
		char[] c = { 'E', 'E', 'E', 'N', 'N', 'N' };
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice1 = new Dice(d);
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice2 = new Dice(d);

		boolean flg = false;
		for(char cc : c){
			roll(cc);
			if(Array.equals(dice1._d, dice2._d)){
				flg = true;
				break;
			}
		}
		System.out.println(flg? "Yes" : "No");
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void roll(char c){
		switch(c){
			case 'E' :
				rollEast();
				break;
			case 'N' :
				rollNorth();
				break;
			default :
				break;
		}
	}

	public int show(int side){ // ??????????????????????????????
		return _d[side];
	}

	public void setTop(int num){
		if(_d[SOUTH] == num){
			rollNorth();
		} else if(_d[EAST] == num){
			rollWest();
		} else if(_d[WEST] == num){
			rollEast();
		} else if(_d[NORTH] == num){
			rollSouth();
		} else if(_d[BOTTOM] == num){
			rollNorth();
			rollNorth();
		}
	}

	public void setSouth(int num){
		for(int i = 0; i < 4; i++){
			if(_d[SOUTH] != num){
				rollRight();
			}
		}
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
			roll(cc);
			^
  symbol:   method roll(char)
  location: class Main
Main.java:22: error: cannot find symbol
			if(Array.equals(dice1._d, dice2._d)){
			   ^
  symbol:   variable Array
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int[] d = new int[6];
		char[] c = { 'E', 'E', 'E', 'N', 'N', 'N' };
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice1 = new Dice(d);
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice2 = new Dice(d);

		boolean flg = false;
		for(char cc : c){
			dice2.roll(cc);
			if(Array.equals(dice1._d, dice2._d)){
				flg = true;
				break;
			}
		}
		System.out.println(flg? "Yes" : "No");
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void roll(char c){
		switch(c){
			case 'E' :
				rollEast();
				break;
			case 'N' :
				rollNorth();
				break;
			default :
				break;
		}
	}

	public int show(int side){ // ??????????????????????????????
		return _d[side];
	}

	public void setTop(int num){
		if(_d[SOUTH] == num){
			rollNorth();
		} else if(_d[EAST] == num){
			rollWest();
		} else if(_d[WEST] == num){
			rollEast();
		} else if(_d[NORTH] == num){
			rollSouth();
		} else if(_d[BOTTOM] == num){
			rollNorth();
			rollNorth();
		}
	}

	public void setSouth(int num){
		for(int i = 0; i < 4; i++){
			if(_d[SOUTH] != num){
				rollRight();
			}
		}
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
			if(Array.equals(dice1._d, dice2._d)){
			   ^
  symbol:   variable Array
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int[] d = new int[6];

		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice1 = new Dice(d);
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice2 = new Dice(d);

		
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
				if(flag == true)break;
				dice2.rollEast();
				flag = Arrays.equals(dice1._d, dice2._d);
			}
			dice2.rollNorth();
		}

		System.out.println(flag? "Yes" : "No");
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void roll(char c){
		switch(c){
			case 'E' :
				rollEast();
				break;
			case 'N' :
				rollNorth();
				break;
			case 'R' :
				rollRight();
				break;
			default :
				break;
		}
	}

	public int show(int side){ // ??????????????????????????????
		return _d[side];
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
				if(flag == true)break;
				   ^
  symbol:   variable flag
  location: class Main
Main.java:24: error: cannot find symbol
				flag = Arrays.equals(dice1._d, dice2._d);
				^
  symbol:   variable flag
  location: class Main
Main.java:29: error: cannot find symbol
		System.out.println(flag? "Yes" : "No");
		                   ^
  symbol:   variable flag
  location: class Main
3 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		int[] d = new int[6];

		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice1 = new Dice(d);
		for(int i = 0; i < 6; i++){
			d[i] = scan.nextInt();
		}
		Dice dice2 = new Dice(d);

		boolean flag = false;
		
		for(int j = 0; j < 4; j++){
			for(int k = 0; k < 4; k++){
				flag = Arrays.equals(dice1._d, dice2._d);
				if(flag == true)break;
				dice2.rollEast();
			}
			for(int k = 0; k < 4; k++){
				flag = Arrays.equals(dice1._d, dice2._d);
				if(flag == true)break;
				dice2.rollNorth();
			}
			flag = Arrays.equals(dice1._d, dice2._d);
			if(flag == true)break;
			dice2.rollRigth();
		}
		System.out.println(flag? "Yes" : "No");
	}
}

class Dice{

	int[] _d = new int[6];
	public static final int
		TOP = 0, SOUTH = 1, EAST = 2,
		WEST = 3, NORTH = 4, BOTTOM = 5; // ?????°

	public Dice(int[] d){ // ?????????????????????
		for(int i = 0; i < 6; i++){
			_d[i] = d[i];
		}
	}

	public void roll(char c){
		switch(c){
			case 'E' :
				rollEast();
				break;
			case 'N' :
				rollNorth();
				break;
			case 'R' :
				rollRight();
				break;
			default :
				break;
		}
	}

	public int show(int side){ // ??????????????????????????????
		return _d[side];
	}

	public void rollSouth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[NORTH];
		_d[NORTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[SOUTH];
		_d[SOUTH] = tmp;
	}

	public void rollNorth(){
		int tmp = _d[TOP];
		_d[TOP] = _d[SOUTH];
		_d[SOUTH] = _d[BOTTOM];
		_d[BOTTOM] = _d[NORTH];
		_d[NORTH] = tmp;
	}

	public void rollEast(){
		int tmp = _d[TOP];
		_d[TOP] = _d[WEST];
		_d[WEST] = _d[BOTTOM];
		_d[BOTTOM] = _d[EAST];
		_d[EAST] = tmp;
	}

	public void rollWest(){
		int tmp = _d[TOP];
		_d[TOP] = _d[EAST];
		_d[EAST] = _d[BOTTOM];
		_d[BOTTOM] = _d[WEST];
		_d[WEST] = tmp;
	}

	public void rollRight(){
		int tmp = _d[SOUTH];
		_d[SOUTH] = _d[WEST];
		_d[WEST] = _d[NORTH];
		_d[NORTH] = _d[EAST];
		_d[EAST] = tmp;
	}
}

Compiler output:
Main.java:34: error: cannot find symbol
			dice2.rollRigth();
			     ^
  symbol:   method rollRigth()
  location: variable dice2 of type Dice
1 error
Language: Java

import java.util.Scanner;

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

    	dice = new Dice[2];

    	for(int i = 0; i < 2; i++){
    		dice[i] = new Dice();
    	}

    	for(int i = 0; i < 2; i++){
    		for(int j = 0; j < 6; j++){
    			dice[i].surface[j] = scan.nextInt();
    		}
    	}

    	
		for(int i = 0; i < 4; i++){
			for(int j = 0; j < 4; j++){
			    for(int k = 0; k < 4; k++){
			   		dice[1].spinVertical();
					//?????¢??????????????´????????????????????????
			    		if(Arrays.equals(dice[0].surface, dice[1].surface)) {
			    			System.out.println("Yes");
			    			return;
			    		}
			        }
			    	dice[1].spinHorizontal();
		    	}
			dice[1].spinVertical();	
		}
    	System.out.println("No");
     }
}

/*
???????????????Dice
??????:?????????????????¢?????????
     ?????¢?????????????????¢?????\?????????
*/
class Dice{
	int[] surface = new int[6];

	public void spinVertical (){
		int temp3 = surface[0];
		surface[0] = surface[1];
		surface[1] = surface[5];
		surface[5] = surface[4];
		surface[4] = temp3;
	}

	public void spinHorizontal(){
		int temp2 = surface[0];
		surface[0] = surface[3];
		surface[3] = surface[5];
		surface[5] = surface[2];
		surface[2] = temp2;
	}
}

Compiler output:
Main.java:26: error: cannot find symbol
			    		if(Arrays.equals(dice[0].surface, dice[1].surface)) {
			    		   ^
  symbol:   variable Arrays
  location: class Main
1 error