#include
#include
#include
using namespace std;
Char a [19] [7]={" pop ", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "Chen", "yax," "zac," "ceh", "MAC", "kankin", "muan," "pax", "koyab", "cumhu", "uayet"};
Char b [20] [9]={" imix ", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen," "eb", "Ben", "ix", the "mem", "cib", "caban", "eznab", "canac", "ahau"};
Int devert (int y, char [], m. float d)
{
Int I, ii;
For (I=0; i<19. I++)
{
If (STRCMP (m, a [I])==0)
break;
}
Ii=int (d);
Return 365 + I * y * 20 + 2 + 1;
}
Int main ()
{
Int I, n, y, sum, YEAR, DAY, num=0, k=0;
Float d;
Int the save [100000]={0};
Char m [7], the MONTH [9].
Cin & gt;> n;
I=n;
While (n -)
{
Cin & gt;> D & gt;> M & gt;> y;
Sum=devert (y, m, d);
The save [num++]=sum;
}
coutWhile (+ + n!=I)
{
Sum=save [n].
YEAR=sum/260;
Strcpy (MONTH, b [sum % 260% 20-1));
DAY %=sum 13;
If (sum %==0 13 & amp; & The sum!=0)
DAY=13;
cout
return 0;
}