結果
| 問題 |
No.2109 Special Week
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2022-10-28 21:21:59 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 611 bytes |
| コンパイル時間 | 1,417 ms |
| コンパイル使用メモリ | 171,792 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 00:17:04 |
| 合計ジャッジ時間 | 3,048 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
vector<int> day = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 31, 31};
int main(){
int M, D, K;
cin >> M >> D >> K;
vector<bool> used(10, false);
for (int i = 0; i < 7; i++){
used[M / 10] = true;
used[M % 10] = true;
used[D / 10] = true;
used[D % 10] = true;
D++;
if (D > day[M - 1]){
D = 1;
M++;
if (M == 13){
M = 1;
}
}
}
int cnt = 0;
for (int i = 0; i < 10; i++){
if (used[i]){
cnt++;
}
}
if (cnt >= K){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
SSRS