結果

問題 No.2109 Special Week
ユーザー kpinkcatkpinkcat
提出日時 2023-09-23 23:01:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,067 bytes
コンパイル時間 2,108 ms
コンパイル使用メモリ 200,800 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-23 23:01:47
合計ジャッジ時間 4,363 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 RE -
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 2 ms
4,376 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 RE -
testcase_35 WA -
testcase_36 AC 2 ms
4,376 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using ll = long long;
using namespace std;

int main()
{
    ll m, d, k, cnt = 0;
    cin >> m >> d >> k;
    vector<int> dd = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, v(10);
    for (int i = 0; i < 7; i++){
        int td = d + i;
        if (td > dd[m-1]){
            m++;
            td -= dd[m-1];
        }
        if (m == 13) m = 1;
        if (m < 10) {
            v[0]++;
            v[m]++;
        } else {
            v[1]++;
            v[m%10]++;
        }
        if (d < 10){
            v[0]++;
            v[td%10]++;
        } else if (d < 20){
            v[1]++;
            v[td%10]++;
        } else if (d < 30){
            v[2]++;
            v[td%10]++;
        } else {
            v[3]++;
            v[td%10]++;
        }
    }
    for (int i = 0; i < 10; i++){
        if (v[i]) cnt++;
    }
    cout << ((cnt >= k) ? "Yes" : "No") << endl; 
}
0