212772026-01-12 17:43:42ZsoltVilágnaptár (45 pont)cpp17Wrong answer 24/451ms516 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int ev,ho,nap;
    cin>>ev>>ho>>nap;
    vector<int>sznaptar= {0,31,28,31,30,31,30,31,31,30,31,30,31};
    vector<int>vnaptar= {0,31,30,30,31,30,30,31,30,30,31,30,30};
    if(ho==12 && nap==31)
    {
        cout<<ev<<" 12 VN";
        return 0;
    }
    if(ev%4==0 && ho==7 && nap==1)
    {
        cout<<ev<<" 6 SZN";
        return 0;
    }
    if(ev%4==0)
    {
        sznaptar[2]+=1;
        vnaptar[6]+=1;
    }
    for(int i=1; i<=12; i++)
    {
        sznaptar[i]+=sznaptar[i-1];
        vnaptar[i]+=vnaptar[i-1];
    }
    int napoksz=sznaptar[ho-1]+nap,i=12;
    while(napoksz<vnaptar[i])
    {
        i--;
    }
    cout<<ev<<" "<<i+1<<" "<<napoksz-vnaptar[i];
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base24/45
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Accepted0/01ms316 KiB
4Accepted2/21ms316 KiB
5Accepted2/21ms316 KiB
6Accepted3/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Accepted3/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Accepted3/31ms500 KiB
13Wrong answer0/31ms316 KiB
14Accepted3/31ms316 KiB
15Wrong answer0/31ms316 KiB
16Accepted3/31ms316 KiB
17Wrong answer0/31ms516 KiB
18Accepted2/21ms500 KiB
19Accepted3/31ms316 KiB