結果
| 問題 |
No.2109 Special Week
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-28 21:23:23 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 489 bytes |
| コンパイル時間 | 2,346 ms |
| コンパイル使用メモリ | 247,144 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 00:18:54 |
| 合計ジャッジ時間 | 3,697 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
vector<int> ds={0,31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
vector<int> bk(10,0);
int m,d,k;
cin >> m >> d >> k;
for(int i=0;i<7;i++){
bk[m/10]++;
bk[m%10]++;
bk[d/10]++;
bk[d%10]++;
d++;
if(ds[m]<d){
m++;d=1;
if(m==13){m=1;}
}
}
for(auto &nx : bk){k-=min(1,nx);}
if(k<=0){cout << "Yes\n";}else{cout << "No\n";}
return 0;
}