UVA 12541 - Birthdates

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ll long long
#define sc scanf
#define pf printf
#define pi 2*acos(0.0)
using namespace std;
int main()
{
    int n,j=0,d,y,m,a;
    string name;
    mapmp;
    priority_queue< int >pq1;
    priority_queue< int >pq2;
    sc("%d",&n);
    while(n--)
    {
       cin>>name;
       sc("%d %d %d",&d,&m,&y);
       a=d+m*31+y*12*31;
       mp[a]=name;
       pq1.push(a);
       pq2.push(-a);
    }
        cout<<""<
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12541/12541.cpp