結果
問題 | No.2109 Special Week |
ユーザー |
![]() |
提出日時 | 2023-09-23 23:04:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,070 bytes |
コンパイル時間 | 1,941 ms |
コンパイル使用メモリ | 195,208 KB |
最終ジャッジ日時 | 2025-02-17 01:49:24 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 WA * 3 RE * 2 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using ll = long long; using namespace std; int main() { ll m, d, k, cnt = 0; cin >> m >> d >> k; vector<int> dd = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, v(10); for (int i = 0; i < 7; i++){ int td = d + i; if (td > dd[m-1]){ m++; td -= dd[m-1]; } if (m == 13) m = 1; if (m < 10) { v[0]++; v[m]++; } else { v[1]++; v[m%10]++; } if (td < 10){ v[0]++; v[td%10]++; } else if (td < 20){ v[1]++; v[td%10]++; } else if (td < 30){ v[2]++; v[td%10]++; } else { v[3]++; v[td%10]++; } } for (int i = 0; i < 10; i++){ if (v[i]) cnt++; } cout << ((cnt >= k) ? "Yes" : "No") << endl; }