| 3 | using namespace std; |
| 4 | |
| 5 | bool solve(){ |
| 6 | int arr[3]; |
| 7 | int count = 0; |
| 8 | for(int i=0;i<3;i++){ // this loop takes the input and also check if the number given as input is 1 or 0 |
| 9 | cin >> arr[i]; |
| 10 | if(arr[i]==1){ |
| 11 | count++; // increments the count if the number given as input if 1 |
| 12 | } |
| 13 | } |
| 14 | if(count >=2){ // checks if 2 or more people are sure about the solution |
| 15 | return true; // returns true if 2 or more people are sure about the answer |
| 16 | } |
| 17 | |
| 18 | return false; // else returns false |
| 19 | } |
| 20 | |
| 21 | int main(){ |
| 22 | ios::sync_with_stdio(0); |