結果
問題 | No.2109 Special Week |
ユーザー |
![]() |
提出日時 | 2022-10-28 21:29:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 900 bytes |
コンパイル時間 | 1,709 ms |
コンパイル使用メモリ | 200,060 KB |
最終ジャッジ日時 | 2025-02-08 14:04:51 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define rep(i,n) for (long long i=0;i<(long long)(n);i++)#define all(v) v.begin(),v.end()using ll=long long;using pll=pair<ll,ll>;using tll=tuple<ll,ll,ll>;const ll INF=(1ll<<60);template<class T> void chmin(T &a,T b){if(a>b){a=b;}}template<class T> void chmax(T &a,T b){if(a<b){a=b;}}int main(){ll m,d,k;cin >> m >> d >> k;vector<ll> month(14,31);month[2]=28;month[4]=30;month[6]=30;month[9]=30;month[11]=30;set<ll> st;for(ll i=d;i<=d+7-1;i++){ll nowm=m,nowd=i;if(month[m]<i){nowm=(m+1)%12;nowd=i-month[m];;}st.insert(nowm/10);st.insert(nowm%10);st.insert(nowd/10);st.insert(nowd%10);}if(k<=st.size()) cout << "Yes" << endl;else cout << "No" << endl;}