結果
問題 | No.2109 Special Week |
ユーザー |
![]() |
提出日時 | 2022-10-28 22:24:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,321 bytes |
コンパイル時間 | 1,115 ms |
コンパイル使用メモリ | 122,396 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 01:34:32 |
合計ジャッジ時間 | 2,013 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 WA * 5 |
ソースコード
#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 orm==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);st.insert((char)i%10);}}if(st.size()>=k) cout<<"Yes"<<endl;else cout<<"No"<<endl;return 0;}