Advertisement
Guest User

Teste

a guest
Jul 23rd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main () {
  5. ios::sync_with_stdio (0);
  6. int n;
  7. cin >> n;
  8. int a=0,b=0;
  9. while (n--) {
  10. int x; cin >> x;
  11. a=!a;
  12. if (x==2) b=!b;
  13. }
  14. cout << a << endl;
  15. cout <<b << endl;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement