fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main()
  5. {
  6. vector<bool>p={true,true,false,false};
  7. vector<bool>q={true,false,true,false};
  8. vector<bool>p_and_q={(p[0]&&q[0]),(p[1]&&q[1]),(p[2]&&q[2]),(p[3]&&q[3])};
  9. p[0]=!p[0];
  10. p[1]=!p[1];
  11. p[2]=!p[2];
  12. p[3]=!p[3];
  13. vector<bool>result={(p[0]&&p_and_q[0]),(p[1]&&p_and_q[1]),(p[2]&&p_and_q[2]),(p[3]&&p_and_q[3])};
  14. for(auto x : result )
  15. {
  16. cout<<(x?"T":"F")<<"\n";
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 544KB
stdin
Standard input is empty
stdout
F
F
F
F