結果
問題 | No.2109 Special Week |
ユーザー | FplusFplusF |
提出日時 | 2022-10-28 21:29:13 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 900 bytes |
コンパイル時間 | 2,208 ms |
コンパイル使用メモリ | 208,612 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 00:29:53 |
合計ジャッジ時間 | 2,793 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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; }