結果
| 問題 |
No.2109 Special Week
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-28 21:26:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 863 bytes |
| コンパイル時間 | 2,192 ms |
| コンパイル使用メモリ | 202,568 KB |
| 最終ジャッジ日時 | 2025-02-08 14:01:43 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef _RUTHEN
#include <debug.hpp>
#else
#define show(...) true
#endif
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
template <class T> using V = vector<T>;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
V<int> d = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int M, D, K;
cin >> M >> D >> K;
set<char> S;
rep(i, 7) {
string ms = to_string(M), ds = to_string(D);
if (ms.size() == 1) ms = "0" + ms;
if (ds.size() == 1) ds = "0" + ds;
for (auto c : ms) S.insert(c);
for (auto c : ds) S.insert(c);
if (d[M - 1] == D) {
D = 1;
M++;
if (M == 13) M = 1;
} else {
D++;
}
}
cout << (S.size() >= K ? "Yes" : "No") << '\n';
return 0;
}