結果

問題 No.2109 Special Week
ユーザー soragsorag
提出日時 2022-10-28 22:29:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,326 bytes
コンパイル時間 1,086 ms
コンパイル使用メモリ 120,400 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-20 05:34:44
合計ジャッジ時間 2,844 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include<random>
#include<utility>
#include <vector>
#include <regex>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#include<set>
#include<cstring>
#include<algorithm>
#define pb push_back
#define all(x) begin(x),end(x)
#define gall(x) begin(x),end(x),greater<>()
#define ll long long
#define P pair<int,int>
#define lP pair<ll,ll>
#define bit(x,i) (x>>i&1)
using namespace std;

int main(){
    vector<int> g(32);
    int m,d,k;
    cin>>m>>d>>k;
    g[m]++;
    g[d]++;
    set<char> st;
    for(int i=d;i<=d+7;i++){
        if(m==1 or m==3 or m==5 or m==7 or m==8 or
           m==10 or m==12) {
            if(i>=32) {
                g[(m+1)%12]++;
                g[i%31]++;
            }
            else g[i]++;
        }
        else if(m==4 or m==6 or m==9 or m==11){
            if(i>=31){
                g[m+1]++;
                g[i%30]++;
            }
                else g[i]++;
            }
        else{
            if(i>=29){
                g[m+1]++;
                g[i%28]++;
            }
            else g[i]++;
            }
        }
    for(int i=1;i<=31;i++){
        if(g[i]>0){
            st.insert((char)i/10+48);
            st.insert((char)i%10+48);
        }
    }
    if(st.size()>=k) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}
0