Tuesday, July 19, 2016

Published July 19, 2016 by with 0 comment

uva 12136 solution

#include<cstdio>
using namespace std;
int main()
{
    int tc,c=1;
    scanf("%d",&tc);
    while (tc--)
    {
        int h,m,wstart,wend,mstart,mend;
        scanf("%d:%d",&h,&m);
        wstart=h*100+m;
        scanf("%d:%d",&h,&m);
        wend=h*100+m;
        scanf("%d:%d",&h,&m);
        mstart=h*100+m;
        scanf("%d:%d",&h,&m);
        mend=h*100+m;
        if (mend<wstart || mstart>wend) printf("Case %d: Hits Meeting\n",c++);
        else printf("Case %d: Mrs Meeting\n",c++);
    }
    return 0;
}
      edit

0 comments:

Post a Comment