Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int b, a[31], c[40], d[40], we, wy;
- ///////////////////////////////
- int main() //
- {
- cin >> b;
- for(int i = 0; i < b; i++) cin >> a[i];
- for(int i = 0; i < 31; i++)
- if(a[i] % 2 == 0) c[i] = a[i];
- for(int i = 0; i < 31; i++)
- if(a[i] % 2 != 0) d[i] = a[i];
- for(int i = 0; i < 10; i++) if(d[i] != 0)
- {
- cout << d[i] << " ";
- we++;
- }
- cout << endl;
- for(int i = 0; i < 10; i++) if(c[i] != 0)
- {
- cout << c[i] << " ";
- wy++;
- }
- cout << endl;
- if(wy > we)
- cout << "YES";
- else
- cout << "NO";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement