Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- const int N = 3;
- unsigned int mas[] = { 0,1,1,0,1,0,0,1 };
- int M = 1 << N; bool check = true;
- for (int i = 0; i < M/2; i++) {
- if (mas[i] != mas[(M-1) - i]) check = true;
- else check = false;
- if (check == false) {
- cout << "no";
- break;
- }
- }
- if (check == true) cout << "yas";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement