Advertisement
erfanul007

Untitled

Nov 25th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,fh1,fh2,fm1,fm2,eh1,eh2,em1,em2,i,f1,f2,e1,e2;
  5. char s1[10],s2[10],s3[10],s4[10];
  6. freopen("input.txt","r",stdin);
  7. scanf("%d",&n);
  8. for(i=1;i<=n;i++){
  9. scanf("%s %s",s1,s2);
  10. scanf("%s %s",s3,s4);
  11. f1=((s1[0]*10+s1[1])*60)+(s1[3]*10+s1[4]);
  12. f2=((s2[0]*10+s2[1])*60)+(s2[3]*10+s2[4]);
  13. e1=((s3[0]*10+s3[1])*60)+(s3[3]*10+s3[4]);
  14. e2=((s4[0]*10+s4[1])*60)+(s4[3]*10+s4[4]);
  15. if((e1>=f1 && e1<=f2)||(e2>=f1 && e2<=f2))
  16. printf("Case %d: Mrs Meeting\n",i);
  17. else
  18. printf("Case %d: Hits Meeting\n",i);
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement