Submission #52545181
Source Code Expand
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pa first
#define pb second
#define endl '\n'
#define vint vector<int>
#define vlong vector<ll>
#define pii pair<int, int>
#define rep(i, a, b) for (int i = int(a); i < int(b); i++)
#define rng(i, a, b) for (int i = int(a); i <= int(b); i++)
#define per(i, a, b) for (int i = int(b - 1); i >= int(a); i--)
#define gnr(i, a, b) for (int i = int(b); i >= int(a); i--)
using namespace std;
#define ATC
#ifdef ATC
#include <atcoder/all>
using namespace atcoder;
#endif
#ifdef MT
void solve()
{
}
#endif
int main(void)
{
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string str;
cin >> str;
if (str.substr(0, 3) == "ABC") {
int round = 0;
rep(i, 0, 3)
{
round *= 10;
round += str[3 + i] - '0';
}
if (round == 316) {
cout << "No" << endl;
} else if (round >= 1 && round < 350) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else {
cout << "No" << endl;
}
#ifdef MT
int t;
cin >> t;
for (int i = 0; i < t; i++)
solve();
#endif
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Past ABCs |
| User | L1bra |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 1273 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3644 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 1 ms | 3480 KiB |
| random_02.txt | AC | 1 ms | 3460 KiB |
| random_03.txt | AC | 1 ms | 3504 KiB |
| random_04.txt | AC | 1 ms | 3644 KiB |
| random_05.txt | AC | 1 ms | 3420 KiB |
| random_06.txt | AC | 1 ms | 3420 KiB |
| random_07.txt | AC | 1 ms | 3516 KiB |
| sample_01.txt | AC | 1 ms | 3476 KiB |
| sample_02.txt | AC | 1 ms | 3476 KiB |
| sample_03.txt | AC | 1 ms | 3420 KiB |