Advertisement
Nayeemzaman

Untitled

Sep 2nd, 2019
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.24 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #include<string>
  3. #include<vector>
  4.  
  5. using namespace std;
  6.  
  7. typedef long long ll;
  8. typedef long double ld;
  9. typedef unsigned long long ull;
  10. typedef long long li;
  11.  
  12. #define ms(x,a)     memset(x,a,sizeof(x))
  13. #define forn(i, n)  for (int i = 0; i < int(n); i++)
  14. #define pi          acos(0.0)*2 // 3.1415926535897932
  15. #define mxx         10000007
  16. #define mod         10000007
  17. #define pb          push_back
  18.  
  19. void inOut();
  20.  
  21. int main()
  22. {
  23.     //inOut();
  24.     int i,j,k,q,n;
  25.     string s;
  26.     int tc = 0;
  27.  
  28.     scanf("%lld", &n);
  29.  
  30.     while(n--)
  31.     {
  32.         int h1[2],m1[2],h2[2],m2[2];
  33.         scanf("%d:%d %d:%d", &h1[0],&m1[0],&h2[0],&m2[0]);
  34.         int wst=(h1[0]*60)+m1[0], wet=(h2[0]*60)+m2[0];
  35.  
  36.         scanf("%d:%d %d:%d", &h1[1],&m1[1],&h2[1],&m2[1]);
  37.         int mst=(h1[1]*60)+m1[1], met=(h2[1]*60)+m2[1];
  38.  
  39.         tc++;
  40.         if(wst>met || wet<mst)
  41.             printf("Case %d: Hits Meeting\n", tc);
  42.         else
  43.            printf("Case %d: Mrs Meeting\n", tc);
  44.     }
  45.  
  46.     return 0;
  47. }
  48.  
  49. void inOut()
  50. {
  51.     ios_base::sync_with_stdio(false);
  52.     cin.tie(NULL);
  53.  
  54.     #ifndef ONLINE_JUDGE
  55.         freopen("input.txt", "r", stdin);
  56.         //freopen("output.txt", "w", stdout);
  57.     #endif
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement