Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool f(int n)
- {
- static int x = 0;
- int a;
- cin >> a;
- if(n == 1 )cin >> x;
- else return f(n-1);
- if(x == a)return true;
- else return false;
- }
- int main()
- {
- int n; cin >> n;
- if(f(n)) cout <<"Da";
- else cout <<"NU";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment