#include <iostream>
using namespace std; // consider removing this line in serious projects
int main() {
bool isReverse(int x[], int y[], int sze);
int _a[3] = {1,2,3};
int _b[3] = {3,2,6};
int _c = 3;
cout << isReverse(_a, _b, _c);
}
bool isReverse(int x[], int y[], int sze){
int num = 0;
bool bng = true;
for (int i=(sze-1); i >= 0; i--){
if (x[num] == y[i]){
bng = true;
num++;}
else{
bng = false;
num++;}
}
return bng;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAvLyBjb25zaWRlciByZW1vdmluZyB0aGlzIGxpbmUgaW4gc2VyaW91cyBwcm9qZWN0cwoKaW50IG1haW4oKSB7CgkKYm9vbCBpc1JldmVyc2UoaW50IHhbXSwgaW50IHlbXSwgaW50IHN6ZSk7CgppbnQgX2FbM10gPSB7MSwyLDN9OwppbnQgX2JbM10gPSB7MywyLDZ9OwppbnQgX2MgPSAzOwoKY291dCA8PCBpc1JldmVyc2UoX2EsIF9iLCBfYyk7Cn0KCmJvb2wgaXNSZXZlcnNlKGludCB4W10sIGludCB5W10sIGludCBzemUpewoJaW50IG51bSA9IDA7Cglib29sIGJuZyA9IHRydWU7Cglmb3IgKGludCBpPShzemUtMSk7IGkgPj0gMDsgaS0tKXsKCQlpZiAoeFtudW1dID09IHlbaV0pewoJCQlibmcgPSB0cnVlOwoJCQludW0rKzt9CgkJZWxzZXsgCgkJCWJuZyA9IGZhbHNlOwoJCQludW0rKzt9CgkJCQoJfQoJcmV0dXJuIGJuZzsKfQ==