71662024-01-01 12:57:59MagyarKendeSZLGVilágnaptár (45 pont)cpp17Wrong answer 15/453ms4176 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)

using namespace std;

/*const int N_lengthS[13] = {
    0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};

const int S_lengthS[13] = {
    0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};*/

const int W_lengthS[13] = {
    0, 31, 30, 30, 31, 30, 30, 31, 30, 30, 31, 30, 30
};

int main() {
    speed;

    int Y, M, D;
    cin >> Y >> M >> D;
    cout << Y;
    if (Y % 4) {
        if (M == 12 && D == 31) {
            cout << " 12 VN";
        } else {
            cout << ' ' << M << ' ' << D;
        }
    } else {
        if (M == 7 && D == 1) {
            cout << " 6 SZN";
            exit(0);
        } else if (M >= 7) {
            if (D == 1) {
                M--;
                D = W_lengthS[M];
            } else {
                D--;
            }
        }
        cout << ' ' << M << ' ' << D;
    }
}
SubtaskSumTestVerdictTimeMemory
base15/45
1Accepted0/03ms1892 KiB
2Accepted0/03ms2084 KiB
3Accepted0/03ms2292 KiB
4Accepted2/23ms2508 KiB
5Accepted2/23ms2724 KiB
6Accepted3/33ms2944 KiB
7Wrong answer0/33ms3048 KiB
8Accepted3/33ms3164 KiB
9Wrong answer0/33ms3264 KiB
10Wrong answer0/33ms3456 KiB
11Wrong answer0/33ms3668 KiB
12Wrong answer0/33ms3884 KiB
13Wrong answer0/33ms3960 KiB
14Wrong answer0/33ms3960 KiB
15Wrong answer0/33ms3960 KiB
16Wrong answer0/33ms4100 KiB
17Wrong answer0/33ms4176 KiB
18Accepted2/23ms4172 KiB
19Accepted3/33ms4176 KiB