Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a[50][2];
  6. int n;
  7. int k1=0;
  8. int k2=0;
  9. int k3=0;
  10. int k4=0;
  11. cin >> n;
  12. for (int i = 0; i < n; i++) {
  13. cin >> a[i][0] >> a[i][1];
  14. }
  15. for (int i = 0; i < n; i++) {
  16. if (a[i][1]>0)
  17. if (a[i][0]>0) k1++; else k2++;
  18. else if (a[i][0]>0) k4++; else k3++;
  19. }
  20. if ((k2>=3)or(k2==2)and(k1>3)or(k3>5)or(k4>9))
  21. cout << "Clock is broken" << "\n";
  22. else cout << k2 << k1 << ":" << k3 << k4 << "\n";
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement