結果
| 問題 |
No.2109 Special Week
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-28 21:22:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 350 bytes |
| コンパイル時間 | 695 ms |
| コンパイル使用メモリ | 74,544 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 00:17:14 |
| 合計ジャッジ時間 | 1,713 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main()
| ^~~~
ソースコード
#include<iostream>
#include<set>
using namespace std;
int M,D,K;
int mx(int m){return m==4||m==6||m==9||m==11?30:m==2?28:31;}
main()
{
cin>>M>>D>>K;
set<int>S;
for(int i=0;i<7;i++)
{
S.insert(M/10);
S.insert(M%10);
S.insert(D/10);
S.insert(D%10);
D++;
if(mx(M)<D)
{
M=M%12+1;
D=1;
}
}
cout<<(S.size()<K?"No\n":"Yes\n");
}