UVa : 11917 (Do Your Own Homework!)

Problem Solving, UVa

 

 

#include <bits/stdc++.h>

using namespace std;

int main()

{



    int n;

    cin>>n;

    int tc=1;

    while(n--)

    {

        int input;

        cin>>input;

        map<string,int>m;

        string s;

        int d;

       

    for(int i=1;i<=input;i++)

    {

        cin>>s>>d;

        m[s]=d;

    }

       

        int D;

        cin>>D;

        string k;

        cin>>k;

        printf ("Case %d: ", tc++);



        if ( m [k] && m [k] <= D )

         printf ("Yesss\n");

        else if ( m [k] && m [k] <= D + 5 )

         printf ("Late\n");

        else

        printf ("Do your own homework!\n");

   

    }

    return 0;

}

 

0 Comments

You may find interest following article

Complete Guide: Create Laravel Project in Docker Without Local Dependencies

Create Laravel Project Through Docker — No Need to Install PHP, MySQL, or Apache on Your Local Machine In this tutorial, I’ll show you how to create and run a full Laravel project using Docker containers. That means you won’t have to install PHP, MySQL, or Apache locally on your computer. By the end of this guide, you’ll have a fully functional Laravel development...