Tuesday, July 19, 2016

uva 12136 solution

Unknown
#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;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,