Odpowiedź:
#include <iostream>
using namespace std;
int main()
{
bool takiesame = true;
int N, A[1024], B[1024];
cin >> N;
for (int i = 0; i < N; i++)cin >> A[i];
for (int i = N - 1; i >= 0; i--)cin >> B[i];
for(int i = 0;i<N;i++)
if(A[i]!=B[i])
{
takiesame = false;
break;
}
if (takiesame == true)cout << "TAK";
else cout << "NIE";
}