Submission #74681226
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using pii = pair<int,int>;
#define endl '\n';
void solveA () {
vector<int> month = {1, 3, 5, 7, 9};
vector<int> date = {7, 3, 5, 7, 9};
int d, w;
cin >> d >> w;
for (int i = 0; i < (int)date.size(); i ++) {
if (d == month[i] && w == date[i]) {
cout << "Yes" << endl;
return;
}
}
cout << "No" << endl;
}
void solveB () {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i ++) {
for (int j = 0; j < m; j ++) {
if (i == 0 || i == n - 1 || j == 0 || j == m - 1) cout << '#';
else cout << ".";
}
cout << endl;
}
}
void solveC () {
int n;
cin >> n;
auto ok = vector(11, vector(11, vector<bool> (128, 0)));
vector<pii> need(n);
for (auto& [len, idx] : need) cin >> len >> idx;
int m;
cin >> m;
vector<string> s(m);
for (auto& str : s) cin >> str;
for (int i = 0; i < m; i ++) {
int k = s[i].size();
for (int j = 0; j < k; j ++) {
ok[k][j + 1][s[i][j]] = 1;
}
}
for (int i = 0; i < m; i ++) {
if ((int)s[i].size() != n) {
cout << "No" << endl;
continue;
}
bool flag = true;
for (int j = 0; j < n; j ++) {
auto& [len, idx] = need[j];
if (ok[len][idx][s[i][j]] == 0) {
cout << "No" << endl;
flag = false;
break;
}
}
if (flag) cout << "Yes" << endl;
}
}
int main () {
cin.tie(0)->sync_with_stdio(0);
solveA();
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Gothec |
| User | PureMilk |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 1519 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3604 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt |
| All | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-01.txt | AC | 1 ms | 3404 KiB |
| 00-sample-02.txt | AC | 1 ms | 3452 KiB |
| 00-sample-03.txt | AC | 1 ms | 3588 KiB |
| 00-sample-04.txt | AC | 1 ms | 3528 KiB |
| 01-01.txt | AC | 1 ms | 3588 KiB |
| 01-02.txt | AC | 1 ms | 3564 KiB |
| 01-03.txt | AC | 1 ms | 3604 KiB |
| 01-04.txt | AC | 1 ms | 3404 KiB |
| 01-05.txt | AC | 1 ms | 3404 KiB |
| 01-06.txt | AC | 1 ms | 3588 KiB |
| 01-07.txt | AC | 1 ms | 3528 KiB |
| 01-08.txt | AC | 1 ms | 3572 KiB |
| 01-09.txt | AC | 1 ms | 3396 KiB |
| 01-10.txt | AC | 1 ms | 3564 KiB |
| 01-11.txt | AC | 1 ms | 3404 KiB |
| 01-12.txt | AC | 1 ms | 3576 KiB |
| 01-13.txt | AC | 1 ms | 3404 KiB |